| | |
| | | |
| | | @RequestMapping(value = "/plan/add/auth") |
| | | @ManagerAuth |
| | | @Transactional |
| | | public R add(@RequestParam Map<String, Object> param) { |
| | | // pre |
| | | Plan plan = JSON.parseObject(JSON.toJSONString(param), Plan.class); |
| | |
| | | if (!planService.insert(plan)) { |
| | | throw new CoolException("保持失败,请重试"); |
| | | } |
| | | |
| | | // 自动添加跟进人 |
| | | PlanFoll planFoll = new PlanFoll(); |
| | | planFoll.setPlanId(plan.getId()); |
| | | planFoll.setUserId(manager.getId()); |
| | | if (!planFollService.insert(planFoll)) { |
| | | throw new CoolException("保持失败,请重试"); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping(value = "/plan/approval/auth") |
| | | @ManagerAuth |
| | | public R approval(@RequestParam Long planId){ |
| | | return R.ok(); |
| | | } |
| | | |
| | | @RequestMapping(value = "/planQuery/auth") |
| | | @ManagerAuth |
| | | public R query(String condition) { |