whycxzp
2025-06-10 73bb5617e6aeb4ee8f7dfd4ad54b61d477969d86
src/main/java/com/whyc/mapper/PowerInfMapper.java
@@ -1,8 +1,24 @@
package com.whyc.mapper;
import com.whyc.pojo.db_batt.PowerInf;
import org.apache.ibatis.annotations.Select;
import java.util.List;
public interface PowerInfMapper extends CustomMapper<PowerInf>{
    Integer selectMaxBattGroupId();
    int getMaxPowerId();
    @Select("select distinct producer from db_batt.power_inf where producer is not null")
    List<String> getProducerList();
    @Select("SELECT s.sinf_name as station_name,p.*,p.binf_id as battGroupId,p.binf_name as battGroupName from db_batt.power_inf p,db_batt.sinf_pinf sp,db_batt.station_inf s\n" +
            "where p.power_id = sp.pinf_id and sp.sinf_id = s.sinf_id")
    List<PowerInf> getList();
    @Select("SELECT s.sinf_name as station_name,p.*,p.binf_id as battGroupId,p.binf_name as battGroupName from db_batt.power_inf p,db_batt.sinf_pinf sp,db_batt.station_inf s\n" +
            "where p.power_id = sp.pinf_id and sp.sinf_id = s.sinf_id and power_id = #{powerId}")
    PowerInf getById(int powerId);
}