lidongdong
2022-10-19 de1e3af81b7dbde6f077f2abeacda7059fee21bb
flower_city/src/main/java/com/dg/core/controller/GuideDoController.java
@@ -87,13 +87,20 @@
            return error("昵称不能为空");
        }
        SysUser user = IUserService.getUserByAccount(config.getLoginName());
        if (user != null) {
            //提示用户名或密码错误
            return error("该账户已存在!");
        if(StringUtils.isEmpty(config.getDepartmentId()))
        {
            return error("部门不能为空");
        }
        config.setUserType("2");
        SysUser user=IUserService.selectData(null,config.getPhonenumber());
        if (user != null)
        {
            config.setId(user.getId());
            //提示用户名或密码错误
            return toAjax(IUserService.updateConfig(config));
        }
        config.setCreateTime(LocalDateTime.now());
        config.setUpdateTime(LocalDateTime.now());
@@ -190,7 +197,8 @@
    @GetMapping("/selectListByDepartmentId")
    @Authorization
    public ResultData selectListByDepartmentId(@RequestParam("departmentId") String departmentId,
                                               @RequestParam(value = "classifyId",required = false) String classifyId){
                                               @RequestParam(value = "classifyId",required = false) String classifyId)
    {
        return  ResultData.success(IUserService.selectListByDepartmentId(departmentId,classifyId));
    }