| | |
| | | @PostMapping |
| | | public R add(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | comSanshuoExpertDTO.setCreateBy(this.getLoginUserInfo().getName()); |
| | | return comSanShuoExpertService.addExpert(comSanshuoExpertDTO); |
| | | return comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO); |
| | | } |
| | | |
| | | @GetMapping("/detail") |
| | |
| | | * 小程序获取可选择专家 |
| | | * */ |
| | | @GetMapping("/appletsList") |
| | | public R appList(){ |
| | | comSanShuoExpertService.selectExpertList(); |
| | | return R.ok(comSanShuoExpertService.list(new QueryWrapper<ComSanshuoExpert>().eq("status",1).eq("del_flag",1))); |
| | | public R appList(@RequestParam (value = "type",required = false)Integer type,@RequestParam(value = "id",required = false)Long id){ |
| | | return comSanShuoExpertService.selectExpertList(type, id,this.getLoginUserInfo().getCommunityId()); |
| | | } |
| | | |
| | | /** |
| | |
| | | * */ |
| | | @PutMapping |
| | | public R update(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ |
| | | ComSanshuoExpert expert=new ComSanshuoExpert(); |
| | | BeanUtil.copyProperties(comSanshuoExpertDTO,expert); |
| | | expert.setUpdateTime(new Date()); |
| | | return R.ok(comSanShuoExpertService.updateById(expert)); |
| | | return R.ok(comSanShuoExpertService.addOrUpdateExpert(comSanshuoExpertDTO)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 后台获取列表 |
| | |
| | | * */ |
| | | @DeleteMapping("/remove") |
| | | public R remove(@RequestParam("id")Long id){ |
| | | //TODO 是否有为解决事件 |
| | | List<ComEvent> list = comEventService.list(new QueryWrapper<ComEvent>().lambda().eq(ComEvent::getSpecialistId, id).in(ComEvent::getEventProcessStatus, (1), (2), (5))); |
| | | if (list.size()!=0){ |
| | | return R.fail("有未调解完成事件,无法删除!"); |