| | |
| | | *
|
| | | * @param map
|
| | | * map里 包括 组织id和4个坐标点
|
| | | * @return
|
| | | * @return 返回未删除结果集
|
| | | */
|
| | | @Override
|
| | | public List<Device> query(Map<String, Object> map) {
|
| | |
| | | * @param deviceName
|
| | | * @param pageSize
|
| | | * @param pageNo
|
| | | * @return
|
| | | * @return 返回未删除结果
|
| | | */
|
| | | @Override
|
| | | public PageResult query(Integer orgId, String deviceName, Integer pageSize, Integer pageNo) {
|
| | |
| | | * @param mpId
|
| | | * @param pageSize
|
| | | * @param pageNo
|
| | | * @return
|
| | | * @return 返回未删除结果
|
| | | */
|
| | | @Override
|
| | | public PageResult query(Integer orgId, Integer mpId, Integer pageSize, Integer pageNo) {
|
| | |
| | | Device device = new Device();
|
| | | device.setIsDelete(Constants.IS_DELETE_TRUE);
|
| | | if(ids!=null&&ids.length>0){
|
| | | Example example = new Example(ENTITY_CLASS);
|
| | | example.or().andIn("id", Arrays.asList(ids));
|
| | | if(ids.length==1){
|
| | | device.setId(ids[0]);
|
| | | deviceMapper.updateByPrimaryKeySelective(device);
|
| | | }else{
|
| | | Example example = new Example(ENTITY_CLASS);
|
| | | example.or().andIn("id", Arrays.asList(ids));
|
| | | deviceMapper.updateByExampleSelective(device,example);
|
| | | }
|
| | |
|
| | | List<Device> deviceList = deviceMapper.selectByExample(example);
|
| | | List<String> adjustAndDeviceKeys = deviceList.stream().collect(
|
| | | ArrayList<String>::new,
|
| | | (list,dev) -> {
|
| | | if(!StringUtils.isBlank(dev.getMac())){
|
| | | list.add("device_"+dev.getMac());
|
| | | list.add("adjust_"+dev.getMac());
|
| | | }
|
| | | },
|
| | | (oList,nList)-> {
|
| | | oList.addAll(nList);
|
| | | }
|
| | | );
|
| | | redisUtils.remove(adjustAndDeviceKeys.toArray(new String [adjustAndDeviceKeys.size()]));
|
| | | }
|
| | | }
|
| | |
|