| | |
| | | package com.sandu.ximon.dao.mapper; |
| | | |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.sandu.ximon.dao.domain.Pole; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | boolean updateDeviceCode(Long id); |
| | | |
| | | List<Pole> queryPoleOnLineStatesList(Long userid, Integer isTrue, Integer bingStates, Long groupid, String keyword,Integer center, String orderBy); |
| | | List<Pole> queryPoleOnLineStatesList(Long userid, Integer isTrue, Integer bingStates, Long groupid, String keyword, Integer centre, String orderBy); |
| | | |
| | | List<Pole> getPoleListOnBinding(Long userid, String keyword); |
| | | } |
| | |
| | | LEFT JOIN pole_group_relation t2 ON t1.id = t2.pole_id |
| | | LEFT JOIN pole_group t3 ON t3.group_id = t2.pole_group_id |
| | | <where> |
| | | 1=1 |
| | | <if test="userid != null"> |
| | | AND (t1.user_id = #{userid} OR t1.client_id = #{userid}) |
| | | </if> |
| | |
| | | <if test="bingStates != null and bingStates == 1 "> |
| | | AND t1.user_id = -1 |
| | | </if> |
| | | <if test="center != null and center != ''"> |
| | | AND t1.centre = #{center} |
| | | <if test="centre != null and centre == 0"> |
| | | AND t1.centre = 0 |
| | | </if> |
| | | <if test="centre != null and centre == 1"> |
| | | AND t1.centre = 1 |
| | | </if> |
| | | </where> |
| | | GROUP BY t1.id |
| | |
| | | String orderBy = "t1." + orderByResult + " " + orderBySeq; |
| | | |
| | | List<Pole> poleList; |
| | | Integer center = param.getCenter(); |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, param.getIsTrue(), |
| | | param.getBingStates(), param.getGroupid(), param.getKeyword(), param.getCenter(), orderBy); |
| | | param.getBingStates(), param.getGroupid(), param.getKeyword(), center, orderBy); |
| | | } else { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), |
| | | param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword(), param.getCenter(), orderBy); |
| | | param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword(), center, orderBy); |
| | | } |
| | | |
| | | poleList.forEach( |