| | |
| | | <id property="num" column="num"></id> |
| | | <result property="baojiGroupId" column="baoji_group_id"></result> |
| | | <result property="baojiGroupName" column="baoji_group_name"></result> |
| | | <collection property="usrList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.db_user.BattgroupUsr" column="{baojiGroupId=baoji_group_id}" select="selectUsrList"> |
| | | <collection property="usrList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.db_user.UserInf" column="{baojiGroupId=baoji_group_id}" |
| | | select="selectUsrList"> |
| | | </collection> |
| | | <collection property="devList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.db_lithium_ram_db.DevInf" column="{baojiGroupId=baoji_group_id}" select="selectDevList"> |
| | | <collection property="devList" javaType="java.util.ArrayList" ofType="com.whyc.pojo.db_lithium_ram_db.DevInf" column="{baojiGroupId=baoji_group_id}" |
| | | select="selectDevList"> |
| | | </collection> |
| | | </resultMap> |
| | | |
| | | <select id="selectUsrList" resultType="battgroupUsr"> |
| | | select * from db_user.tb_battgroup_usr |
| | | <select id="selectUsrList" resultType="userInf"> |
| | | select uid,uname,udownload_role from db_user.tb_user_inf |
| | | <where> |
| | | baoji_group_id=#{baojiGroupId} |
| | | uid in ( |
| | | SELECT distinct uid from db_user.tb_battgroup_usr |
| | | <where> |
| | | baoji_group_id=#{baojiGroupId} |
| | | </where> |
| | | ) |
| | | </where> |
| | | order by baoji_group_id asc |
| | | order by uid asc |
| | | </select> |
| | | |
| | | <select id="getBaojiInfo" resultType="devInf"> |
| | | select tb_dev_inf.* from db_lithium_ram_db.tb_dev_inf,db_user.tb_battgroup_baojigroup |
| | | <select id="selectDevList" resultType="devInf"> |
| | | select * from db_lithium_ram_db.tb_dev_inf |
| | | <where> |
| | | tb_dev_inf.dev_id=tb_battgroup_baojigroup.dev_id |
| | | and tb_battgroup_baojigroup.baoji_group_id=#{baojiGroupId} |
| | | dev_id in ( |
| | | SELECT distinct dev_id from db_user.tb_battgroup_baojigroup |
| | | <where> |
| | | baoji_group_id=#{baojiGroupId} |
| | | </where> |
| | | ) |
| | | </where> |
| | | </select> |
| | | |
| | | <select id="getBaojiInfo" resultMap="baojiList"> |
| | | select * from db_user.tb_baojigroup order by baoji_group_id asc |
| | | </select> |
| | | |
| | | </mapper> |