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));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -18,17 +18,17 @@ spring:
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.102.192.5:6848
|
||||
# server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
config:
|
||||
# server-addr: 127.0.0.1:8848
|
||||
server-addr: 127.0.0.1:8848
|
||||
# 线上测试环境配置 容器名+端口号
|
||||
# server-addr: 10.33.0.129:6010
|
||||
server-addr: 10.102.192.5:6848
|
||||
# server-addr: 10.102.192.5:6848
|
||||
username: nacos
|
||||
password: manhuoda@2023
|
||||
group: DEFAULT_GROUP # 默认分组就是DEFAULT_GROUP,如果使用默认分组可以不配置
|
||||
|
||||
@@ -70,7 +70,16 @@
|
||||
a.department_id,
|
||||
a.ding_user_id,
|
||||
a.ding_dept_id,
|
||||
a.validity_period_management,a.salesperson_nc_code,a.document_preparer_nc_code
|
||||
a.validity_period_management,a.salesperson_nc_code,a.document_preparer_nc_code,
|
||||
a.legal_representative,
|
||||
a.unified_code,
|
||||
a.registered_phone,
|
||||
a.registered_address,
|
||||
a.fax,
|
||||
a.payment_bank,
|
||||
a.payment_account,
|
||||
a.invoice_title,
|
||||
a.tax_number
|
||||
FROM "USER" a
|
||||
where a.del_flag = 1
|
||||
</sql>
|
||||
@@ -131,6 +140,9 @@
|
||||
<include refid="selectUserVo"/>
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
and a.user_account = #{userAccount}
|
||||
<if test="roleCode != null and roleCode != ''">
|
||||
and a.role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="userId !=null and userId !='' ">
|
||||
and a.user_id != #{userId}
|
||||
</if>
|
||||
@@ -159,6 +171,10 @@
|
||||
and a.user_id = #{value}
|
||||
</select>
|
||||
|
||||
<select id="selectByUserName" parameterType="java.lang.String" resultType="com.mhd.common.core.domain.po.UserPo">
|
||||
<include refid="selectUserVo"/>
|
||||
and a.user_name = #{value}</select>
|
||||
|
||||
|
||||
<!-- 根据用户手机号查询自己以外的用户 -->
|
||||
<select id="findByTopOrganizationIdAndUserPhone"
|
||||
@@ -170,6 +186,9 @@
|
||||
</if>
|
||||
and a.user_phone = #{userPhone}
|
||||
and a.top_organization_id = #{topOrganizationId}
|
||||
<if test="roleCode != null and roleCode != ''">
|
||||
and a.role_code = #{roleCode}
|
||||
</if>
|
||||
<if test="userId !=null and userId !='' ">
|
||||
and a.user_id != #{userId}
|
||||
</if>
|
||||
@@ -213,6 +232,13 @@
|
||||
OR a.create_by = #{createBy})
|
||||
</if>
|
||||
|
||||
<if test="userIds !=null and userIds.size() > 0 ">
|
||||
and a.user_id in
|
||||
<foreach item="id" collection="userIds" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
|
||||
<if test="userId !=null and userId !='' ">
|
||||
and a.user_id = #{userId}
|
||||
</if>
|
||||
@@ -386,14 +412,6 @@
|
||||
<if test="userMemberCode != null and userMemberCode != ''">
|
||||
and a.user_member_code = #{userMemberCode}
|
||||
</if>
|
||||
/*联系人*/
|
||||
<if test="emergencyContactName != null and emergencyContactName != ''">
|
||||
and a.emergency_contact_name = #{emergencyContactName}
|
||||
</if>
|
||||
/*联系电话*/
|
||||
<if test="emergencyContactPhone != null and emergencyContactPhone != ''">
|
||||
and a.emergency_contact_phone = #{emergencyContactPhone}
|
||||
</if>
|
||||
/*详细地址*/
|
||||
<if test="userAreaAddress != null and userAreaAddress != ''">
|
||||
and a.user_area_address like concat('%' , #{userAreaAddress} , '%')
|
||||
@@ -406,6 +424,9 @@
|
||||
<if test="emergencyContactPhone != null and emergencyContactPhone != ''">
|
||||
and a.emergency_contact_phone like concat('%' , #{emergencyContactPhone} , '%')
|
||||
</if>
|
||||
<if test="userAreaCountyId != null and userAreaCountyId != ''">
|
||||
and a.user_area_county_id = #{userAreaCountyId}
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="selectAppUserList" resultType="com.mhd.common.core.domain.po.app.UserAppPo" parameterType="com.mhd.user.domain.userAggregate.repository.todo.UserDO">
|
||||
|
||||
@@ -381,4 +381,4 @@
|
||||
and esign_enterprise_status = #{userShipperEntity.esignEnterpriseStatus}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user