| | |
| | | package com.whyc.mapper; |
| | | |
| | | import com.whyc.pojo.db_area.LockInf; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | |
| | | //获取当前最大的锁 |
| | | List<LockInf> getAllLockInf(String lockName, Integer lockType, Integer lockState,List<Integer> areaList); |
| | | |
| | | |
| | | //查看区域下所有的锁 |
| | | List<LockInf> selectAllLockById(@Param("areaList") List<Integer> areaList); |
| | | } |
| | |
| | | areaList.add(id); |
| | | getAllAreaId(id,areaList); |
| | | //查看区域下所有的锁 |
| | | QueryWrapper linfWrapper=new QueryWrapper(); |
| | | linfWrapper.in("area_id",areaList); |
| | | linfs=linfMapper.selectList(linfWrapper); |
| | | linfs=linfMapper.selectAllLockById(areaList); |
| | | if(linfs!=null&&linfs.size()>0){ |
| | | map.put("sumLinf",linfs.size()); |
| | | Map<Integer, List<LockInf>> onlinemap = linfs.stream().collect(Collectors.groupingBy(LockInf::getLockOnline)); |
| | |
| | | </where> |
| | | order by id asc |
| | | </select> |
| | | <select id="selectAllLockById" resultType="com.whyc.pojo.db_area.LockInf"> |
| | | select tb_lock_inf.*,tb_area_inf.area_name,tb_area_inf.area_path from db_area.tb_lock_inf,db_area.tb_area_inf |
| | | <where> |
| | | tb_lock_inf.area_id=tb_area_inf.id |
| | | <if test="areaList!=null"> |
| | | and area_id in |
| | | <foreach collection="areaList" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | </where> |
| | | order by id asc |
| | | </select> |
| | | </mapper> |