From 4c80d2017a3b88b9ad55f28c3b87fd96eb67bcb2 Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期四, 29 九月 2022 09:40:51 +0800 Subject: [PATCH] Merge branch 'sanshuohuitang_dev' into huacheng_test --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java | 40 +++++++++++++++++++++++++++++++++++++++- 1 files changed, 39 insertions(+), 1 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java index 20d974d..70b3ae3 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java @@ -9,8 +9,10 @@ import com.panzhihua.common.model.vos.user.AdministratorsUserVO; import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.Snowflake; +import com.panzhihua.service_community.entity.ComEvent; import com.panzhihua.service_community.entity.ComSanshuoExpert; import com.panzhihua.service_community.service.ComSanShuoExpertService; +import com.panzhihua.service_community.service.IComEventService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiParam; @@ -19,6 +21,10 @@ import javax.annotation.Resource; import javax.xml.crypto.Data; import java.util.Date; +import java.util.List; + +import static java.util.Objects.isNull; +import static java.util.Objects.nonNull; /** * 三说会堂调解专家控制器 @@ -31,6 +37,8 @@ private ComSanShuoExpertService comSanShuoExpertService; @Resource private UserService userService; + @Resource + private IComEventService comEventService; /** * 添加专家 @@ -51,6 +59,7 @@ * */ @GetMapping("/appletsList") public R appList(){ + comSanShuoExpertService.selectExpertList(); return R.ok(comSanShuoExpertService.list(new QueryWrapper<ComSanshuoExpert>().eq("status",1).eq("del_flag",1))); } @@ -72,7 +81,6 @@ public R backList(@RequestParam(value = "keyWord",required = false) String keyWord, @RequestParam(value = "page",required = false)Integer page, @RequestParam(value = "size",required = false)Integer size){ - //TODO 获取当前账号级别确定范围 LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); return comSanShuoExpertService.expertPage(keyWord,page,size,loginUserInfo); } @@ -83,6 +91,10 @@ @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("有未调解完成事件,无法删除!"); + } ComSanshuoExpert expert = comSanShuoExpertService.getById(id); expert.setStatus(0); expert.setDelFlag(0); @@ -96,6 +108,7 @@ public R resetPassword(@RequestBody ComSanshuoExpertDTO comSanshuoExpertDTO){ ComSanshuoExpert expert = comSanShuoExpertService.getById(comSanshuoExpertDTO.getId()); expert.setPassword(comSanshuoExpertDTO.getPassword()); + userService.sanShuoResetPassword(comSanshuoExpertDTO.getAccount(),comSanshuoExpertDTO.getPassword() ); return R.ok(comSanShuoExpertService.updateById(expert)); } @@ -108,6 +121,9 @@ } + + + /** * 专家范围 * */ @@ -116,4 +132,26 @@ LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); return comSanShuoExpertService.expertRange(loginUserInfo); } + + /** + * 专家风采列表 + * */ + @GetMapping("/expertShowList") + public R expertShowList(@RequestParam(value = "level",required = false)Integer level, + @RequestParam(value = "id",required = false)Long id){ + return comSanShuoExpertService.expertShowList(level,id); + } + + /** + * 是否为专家登陆小程序 + * */ + @GetMapping("/checkExpert") + public R checkExpert(@RequestParam("number") String number){ + ComSanshuoExpert expert = comSanShuoExpertService.getOne(new QueryWrapper<ComSanshuoExpert>().lambda().eq(ComSanshuoExpert::getPhone, number)); + if (nonNull(expert)){ + return R.ok(); + } + return R.fail(); + } + } -- Gitblit v1.7.1