| | |
| | | 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; |
| | |
| | | import javax.annotation.Resource; |
| | | import javax.xml.crypto.Data; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 三说会堂调解专家控制器 |
| | |
| | | private ComSanShuoExpertService comSanShuoExpertService; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private IComEventService comEventService; |
| | | |
| | | /** |
| | | * 添加专家 |
| | |
| | | @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); |
| | |
| | | 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)); |
| | | } |
| | | |