| | |
| | | @RequestMapping(value = "/cstmr/delete/auth") |
| | | @ManagerAuth |
| | | public R delete(@RequestParam(value="ids[]") Long[] ids){ |
| | | for (Long id : ids){ |
| | | for (Long id : ids){ |
| | | cstmrService.deleteById(id); |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/cstmr/delete/json") |
| | | @ManagerAuth |
| | | public R deleteJson(@RequestBody() Map map){ |
| | | Object ids = map.get("ids"); |
| | | ----------------------- |
| | | System.out.println(ids); |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R cstmrFollowersAddJson(@RequestBody() Map map) { |
| | | Object cstmrId = map.get("cstmrId"); |
| | | Object followerIds = map.get("followerIds"); |
| | | long cstmrId1 = Long.valueOf(String.valueOf(cstmrId)); |
| | | long followerIds1 = Long.valueOf(String.valueOf(followerIds)); |
| | | long cstmrId = Long.valueOf(String.valueOf(map.get("cstmrId"))); |
| | | long followerIds = Long.valueOf(String.valueOf(map.get("followerIds"))); |
| | | if (Cools.isEmpty(cstmrId, followerIds)) { |
| | | return R.parse(BaseRes.PARAM); |
| | | } |
| | | CstmrFoll cstmrFoll = new CstmrFoll(); |
| | | cstmrFoll.setCstmrId(cstmrId1); |
| | | cstmrFoll.setUserId(followerIds1); |
| | | cstmrFoll.setCstmrId(cstmrId); |
| | | cstmrFoll.setUserId(followerIds); |
| | | if (!cstmrFollService.insert(cstmrFoll)) { |
| | | throw new CoolException("添加失败,请联系管理员"); |
| | | } |