| | |
| | | import com.dg.core.ResultData; |
| | | import com.dg.core.annotation.Authorization; |
| | | import com.dg.core.db.gen.entity.SysUser; |
| | | import com.dg.core.service.IGuideRepairOrderService; |
| | | import com.dg.core.service.ISysUserService; |
| | | import com.dg.core.util.Snowflake; |
| | | import com.dg.core.util.TableDataInfo; |
| | |
| | | @Autowired |
| | | ISysUserService IUserService; |
| | | |
| | | |
| | | @Autowired |
| | | IGuideRepairOrderService iGuideRepairOrderService; |
| | | |
| | | /** |
| | | * 查询列表 |
| | |
| | | return error("昵称不能为空"); |
| | | } |
| | | |
| | | SysUser user = IUserService.getUserByAccount(config.getLoginName()); |
| | | if (user != null) { |
| | | //提示用户名或密码错误 |
| | | return error("该账户已存在!"); |
| | | if(StringUtils.isEmpty(config.getDepartmentId())) |
| | | { |
| | | return error("部门不能为空"); |
| | | } |
| | | |
| | | ResultData data = IUserService.loginByPhonenumber(config.getPhonenumber()); |
| | | if (data != null) |
| | | { |
| | | SysUser user= (SysUser) data.getData(); |
| | | user.setUserType("2"); |
| | | //提示用户名或密码错误 |
| | | return toAjax(IUserService.updateConfig(user)); |
| | | } |
| | | config.setUserType("2"); |
| | | |
| | | config.setCreateTime(LocalDateTime.now()); |
| | |
| | | { |
| | | return error("userId不能为空"); |
| | | } |
| | | |
| | | int a=iGuideRepairOrderService.countUser(userId,"2"); |
| | | if(a>0) |
| | | { |
| | | return error("该人员有工单未处理完不能删除"); |
| | | } |
| | | |
| | | return toAjax(IUserService.deleteConfigById(userId)); |
| | | } |
| | | |