forked from kidgrow-microservices-platform

zxh
2020-08-20 f5416d4f90125564a4e2281c011e6001fd5842bd
kidgrow-business/kidgrow-usercenter/kidgrow-usercenter-biz/src/main/java/com/kidgrow/usercenter/service/impl/SysUserServiceImpl.java
@@ -59,12 +59,14 @@
    private final static String LOCK_KEY_USERNAME = CommonConstant.LOCK_KEY_PREFIX + "username:";
    @Autowired
    private PasswordEncoder passwordEncoder;
    @Resource
    private ISysRoleUserService roleUserService;
    @Resource
    private ISysDictionariesService sysDictionariesService;
    @Resource
    private SysRoleMenuMapper roleMenuMapper;
    @Autowired
    private ISysOrganizationService organizationService;
    @Autowired
@@ -81,6 +83,7 @@
    private DistributedLock lock;
    @Autowired
    private SysDoctorMapper sysDoctorMapper;
    @Autowired
    private SysRoleMapper sysRoleMapper;
    @Autowired
@@ -94,7 +97,12 @@
    @Override
    public LoginAppUser findByUsername(String username) {
        SysUser sysUser = this.selectByUsername(username);
        return getLoginAppUser(sysUser);
        if(sysUser==null){
            return null;
        }
        else {
            return getLoginAppUser(sysUser);
        }
    }
    @Override
@@ -465,7 +473,7 @@
    @Override
    public ResultBody findCountByMap(Map<String, Object> map) {
        map.put("enable",1);
        map.put("is_del",0);
        map.put("isDel",0);
        Integer integer = baseMapper.selectCountByMap(map);
        return ResultBody.ok().data(integer);
    }
@@ -847,6 +855,7 @@
                                sysDoctor.setServerUserId(isReg ? createUserId : sysUserd.getId());
                                sysDoctor.setServerUserName(isReg ? createUserName : sysUserd.getUsername());
                                sysDoctor.setIsAdminUser(false);
                                sysDoctor.setDoctorCcie(userRegVo.getDoctorCcie());
                                sysDoctor.setEnabled(true);
                                if (sysDoctorMapper.insert(sysDoctor) == 1) {
                                    //非自主注册的 返回信息带密码