Merge branch 'wms_dev' into wms_dev_hbbf
# Conflicts: # mhd-api/mhd-api-system/src/main/java/com/mhd/system/api/UserServiceFeign.java # mhd_oms/pom.xml
This commit is contained in:
+8
@@ -157,6 +157,10 @@ public class CommonApplicationService {
|
||||
UserDO queryAccount = new UserDO();
|
||||
queryAccount.setTopOrganizationId(topOrganizationId);
|
||||
queryAccount.setUserAccount(userDO.getUserAccount());
|
||||
// 如果指定了角色,只检查相同角色的用户
|
||||
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
|
||||
queryAccount.setRoleCode(userDO.getRoleCode());
|
||||
}
|
||||
userPo = userDomainService.findByTopOrganizationIdAndUserAccount(queryAccount);
|
||||
}
|
||||
//根据手机号查询
|
||||
@@ -165,6 +169,10 @@ public class CommonApplicationService {
|
||||
UserDO queryPhone = new UserDO();
|
||||
queryPhone.setTopOrganizationId(topOrganizationId);
|
||||
queryPhone.setUserPhone(userDO.getUserPhone());
|
||||
// 如果指定了角色,只检查相同角色的用户
|
||||
if (StrUtil.isNotEmpty(userDO.getRoleCode())) {
|
||||
queryPhone.setRoleCode(userDO.getRoleCode());
|
||||
}
|
||||
userPoTwo = userDomainService.findByTopOrganizationIdAndUserPhone(queryPhone);
|
||||
}
|
||||
//根据身份证号查询
|
||||
|
||||
+31
-5
@@ -441,6 +441,32 @@ public class UserApplicationService {
|
||||
return userPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 根据用户ID获取用户信息
|
||||
* @Author Alex
|
||||
* @Date 2022/12/20 17:12
|
||||
*/
|
||||
public UserPo selectByUserName(String userName) {
|
||||
if (StringUtils.isEmpty(userName)) {
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
userName = loginUser.getUsername();
|
||||
}
|
||||
UserPo userPo = userDomainService.selectByUserName(userName);
|
||||
if (userPo != null){
|
||||
userPo.setPrincipalAccount(userPo.getUserAccount());
|
||||
}
|
||||
if (StringUtils.isNotEmpty(userPo.getRoleCode())){
|
||||
String[] split = userPo.getRoleCode().split(";");
|
||||
List<String> list = CollectionUtil.toList(split);
|
||||
userPo.setRoleCodeList(list);
|
||||
}
|
||||
UserShipperPo userShipperPo = userShipperDomainService.selectByUserId(userPo.getUserId());
|
||||
if(null != userShipperPo){
|
||||
userPo.setEsignEnterpriseStatus(userShipperPo.getEsignEnterpriseStatus());
|
||||
}
|
||||
return userPo;
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 分配用户默认普通用户角色
|
||||
* @Author Alex
|
||||
@@ -1196,7 +1222,7 @@ public class UserApplicationService {
|
||||
(userDO.getUserAccountType() == null || userDO.getUserAccountType() < 4)) {
|
||||
//给用户分配默认普通角色权限
|
||||
RoleDo roleDo = new RoleDo();
|
||||
roleDo.setRoleCode(RoleEnum.MUST.getCode());
|
||||
roleDo.setRoleCode(RoleEnum.OWNER_CARGO.getCode());
|
||||
roleDo.setOrganizationId(userEntity.getOrganizationId());
|
||||
RoleEntity roleEntity = roleDomainService.selectByOrganizationIdAndRoleCode(roleDo);
|
||||
if (roleEntity != null) {
|
||||
@@ -1206,8 +1232,8 @@ public class UserApplicationService {
|
||||
userDO.setRoleId(roleEntity.getRoleId());
|
||||
userRoleDomainService.addUserRole(userRoleDo);
|
||||
}
|
||||
userDO.setRoleCode(RoleEnum.MUST.getCode());
|
||||
userDO.setRoleName(RoleEnum.MUST.getName());
|
||||
userDO.setRoleCode(RoleEnum.OWNER_CARGO.getCode());
|
||||
userDO.setRoleName(RoleEnum.OWNER_CARGO.getName());
|
||||
userDO.setUserId(userEntity.getUserId());
|
||||
userDomainService.updateUser(userDO);
|
||||
}else{
|
||||
@@ -4913,7 +4939,7 @@ public class UserApplicationService {
|
||||
Map<String, SysDepartInterfaceInfoPo> sysDepartInterfaceInfoPoMap = sysDepartInterfaceInfoPos.stream().collect(Collectors.toMap(SysDepartInterfaceInfoPo::getInterfaceTypeKey, Function.identity()));
|
||||
SysDepartInterfaceInfoPo sysDepartInterfaceInfoPo = sysDepartInterfaceInfoPoMap.get("isWT");
|
||||
//是否开启
|
||||
if ("1".equals(sysDepartInterfaceInfoPo.getInterfaceTypeValue())) {
|
||||
if (sysDepartInterfaceInfoPo != null && "1".equals(sysDepartInterfaceInfoPo.getInterfaceTypeValue())) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
@@ -4969,4 +4995,4 @@ public class UserApplicationService {
|
||||
public UserPo selectUserTableByUserId(Long userId){
|
||||
return userDomainService.selectByUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+27
@@ -165,4 +165,31 @@ public class UserEntity extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
}
|
||||
|
||||
+3
-2
@@ -27,6 +27,8 @@ public interface UserRepositoryInterface extends IService<UserEntity> {
|
||||
UserPo findAdminUserByOrganizationId(UserDO userDO);
|
||||
|
||||
UserPo findByUserId(Long userId);
|
||||
UserPo selectByUserName(String userName);
|
||||
|
||||
|
||||
UserPo findByTopOrganizationIdAndUserAccount(UserDO userDO);
|
||||
UserPo getUserByDingUserId(String dingUserId);
|
||||
@@ -73,5 +75,4 @@ public interface UserRepositoryInterface extends IService<UserEntity> {
|
||||
|
||||
|
||||
String finShipperEnterpriseNamedByUserId(Long userId);
|
||||
}
|
||||
|
||||
}
|
||||
+1
-1
@@ -60,4 +60,4 @@ public interface UserShipperRepositoryInterface extends IService<UserShipperEnti
|
||||
SettlementInfoQueryVo getSettlementInfoByUserId(Long userId);
|
||||
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
|
||||
}
|
||||
}
|
||||
+3
-1
@@ -24,6 +24,8 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
||||
|
||||
UserPo selectByUserId(Long userId);
|
||||
|
||||
UserPo selectByUserName(String userName);
|
||||
|
||||
UserPo selectUserShipperList(UserPo userPo);
|
||||
|
||||
List<UserPo> selectUserShipperListWaybill(UserPo userPo);
|
||||
@@ -72,4 +74,4 @@ public interface UserMapper extends BaseMapper<UserEntity> {
|
||||
|
||||
|
||||
String finShipperEnterpriseNamedByUserId(@Param("userId") Long userId);
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -28,4 +28,4 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
|
||||
List<UserShipperEntity> selectBySealId(@Param("userShipperEntity") UserShipperEntity userShipperEntity);
|
||||
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId);
|
||||
}
|
||||
}
|
||||
+6
-1
@@ -64,6 +64,11 @@ public class UserRepositoryImpl extends ServiceImpl<UserMapper,UserEntity> imple
|
||||
return userMapper.selectByUserId(userId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserPo selectByUserName(String userName) {
|
||||
return userMapper.selectByUserName(userName);
|
||||
}
|
||||
|
||||
@Override
|
||||
public UserEntity selectById(Long userId) {
|
||||
return userMapper.selectById(userId);
|
||||
@@ -168,4 +173,4 @@ public class UserRepositoryImpl extends ServiceImpl<UserMapper,UserEntity> imple
|
||||
public String finShipperEnterpriseNamedByUserId(Long userId) {
|
||||
return userMapper.finShipperEnterpriseNamedByUserId(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -166,4 +166,4 @@ public class UserShipperRepositoryImpl extends ServiceImpl<UserShipperMapper, Us
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
|
||||
return shipperMapper.getShipperSummaryData(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
+33
@@ -45,4 +45,37 @@ public class CustomerDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "用户ID集合")
|
||||
private List<Long> userIds;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String userRemark;
|
||||
}
|
||||
|
||||
+27
@@ -254,4 +254,31 @@ public class UserDO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty(name = "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
}
|
||||
|
||||
+5
-1
@@ -125,6 +125,10 @@ public class UserDomainService {
|
||||
return userRepositoryInterface.findByUserId(userId);
|
||||
}
|
||||
|
||||
public UserPo selectByUserName(String userName) {
|
||||
return userRepositoryInterface.selectByUserName(userName);
|
||||
}
|
||||
|
||||
public void updateWhenLogin(UserDO userDO) {
|
||||
userRepositoryInterface.update(new UpdateWrapper<UserEntity>().lambda()
|
||||
.set(UserEntity::getLastLoginIp,userDO.getLastLoginIp()).set(UserEntity::getLastLoginTime,userDO.getLastLoginTime())
|
||||
@@ -259,4 +263,4 @@ public class UserDomainService {
|
||||
.set(UserEntity::getHasDefaultAddress, dto.getHasDefaultAddress())
|
||||
.eq(UserEntity::getUserId, dto.getUserId()));
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -236,4 +236,4 @@ public class UserShipperDomainService {
|
||||
public com.mhd.common.core.domain.po.UserShipperPo getShipperSummaryData(Long userId) {
|
||||
return userShipperRepositoryInterface.getShipperSummaryData(userId);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -47,4 +47,36 @@ public class CustomerDTO extends BaseVOEntity {
|
||||
@ApiModelProperty("详细地址")
|
||||
private String userAreaAddress;
|
||||
|
||||
@ApiModelProperty("法人代表")
|
||||
private String legalRepresentative;
|
||||
|
||||
@ApiModelProperty("统一编码")
|
||||
private String unifiedCode;
|
||||
|
||||
@ApiModelProperty("注册电话")
|
||||
private String registeredPhone;
|
||||
|
||||
@ApiModelProperty("注册地址")
|
||||
private String registeredAddress;
|
||||
|
||||
@ApiModelProperty("传真")
|
||||
private String fax;
|
||||
|
||||
@ApiModelProperty("付款银行")
|
||||
private String paymentBank;
|
||||
|
||||
@ApiModelProperty("付款账户")
|
||||
private String paymentAccount;
|
||||
|
||||
@ApiModelProperty("发票抬头")
|
||||
private String invoiceTitle;
|
||||
|
||||
@ApiModelProperty("税号")
|
||||
private String taxNumber;
|
||||
|
||||
@ApiModelProperty(name = "邮箱")
|
||||
private String userEmail;
|
||||
|
||||
@ApiModelProperty(name = "备注")
|
||||
private String userRemark;
|
||||
}
|
||||
|
||||
@@ -241,4 +241,10 @@ public class UserDTO extends BaseVOEntity {
|
||||
|
||||
@ApiModelProperty( "制单员nc编码")
|
||||
private String documentPreparerNcCode;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系人姓名")
|
||||
private String emergencyContactName;
|
||||
|
||||
@ApiModelProperty(value = "紧急联系电话")
|
||||
private String emergencyContactPhone;
|
||||
}
|
||||
|
||||
@@ -201,6 +201,14 @@ public class UserAPI extends BaseController {
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
@Log(title = "用户中台管理-查询", description ="根据用户ID查询用户详细信息",businessType = BusinessType.INQUIRE)
|
||||
@ApiOperation("根据用户ID查询用户详细信息")
|
||||
@GetMapping("/getInfoByName/{userName}")
|
||||
public AjaxResult getInfoByName(@PathVariable("userName") String userName) {
|
||||
UserPo userPo = userApplicationService.selectByUserName(userName);
|
||||
return AjaxResult.success(userPo);
|
||||
}
|
||||
|
||||
/**
|
||||
* @Description 新增租户,新增货主,新增司机,新增员工,用户注册等
|
||||
* @Author Alex
|
||||
@@ -946,4 +954,4 @@ public class UserAPI extends BaseController {
|
||||
public R<String> finShipperEnterpriseNamedByUserId(@PathVariable("userId") Long userId) {
|
||||
return R.ok(userApplicationService.finShipperEnterpriseNamedByUserId(userId));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user