<?xml version="1.0" encoding="UTF-8"?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<mapper namespace="com.whyc.mapper.DevLithiumInfMapper">
|
|
<select id="getAllInf" resultType="com.whyc.pojo.db_lithium_ram_db.DevLithiumInf">
|
select * from db_lithium_ram_db.tb_dev_inf
|
<where>
|
dev_type=#{dto.devType}
|
<if test="dto.devOnline!=null">
|
and dev_online=#{dto.devOnline}
|
</if>
|
<if test="dto.startTime!=null">
|
and create_time>=#{dto.startTime}
|
</if>
|
<if test="dto.endTime!=null">
|
and create_time<=#{dto.endTime}
|
</if>
|
and dev_id in (
|
SELECT distinct dev_id from db_user.tb_battgroup_baojigroup,db_user.tb_battgroup_usr
|
<where>
|
tb_battgroup_baojigroup.baoji_group_id=tb_battgroup_usr.baoji_group_id
|
<if test="dto.uid!=null">
|
and uid=#{dto.uid}
|
</if>
|
</where>
|
)
|
</where>
|
</select>
|
<select id="getMaxDevId" resultType="java.lang.Integer">
|
select max(dev_id) from db_lithium_ram_db.tb_dev_inf
|
<where>
|
dev_type=#{devType}
|
</where>
|
limit 1
|
</select>
|
<select id="getLine" resultType="com.whyc.pojo.db_lithium_ram_db.DevLithiumInf">
|
select * from db_lithium_ram_db.tb_dev_inf
|
<where>
|
dev_id in (
|
SELECT distinct dev_id from db_user.tb_battgroup_baojigroup,db_user.tb_battgroup_usr
|
<where>
|
tb_battgroup_baojigroup.baoji_group_id=tb_battgroup_usr.baoji_group_id
|
<if test="uid!=null">
|
and uid=#{uid}
|
</if>
|
</where>
|
)
|
</where>
|
</select>
|
|
<select id="getDevType" resultType="com.whyc.pojo.db_lithium_ram_db.DevLithiumInf">
|
select * from db_lithium_ram_db.tb_dev_inf
|
<where>
|
dev_type=#{devType}
|
and dev_id in (
|
SELECT distinct dev_id from db_user.tb_battgroup_baojigroup,db_user.tb_battgroup_usr
|
<where>
|
tb_battgroup_baojigroup.baoji_group_id=tb_battgroup_usr.baoji_group_id
|
<if test="uid!=null">
|
and uid=#{uid}
|
</if>
|
</where>
|
)
|
</where>
|
</select>
|
<select id="getDevStaticByType" resultType="com.whyc.pojo.db_lithium_ram_db.DevLithiumInf">
|
select * from db_lithium_ram_db.tb_dev_inf
|
<where>
|
dev_id in (
|
SELECT distinct dev_id from db_user.tb_battgroup_baojigroup,db_user.tb_battgroup_usr
|
<where>
|
tb_battgroup_baojigroup.baoji_group_id=tb_battgroup_usr.baoji_group_id
|
<if test="uid!=null">
|
and uid=#{uid}
|
</if>
|
</where>
|
)
|
</where>
|
</select>
|
|
</mapper>
|