updateName加属性关联就加stationIdEx,不关联就不传
| | |
| | | public Response updateName(@RequestParam(required = false) String stationName, @RequestParam(required = false) String stationName1 |
| | | , @RequestParam(required = false) String stationName2, @RequestParam(required = false) String stationName3 |
| | | , @RequestParam(required = false) String stationName4, @RequestParam(required = false) String stationName5 |
| | | , @RequestParam String stationId) { |
| | | return service.updateName(stationName, stationName1, stationName2, stationName3, stationName4, stationName5, stationId); |
| | | , @RequestParam(required = false) String stationIdEx, @RequestParam String stationId) { |
| | | return service.updateName(stationName, stationName1, stationName2, stationName3, stationName4, stationName5, stationIdEx, stationId); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除总站点") |
| | |
| | | |
| | | //编辑机房名 |
| | | @Transactional |
| | | public Response updateName(String stationName, String stationName1, String stationName2, String stationName3, String stationName4, String stationName5, String stationId) { |
| | | public Response updateName(String stationName, String stationName1, String stationName2, String stationName3, String stationName4, String stationName5 |
| | | , String stationIdEx, String stationId) { |
| | | UpdateWrapper wrapper = new UpdateWrapper(); |
| | | wrapper.eq("stationId", stationId); |
| | | UpdateWrapper sinfWrapper = new UpdateWrapper(); |
| | | sinfWrapper.eq("stationId", stationId); |
| | | if (stationName != null && !stationName.isEmpty()) { |
| | | wrapper.set("stationName", stationName); |
| | | sinfWrapper.set("stationName", stationName); |
| | | } |
| | | if (stationName1 != null && !stationName1.isEmpty()) { |
| | | wrapper.set("stationName1", stationName1); |
| | | sinfWrapper.set("stationName1", stationName1); |
| | | } |
| | | if (stationName2 != null && !stationName2.isEmpty()) { |
| | | wrapper.set("stationName2", stationName2); |
| | | sinfWrapper.set("stationName2", stationName2); |
| | | } |
| | | if (stationName3 != null && !stationName3.isEmpty()) { |
| | | wrapper.set("stationName3", stationName3); |
| | | sinfWrapper.set("stationName3", stationName3); |
| | | } |
| | | if (stationName4 != null && !stationName4.isEmpty()) { |
| | | wrapper.set("stationName4", stationName4); |
| | | sinfWrapper.set("stationName4", stationName4); |
| | | } |
| | | if (stationName5 != null && !stationName5.isEmpty()) { |
| | | wrapper.set("stationName5", stationName5); |
| | | sinfWrapper.set("stationName5", stationName5); |
| | | } |
| | | int flag = mapper.update(null, wrapper); |
| | | if (stationIdEx != null && !stationIdEx.isEmpty()) { |
| | | int togetherFlag = mapper.getTogetherFlag(stationIdEx); |
| | | sinfWrapper.set("together_flag", togetherFlag); |
| | | } |
| | | int flag = mapper.update(null, sinfWrapper); |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("stationId", stationId); |
| | | List listB = binfMapper.selectList(queryWrapper); |