| | |
| | | IP_VOLUME_MISSION_CREATE_TIME("create_time"), |
| | | |
| | | /** |
| | | * 管理员列表 |
| | | */ |
| | | //创建时间 |
| | | CLIENT_CREATE_TIME("create_time"), |
| | | |
| | | /** |
| | | * 音柱素材列表 |
| | | */ |
| | | //创建时间 |
| | | IP_VOLUME_FILE_CREATE_TIME("create_time"), |
| | | |
| | | /** |
| | | * 灯杆列表 |
| | | */ |
| | | POLE_NAME("pole_name"), |
| | | POLE_ID("id"), |
| | | POLE_CREATE_TIME("create_time"), |
| | | |
| | | |
| | | |
| | | |
| | |
| | | |
| | | boolean updateDeviceCode(Long id); |
| | | |
| | | List<Pole> queryPoleOnLineStatesList(Long userid, Integer isTrue, Integer bingStates, Long groupid, String keyword); |
| | | List<Pole> queryPoleOnLineStatesList(Long userid, Integer isTrue, Integer bingStates, Long groupid, String keyword, String orderBy); |
| | | } |
| | | |
| | | |
| | |
| | | </if> |
| | | </where> |
| | | GROUP BY t1.id |
| | | <if test="orderBy != null"> |
| | | ORDER BY ${orderBy} |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | import com.sandu.ximon.dao.domain.ClientRoleRelation; |
| | | import com.sandu.ximon.dao.enums.AdministratorEnums; |
| | | import com.sandu.ximon.dao.enums.MenuEnum; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import eu.bitwalker.useragentutils.Browser; |
| | | import eu.bitwalker.useragentutils.OperatingSystem; |
| | | import eu.bitwalker.useragentutils.UserAgent; |
| | |
| | | } |
| | | |
| | | @GetMapping("/list") |
| | | public ResponseVO<Object> listLikeClient(BaseConditionVO baseConditionVO, @RequestParam(value = "keyword", required = false) String keyword) { |
| | | public ResponseVO<Object> listLikeClient(BaseConditionVO baseConditionVO, |
| | | @RequestParam(value = "keyword", required = false) String keyword, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq) { |
| | | if (!permissionConfig.check(MenuEnum.CLIENT_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize()); |
| | | |
| | | LambdaQueryWrapper<Client> wrapper = Wrappers.lambdaQuery(Client.class); |
| | | if (AdministratorEnums.NORMAL.getCode().equals(SecurityUtils.getAdministratorIdentity())) { |
| | | wrapper.eq(Client::getSuperiorId, SecurityUtils.getUserId()).or(w -> w.eq( |
| | |
| | | .or(w1 -> w1.like(Client::getMobile, keyword)) |
| | | .or(w2 -> w2.like(Client::getLinkMan, keyword)); |
| | | } |
| | | List<Client> clientList = clientService.list(wrapper); |
| | | List<ClientDto> clientDtoList = new ArrayList<>(); |
| | | //排序字段 |
| | | String orderByResult = OrderByEnums.CLIENT_CREATE_TIME.getCode(); |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.CLIENT_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = OrderByEnums.ASC.getCode(); |
| | | break; |
| | | case 2: |
| | | orderBySeq = OrderByEnums.DESC.getCode(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = orderByResult + " " + orderBySeq; |
| | | |
| | | PageHelper.startPage(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), orderBy); |
| | | List<Client> clientList = clientService.list(wrapper); |
| | | |
| | | List<ClientDto> clientDtoList = new ArrayList<>(); |
| | | for (Client demo : clientList) { |
| | | ClientDto clientDto = new ClientDto(); |
| | | BeanUtil.copyProperties(demo, clientDto); |
| | |
| | | public ResponseVO<Object> getPoleList() { |
| | | List<Pole> poleList; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, null, null, null, null); |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, null, null, null, null, null); |
| | | } else { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), null, null, null, null); |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), null, null, null, null, null); |
| | | } |
| | | |
| | | List<Map> mapList = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | @PostMapping("/listDetail") |
| | | public ResponseVO<Object> listPoleDetail(BaseConditionVO baseConditionVO, @RequestBody PoleStatesParam param) { |
| | | public ResponseVO<Object> listPoleDetail(BaseConditionVO baseConditionVO, |
| | | @RequestBody PoleStatesParam param, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq) { |
| | | if (!permissionConfig.check(MenuEnum.POLE_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | CommonPage commonPage = poleService.queryAllStatesAndList(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), param); |
| | | CommonPage commonPage = poleService.queryAllStatesAndList(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), param, order, seq); |
| | | List<Pole> listCommonPage = (List<Pole>) commonPage.getList(); |
| | | |
| | | List<PoleBindVO> listResult = new ArrayList<>(); |
| | |
| | | } |
| | | |
| | | @PostMapping("/list") |
| | | public ResponseVO<Object> listPole(BaseConditionVO baseConditionVO, @RequestBody PoleStatesParam param) { |
| | | public ResponseVO<Object> listPole(BaseConditionVO baseConditionVO, |
| | | @RequestBody PoleStatesParam param, |
| | | @RequestParam(value = "order", required = false) Integer order, |
| | | @RequestParam(value = "seq", required = false) Integer seq) { |
| | | if (!permissionConfig.check(MenuEnum.POLE_LIST.getCode())) { |
| | | return ResponseUtil.fail("缺少对应用户权限"); |
| | | } |
| | | CommonPage commonPage = poleService.queryAllStatesAndList(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), param); |
| | | CommonPage commonPage = poleService.queryAllStatesAndList(baseConditionVO.getPageNo(), baseConditionVO.getPageSize(), param, order, seq); |
| | | |
| | | return ResponseUtil.success(commonPage); |
| | | } |
| | |
| | | import com.sandu.ximon.admin.vo.PoleBindVO; |
| | | import com.sandu.ximon.dao.bo.*; |
| | | import com.sandu.ximon.dao.domain.*; |
| | | import com.sandu.ximon.dao.enums.OrderByEnums; |
| | | import com.sandu.ximon.dao.mapper.PoleMapper; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | return result; |
| | | } |
| | | |
| | | public CommonPage queryAllStatesAndList(Integer pageNo, Integer pageSize, PoleStatesParam param) { |
| | | public CommonPage queryAllStatesAndList(Integer pageNo, Integer pageSize, PoleStatesParam param, Integer order, Integer seq) { |
| | | if (param == null) { |
| | | param = new PoleStatesParam(); |
| | | } |
| | | System.out.println(param); |
| | | |
| | | //排序字段 |
| | | String orderByResult = OrderByEnums.POLE_ID.getCode(); |
| | | //正序、倒叙 |
| | | String orderBySeq = OrderByEnums.ASC.getCode(); |
| | | if (order != null) { |
| | | switch (order) { |
| | | case 1: |
| | | orderByResult = OrderByEnums.POLE_NAME.getCode(); |
| | | break; |
| | | case 2: |
| | | orderByResult = OrderByEnums.POLE_ID.getCode(); |
| | | break; |
| | | case 3: |
| | | orderByResult = OrderByEnums.POLE_CREATE_TIME.getCode(); |
| | | break; |
| | | default: |
| | | } |
| | | } |
| | | if (seq != null) { |
| | | switch (seq) { |
| | | case 1: |
| | | orderBySeq = OrderByEnums.ASC.getCode(); |
| | | break; |
| | | case 2: |
| | | orderBySeq = OrderByEnums.DESC.getCode(); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | } |
| | | //排序方式 |
| | | String orderBy = "t1." + orderByResult + " " + orderBySeq; |
| | | |
| | | List<Pole> poleList; |
| | | if (SecurityUtils.getClientId() == null) { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword()); |
| | | poleList = poleMapper.queryPoleOnLineStatesList(null, param.getIsTrue(), |
| | | param.getBingStates(), param.getGroupid(), param.getKeyword(), orderBy); |
| | | } else { |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword()); |
| | | poleList = poleMapper.queryPoleOnLineStatesList(SecurityUtils.getUserId(), |
| | | param.getIsTrue(), param.getBingStates(), param.getGroupid(), param.getKeyword(), orderBy); |
| | | } |
| | | |
| | | List<Pole> PoleResult = isOnLine(poleList, param); |