Showing
12 changed files
with
71 additions
and
80 deletions
| ... | @@ -27,7 +27,7 @@ public class ConsignmentValidate { | ... | @@ -27,7 +27,7 @@ public class ConsignmentValidate { |
| 27 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo | 27 | * @return com.fedex.connect.common.dependencies.date.vo.ResponseVo |
| 28 | */ | 28 | */ |
| 29 | public ResponseVo preCheckAdd(AddBo bo){ | 29 | public ResponseVo preCheckAdd(AddBo bo){ |
| 30 | - if (bo == null || StringUtils.isEmpty(bo.getAccountNo()) || StringUtils.isEmpty(bo.getConsignmentCode()) || | 30 | + if (bo == null || StringUtils.isEmpty(bo.getConsignmentCode()) || |
| 31 | StringUtils.isEmpty(bo.getRecipientCountry()) || StringUtils.isEmpty(bo.getShipperAccount()) || | 31 | StringUtils.isEmpty(bo.getRecipientCountry()) || StringUtils.isEmpty(bo.getShipperAccount()) || |
| 32 | StringUtils.isEmpty(bo.getShipperCountry())){ | 32 | StringUtils.isEmpty(bo.getShipperCountry())){ |
| 33 | return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.REQUEST_PARAM_NULL.getMsg())); | 33 | return ResponseVo.fail(localeMessageUtil.getMessage(ResponseCode.REQUEST_PARAM_NULL.getMsg())); | ... | ... |
| 1 | +package com.fedex.connect.common.dependencies.enums.sys; | ||
| 2 | + | ||
| 3 | +public enum RoleEnum { | ||
| 4 | + SYSTEM(0L,"System","系统"), | ||
| 5 | + CUSOTMER(1L,"Cusotmer","用户"), | ||
| 6 | + | ||
| 7 | + ; | ||
| 8 | + | ||
| 9 | + | ||
| 10 | + private Long code; | ||
| 11 | + private String enMsg; | ||
| 12 | + private String msg; | ||
| 13 | + | ||
| 14 | + RoleEnum(Long code, String enMsg,String msg) { | ||
| 15 | + this.code = code; | ||
| 16 | + this.enMsg = enMsg; | ||
| 17 | + this.msg = msg; | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + public Long getCode() { | ||
| 21 | + return code; | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + public void setCode(Long code) { | ||
| 25 | + this.code = code; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + public String getEnMsg() { | ||
| 29 | + return enMsg; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + public void setEnMsg(String enMsg) { | ||
| 33 | + this.enMsg = enMsg; | ||
| 34 | + } | ||
| 35 | + | ||
| 36 | + public String getMsg() { | ||
| 37 | + return msg; | ||
| 38 | + } | ||
| 39 | + | ||
| 40 | + public void setMsg(String msg) { | ||
| 41 | + this.msg = msg; | ||
| 42 | + } | ||
| 43 | +} |
| ... | @@ -3,12 +3,14 @@ package com.fedex.connect.common.dependencies.repository.repo.log.impl; | ... | @@ -3,12 +3,14 @@ package com.fedex.connect.common.dependencies.repository.repo.log.impl; |
| 3 | import com.fedex.connect.common.dependencies.repository.base.BaseDao; | 3 | import com.fedex.connect.common.dependencies.repository.base.BaseDao; |
| 4 | import com.fedex.connect.common.dependencies.repository.repo.log.IOperationRepository; | 4 | import com.fedex.connect.common.dependencies.repository.repo.log.IOperationRepository; |
| 5 | import com.fedex.connect.common.model.log.Operation; | 5 | import com.fedex.connect.common.model.log.Operation; |
| 6 | +import org.springframework.stereotype.Repository; | ||
| 6 | 7 | ||
| 7 | /** | 8 | /** |
| 8 | * @Author mt | 9 | * @Author mt |
| 9 | * @Description 操作日志 | 10 | * @Description 操作日志 |
| 10 | * @Date 2024/11/6 | 11 | * @Date 2024/11/6 |
| 11 | */ | 12 | */ |
| 13 | +@Repository | ||
| 12 | public class OperationRepositoryImpl extends BaseDao implements IOperationRepository { | 14 | public class OperationRepositoryImpl extends BaseDao implements IOperationRepository { |
| 13 | public void insert(Operation record){ | 15 | public void insert(Operation record){ |
| 14 | operationMapper.insert(record); | 16 | operationMapper.insert(record); | ... | ... |
| 1 | package com.fedex.connect.manager.controller.sys.impl; | 1 | package com.fedex.connect.manager.controller.sys.impl; |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | -import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 4 | +import com.fedex.connect.common.dependencies.cache.CacheSystem; |
| 5 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; | 5 | import com.fedex.connect.common.dependencies.date.vo.ResponseVo; |
| 6 | +import com.fedex.connect.common.dependencies.enums.sys.UserLoginTypeEnum; | ||
| 6 | import com.fedex.connect.common.dependencies.util.GsonUtils; | 7 | import com.fedex.connect.common.dependencies.util.GsonUtils; |
| 7 | import com.fedex.connect.common.dependencies.util.StringExtUtil; | 8 | import com.fedex.connect.common.dependencies.util.StringExtUtil; |
| 8 | import com.fedex.connect.common.dependencies.util.Utils; | 9 | import com.fedex.connect.common.dependencies.util.Utils; |
| 10 | +import com.fedex.connect.common.model.bi.DictionaryEntries; | ||
| 9 | import com.fedex.connect.common.model.sys.User; | 11 | import com.fedex.connect.common.model.sys.User; |
| 10 | import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum; | 12 | import com.fedex.connect.manager.common.enums.FCLSessionInfoEnum; |
| 11 | import com.fedex.connect.manager.controller.base.BaseController; | 13 | import com.fedex.connect.manager.controller.base.BaseController; |
| ... | @@ -18,6 +20,7 @@ import io.swagger.annotations.Api; | ... | @@ -18,6 +20,7 @@ import io.swagger.annotations.Api; |
| 18 | import io.swagger.annotations.ApiOperation; | 20 | import io.swagger.annotations.ApiOperation; |
| 19 | import lombok.extern.slf4j.Slf4j; | 21 | import lombok.extern.slf4j.Slf4j; |
| 20 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
| 23 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 21 | import org.springframework.beans.factory.annotation.Value; | 24 | import org.springframework.beans.factory.annotation.Value; |
| 22 | import org.springframework.web.bind.annotation.GetMapping; | 25 | import org.springframework.web.bind.annotation.GetMapping; |
| 23 | import org.springframework.web.bind.annotation.PostMapping; | 26 | import org.springframework.web.bind.annotation.PostMapping; |
| ... | @@ -37,6 +40,9 @@ import java.util.*; | ... | @@ -37,6 +40,9 @@ import java.util.*; |
| 37 | @Api(value="SysAuthController",tags={"用户相关请求(无需token)"}) | 40 | @Api(value="SysAuthController",tags={"用户相关请求(无需token)"}) |
| 38 | public class SysAuthController extends BaseController implements ISysAuthController { | 41 | public class SysAuthController extends BaseController implements ISysAuthController { |
| 39 | 42 | ||
| 43 | + @Autowired | ||
| 44 | + CacheSystem cacheSystem; | ||
| 45 | + | ||
| 40 | 46 | ||
| 41 | @Value("${fcl.interface.logurl}") | 47 | @Value("${fcl.interface.logurl}") |
| 42 | private String fclIndexLoginUrl; | 48 | private String fclIndexLoginUrl; |
| ... | @@ -138,8 +144,10 @@ public class SysAuthController extends BaseController implements ISysAuthControl | ... | @@ -138,8 +144,10 @@ public class SysAuthController extends BaseController implements ISysAuthControl |
| 138 | loginRequest.setRememberMe(true); | 144 | loginRequest.setRememberMe(true); |
| 139 | ResponseVo tokenResult = sysAuthService.createAccessToken(loginRequest, loginUser); | 145 | ResponseVo tokenResult = sysAuthService.createAccessToken(loginRequest, loginUser); |
| 140 | 146 | ||
| 147 | + | ||
| 148 | + DictionaryEntries dicUserLoginType = cacheSystem.getDicUserLoginType(UserLoginTypeEnum.FCLLOGINREGISTRATION.getEnMsg()); | ||
| 141 | //记录日志 | 149 | //记录日志 |
| 142 | - LogLoginDto dto = new LogLoginDto(loginUser.getId(), DatabaseConstants.USER_OPER_FCL_REGISTER, | 150 | + LogLoginDto dto = new LogLoginDto(loginUser.getId(), dicUserLoginType.getId(), |
| 143 | localeMessageUtil.getMessage("auth_login_desc")); | 151 | localeMessageUtil.getMessage("auth_login_desc")); |
| 144 | logLoginService.saveLoginLog(dto); | 152 | logLoginService.saveLoginLog(dto); |
| 145 | 153 | ... | ... |
| ... | @@ -2,6 +2,7 @@ package com.fedex.connect.manager.data.dto; | ... | @@ -2,6 +2,7 @@ package com.fedex.connect.manager.data.dto; |
| 2 | 2 | ||
| 3 | import com.fasterxml.jackson.annotation.JsonIgnore; | 3 | import com.fasterxml.jackson.annotation.JsonIgnore; |
| 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 5 | +import com.fedex.connect.common.dependencies.enums.sys.UserTypeEnum; | ||
| 5 | import com.fedex.connect.common.dependencies.util.Utils; | 6 | import com.fedex.connect.common.dependencies.util.Utils; |
| 6 | import com.fedex.connect.common.model.sys.User; | 7 | import com.fedex.connect.common.model.sys.User; |
| 7 | import io.swagger.annotations.ApiModel; | 8 | import io.swagger.annotations.ApiModel; |
| ... | @@ -46,8 +47,8 @@ public class SysUserDto { | ... | @@ -46,8 +47,8 @@ public class SysUserDto { |
| 46 | } | 47 | } |
| 47 | 48 | ||
| 48 | public SysUserDto(String uuid, String contactname){ | 49 | public SysUserDto(String uuid, String contactname){ |
| 49 | - String fcl_acc_no = DatabaseConstants.FCL_PREFIX + "_" + uuid; | 50 | + String fcl_acc_no = UserTypeEnum.FCL.getEnMsg() + "_" + uuid; |
| 50 | - String fcl_pwd = DatabaseConstants.FCL_PREFIX + "_" + uuid + "_pwd"; | 51 | + String fcl_pwd = uuid + "_pwd"; |
| 51 | 52 | ||
| 52 | this.loginName = uuid; | 53 | this.loginName = uuid; |
| 53 | if (Utils.isNotEmpty(contactname)){ | 54 | if (Utils.isNotEmpty(contactname)){ |
| ... | @@ -63,7 +64,6 @@ public class SysUserDto { | ... | @@ -63,7 +64,6 @@ public class SysUserDto { |
| 63 | this.companyName = null; | 64 | this.companyName = null; |
| 64 | this.unifiedBusinessNum = null; | 65 | this.unifiedBusinessNum = null; |
| 65 | this.customsSerialNum = null; | 66 | this.customsSerialNum = null; |
| 66 | - this.typeCode = DatabaseConstants.DICT_USER_FEDEX_CODE; | ||
| 67 | } | 67 | } |
| 68 | 68 | ||
| 69 | /** | 69 | /** | ... | ... |
| 1 | -package com.fedex.connect.manager.repository.repo.sys; | ||
| 2 | - | ||
| 3 | -import com.fedex.connect.common.model.bi.DictionaryEntries; | ||
| 4 | -import com.fedex.connect.common.model.bi.DictionaryEntriesExample; | ||
| 5 | - | ||
| 6 | -import java.util.List; | ||
| 7 | - | ||
| 8 | -public interface IDictionaryEntriesRepository { | ||
| 9 | - List<DictionaryEntries> selectByExample(DictionaryEntriesExample example); | ||
| 10 | -} |
| 1 | -package com.fedex.connect.manager.repository.repo.sys.impl; | ||
| 2 | - | ||
| 3 | -import com.fedex.connect.common.model.bi.DictionaryEntries; | ||
| 4 | -import com.fedex.connect.common.model.bi.DictionaryEntriesExample; | ||
| 5 | -import com.fedex.connect.manager.repository.base.BaseDao; | ||
| 6 | -import com.fedex.connect.manager.repository.repo.sys.IDictionaryEntriesRepository; | ||
| 7 | -import org.springframework.stereotype.Repository; | ||
| 8 | - | ||
| 9 | -import java.util.List; | ||
| 10 | - | ||
| 11 | -@Repository | ||
| 12 | -public class DictionaryEntriesImpl extends BaseDao implements IDictionaryEntriesRepository { | ||
| 13 | - | ||
| 14 | - @Override | ||
| 15 | - public List<DictionaryEntries> selectByExample(DictionaryEntriesExample example) { | ||
| 16 | - return dictionaryEntriesMapper.selectByExample(example); | ||
| 17 | - } | ||
| 18 | -} |
| ... | @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; | ... | @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; |
| 9 | import java.util.List; | 9 | import java.util.List; |
| 10 | 10 | ||
| 11 | @Repository | 11 | @Repository |
| 12 | -public class RedisSlabRepositoryImpl extends BaseDao implements IRedisSlabRepository { | 12 | +public class RedisSlabExtImpl extends BaseDao implements IRedisSlabRepository { |
| 13 | 13 | ||
| 14 | @Override | 14 | @Override |
| 15 | public int insert(RedisSlab record) { | 15 | public int insert(RedisSlab record) { | ... | ... |
| ... | @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; | ... | @@ -9,7 +9,7 @@ import org.springframework.stereotype.Repository; |
| 9 | import java.util.List; | 9 | import java.util.List; |
| 10 | 10 | ||
| 11 | @Repository | 11 | @Repository |
| 12 | -public class UserRepositoryImpl extends BaseDao implements IUserRepository { | 12 | +public class UserExtRepositoryImpl extends BaseDao implements IUserRepository { |
| 13 | 13 | ||
| 14 | @Override | 14 | @Override |
| 15 | public List<User> selectByExample(UserExample example) { | 15 | public List<User> selectByExample(UserExample example) { | ... | ... |
| 1 | package com.fedex.connect.manager.service.sys.impl; | 1 | package com.fedex.connect.manager.service.sys.impl; |
| 2 | 2 | ||
| 3 | -import com.fedex.connect.common.dependencies.cache.CacheSystem; | ||
| 4 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 3 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 5 | import com.fedex.connect.common.dependencies.util.Utils; | 4 | import com.fedex.connect.common.dependencies.util.Utils; |
| 6 | -import com.fedex.connect.common.model.bi.DictionaryEntries; | ||
| 7 | import com.fedex.connect.common.model.sys.Role; | 5 | import com.fedex.connect.common.model.sys.Role; |
| 8 | import com.fedex.connect.common.model.sys.RoleExample; | 6 | import com.fedex.connect.common.model.sys.RoleExample; |
| 9 | import com.fedex.connect.common.model.sys.UserRole; | 7 | import com.fedex.connect.common.model.sys.UserRole; |
| ... | @@ -16,11 +14,7 @@ import org.slf4j.LoggerFactory; | ... | @@ -16,11 +14,7 @@ import org.slf4j.LoggerFactory; |
| 16 | import org.springframework.stereotype.Service; | 14 | import org.springframework.stereotype.Service; |
| 17 | import org.springframework.transaction.annotation.Transactional; | 15 | import org.springframework.transaction.annotation.Transactional; |
| 18 | 16 | ||
| 19 | -import java.util.Date; | ||
| 20 | import java.util.List; | 17 | import java.util.List; |
| 21 | -import java.util.Map; | ||
| 22 | -import java.util.Objects; | ||
| 23 | -import java.util.stream.Collectors; | ||
| 24 | 18 | ||
| 25 | /** | 19 | /** |
| 26 | * 处理角色相关Service | 20 | * 处理角色相关Service |
| ... | @@ -94,32 +88,7 @@ public class SysRoleServiceImpl extends BaseService implements ISysRoleService { | ... | @@ -94,32 +88,7 @@ public class SysRoleServiceImpl extends BaseService implements ISysRoleService { |
| 94 | criteria.andStatusEqualTo(DatabaseConstants.GLOBAL_STATUS_VALID); | 88 | criteria.andStatusEqualTo(DatabaseConstants.GLOBAL_STATUS_VALID); |
| 95 | criteria.andCodeEqualTo(roleCode); | 89 | criteria.andCodeEqualTo(roleCode); |
| 96 | List<Role> roleInfoList = roleRepository.selectByExample(example); | 90 | List<Role> roleInfoList = roleRepository.selectByExample(example); |
| 97 | - | ||
| 98 | - //如果不存在,创建默认角色 | ||
| 99 | - if (roleInfoList == null || roleInfoList.isEmpty()){ | ||
| 100 | - Role defaultRole = new Role(); | ||
| 101 | - defaultRole.setCode(DatabaseConstants.DICT_ROLE_DEFAULT_CODE); | ||
| 102 | - defaultRole.setName(DatabaseConstants.DICT_ROLE_DEFAULT_CODE.toUpperCase()); | ||
| 103 | - defaultRole.setRoleDesc(DatabaseConstants.DICT_ROLE_DEFAULT_CODE.toUpperCase()); | ||
| 104 | - | ||
| 105 | - //从数据字典获取角色类型 | ||
| 106 | - List<DictionaryEntries> userTypeList = CacheSystem.dictionaryMap.get(DatabaseConstants.DICT_ROLE_GOOUP_CODE); | ||
| 107 | - if (userTypeList != null && !userTypeList.isEmpty()){ | ||
| 108 | - Map<String,DictionaryEntries> userTypeDictMap = Utils.listOf(userTypeList).stream().filter(Objects::nonNull) | ||
| 109 | - .collect(Collectors.toMap(DictionaryEntries::getCode, d -> d)); | ||
| 110 | - DictionaryEntries dictionary = userTypeDictMap.get(DatabaseConstants.DICT_ROLE_DEFAULT_CODE); | ||
| 111 | - defaultRole.setTypeId(dictionary == null ? 0 : dictionary.getId()); | ||
| 112 | - } else { | ||
| 113 | - defaultRole.setTypeId(0L); | ||
| 114 | - } | ||
| 115 | - defaultRole.setStatus(DatabaseConstants.GLOBAL_STATUS_VALID); | ||
| 116 | - defaultRole.setCreateTime(new Date()); | ||
| 117 | - save(defaultRole); | ||
| 118 | - | ||
| 119 | - return defaultRole; | ||
| 120 | - } else { | ||
| 121 | return roleInfoList.get(0); | 91 | return roleInfoList.get(0); |
| 122 | - } | ||
| 123 | } catch (Exception e){ | 92 | } catch (Exception e){ |
| 124 | log.error(LogShowModel.showException("Exception",e)); | 93 | log.error(LogShowModel.showException("Exception",e)); |
| 125 | return null; | 94 | return null; | ... | ... |
| ... | @@ -4,6 +4,7 @@ import com.fedex.connect.common.dependencies.arithmetic.AESUtil; | ... | @@ -4,6 +4,7 @@ import com.fedex.connect.common.dependencies.arithmetic.AESUtil; |
| 4 | import com.fedex.connect.common.dependencies.authentication.EncryptProvider; | 4 | import com.fedex.connect.common.dependencies.authentication.EncryptProvider; |
| 5 | import com.fedex.connect.common.dependencies.cache.CacheSystem; | 5 | import com.fedex.connect.common.dependencies.cache.CacheSystem; |
| 6 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; | 6 | import com.fedex.connect.common.dependencies.contants.DatabaseConstants; |
| 7 | +import com.fedex.connect.common.dependencies.enums.sys.RoleEnum; | ||
| 7 | import com.fedex.connect.common.dependencies.util.Utils; | 8 | import com.fedex.connect.common.dependencies.util.Utils; |
| 8 | import com.fedex.connect.common.model.bi.DictionaryEntries; | 9 | import com.fedex.connect.common.model.bi.DictionaryEntries; |
| 9 | import com.fedex.connect.common.model.sys.Role; | 10 | import com.fedex.connect.common.model.sys.Role; |
| ... | @@ -24,7 +25,6 @@ import org.springframework.stereotype.Service; | ... | @@ -24,7 +25,6 @@ import org.springframework.stereotype.Service; |
| 24 | import org.springframework.transaction.annotation.Transactional; | 25 | import org.springframework.transaction.annotation.Transactional; |
| 25 | 26 | ||
| 26 | import java.util.List; | 27 | import java.util.List; |
| 27 | -import java.util.Map; | ||
| 28 | import java.util.Objects; | 28 | import java.util.Objects; |
| 29 | import java.util.stream.Collectors; | 29 | import java.util.stream.Collectors; |
| 30 | 30 | ||
| ... | @@ -42,6 +42,9 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { | ... | @@ -42,6 +42,9 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { |
| 42 | @Autowired | 42 | @Autowired |
| 43 | private ISysUserRoleService sysUserRoleService; | 43 | private ISysUserRoleService sysUserRoleService; |
| 44 | 44 | ||
| 45 | + @Autowired | ||
| 46 | + CacheSystem cacheSystem; | ||
| 47 | + | ||
| 45 | /** | 48 | /** |
| 46 | * 邮件过期时间 | 49 | * 邮件过期时间 |
| 47 | */ | 50 | */ |
| ... | @@ -55,7 +58,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { | ... | @@ -55,7 +58,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { |
| 55 | */ | 58 | */ |
| 56 | public User findUserByFcl(String fclUuid){ | 59 | public User findUserByFcl(String fclUuid){ |
| 57 | try{ | 60 | try{ |
| 58 | - String fcl_pwd = DatabaseConstants.FCL_PREFIX + "_" + fclUuid + "_pwd"; | 61 | + String fcl_pwd = fclUuid + "_pwd"; |
| 59 | 62 | ||
| 60 | UserExample example = new UserExample(); | 63 | UserExample example = new UserExample(); |
| 61 | UserExample.Criteria criteria = example.createCriteria(); | 64 | UserExample.Criteria criteria = example.createCriteria(); |
| ... | @@ -87,14 +90,10 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { | ... | @@ -87,14 +90,10 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { |
| 87 | try{ | 90 | try{ |
| 88 | User user = SysUserDto.dtoToDao(dto); | 91 | User user = SysUserDto.dtoToDao(dto); |
| 89 | //从数据字典获取用户类型 | 92 | //从数据字典获取用户类型 |
| 90 | - List<DictionaryEntries> userTypeList = CacheSystem.dictionaryMap.get(DatabaseConstants.DICT_USER_GOOUP_CODE); | 93 | + DictionaryEntries dicUserType = cacheSystem.getDicUserType(dto.getTypeCode()); |
| 91 | - if (Utils.isNotEmpty(userTypeList)){ | 94 | + if (dicUserType != null){ |
| 92 | - //从数据字典中获取用户类型 | 95 | + user.setTypeId(dicUserType.getId()); |
| 93 | - Map<String,DictionaryEntries> userTypeDictMap = Utils.listOf(userTypeList).stream().filter(Objects::nonNull) | 96 | + }else { |
| 94 | - .collect(Collectors.toMap(DictionaryEntries::getCode, d -> d)); | ||
| 95 | - DictionaryEntries dictionary = userTypeDictMap.get(dto.getTypeCode()); | ||
| 96 | - user.setTypeId(dictionary == null ? 0 : dictionary.getId()); | ||
| 97 | - } else{ | ||
| 98 | user.setTypeId(0L); | 97 | user.setTypeId(0L); |
| 99 | } | 98 | } |
| 100 | //对新增账户的密码进行加密 | 99 | //对新增账户的密码进行加密 |
| ... | @@ -111,7 +110,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { | ... | @@ -111,7 +110,7 @@ public class SysUserServiceImpl extends BaseService implements ISysUserService { |
| 111 | 110 | ||
| 112 | //当前阶段,权限采用默认权限 | 111 | //当前阶段,权限采用默认权限 |
| 113 | if (saveUserCt > 0){ | 112 | if (saveUserCt > 0){ |
| 114 | - Role roleInfo = sysRoleService.findRoleByCode(DatabaseConstants.DICT_ROLE_DEFAULT_CODE); | 113 | + Role roleInfo = sysRoleService.findRoleByCode(RoleEnum.CUSOTMER.getEnMsg()); |
| 115 | //创建用户角色对应关系 | 114 | //创建用户角色对应关系 |
| 116 | sysUserRoleService.save(user.getId(), roleInfo.getId()); | 115 | sysUserRoleService.save(user.getId(), roleInfo.getId()); |
| 117 | } | 116 | } | ... | ... |
-
Please register or login to post a comment