| | |
| | | and bu.uid = #{userId} |
| | | ) |
| | | </select> |
| | | <select id="getListByCondition" resultType="com.whyc.pojo.db_station.BattInf"> |
| | | select * from db_station.tb_batt_inf where |
| | | <if test="product!=null"> |
| | | and product=#{product} |
| | | </if> |
| | | <if test="inuseTime!=null"> |
| | | and inuse_time >= #{inuseTime} |
| | | </if> |
| | | and battgroup_id in( |
| | | select distinct battgroup_id from db_user.tb_baojigroup_usr bu,db_user.tb_baojigroup_power bp,db_station.tb_batt_inf bi |
| | | where bu.baoji_group_id = bp.baoji_group_id |
| | | and bp.station_id = bi.station_id |
| | | and bu.uid = #{userId} |
| | | </select> |
| | | |
| | | <select id="getBattByUid" resultType="com.whyc.pojo.db_station.BattInf"> |
| | | select distinct * from db_station.tb_batt_inf,db_station.tb_station_inf |
| | |
| | | </if> |
| | | </where> |
| | | </select> |
| | | <select id="getBattgroupIdInf" resultType="com.whyc.pojo.db_station.BattInf"> |
| | | select distinct tb_batt_inf.* |
| | | ,tb_station_inf.station_type,tb_station_inf.station_name,tb_station_inf.provice,tb_station_inf.city,tb_station_inf.country,tb_station_inf.full_name |
| | | from db_station.tb_batt_inf,db_station.tb_station_inf |
| | | <where> |
| | | tb_batt_inf.station_id=tb_station_inf.station_id |
| | | and tb_batt_inf.battgroup_id=#{battgroupId} |
| | | </where> |
| | | limit 1 |
| | | </select> |
| | | <select id="getBattgroupIdListByPowerId" resultType="com.whyc.pojo.db_station.BattInf"> |
| | | select distinct tb_batt_inf.* |
| | | from db_station.tb_batt_inf |
| | | <where> |
| | | tb_batt_inf.power_id=#{powerId} |
| | | </where> |
| | | order by battgroup_num asc |
| | | </select> |
| | | <select id="getBattgroupIdListByDevId" resultType="com.whyc.pojo.db_station.BattInf"> |
| | | select distinct tb_batt_inf.* |
| | | from db_station.tb_batt_inf |
| | | <where> |
| | | tb_batt_inf.dev_id=#{devId} |
| | | </where> |
| | | order by battgroup_num asc |
| | | </select> |
| | | </mapper> |