修改商业合作伙伴推送-各组织独立问题

This commit is contained in:
zhaoqing
2026-06-11 20:40:50 +08:00
parent fb5da8eda1
commit 04d24f1c11
3 changed files with 14 additions and 7 deletions
@@ -208,15 +208,12 @@ public class UserShipperApplicationService {
@NeedSetValueMethod
public List<UserShipperPo> userShipperListAllOrgs(UserShipperDO userShipperDO) {
LoginUser loginUser = SecurityUtils.getLoginUser();
if (loginUser == null || loginUser.getUserPo() == null) {
log.warn("托运人列表查询(所有组织)- 未获取到登录用户信息");
List<UserShipperPo> userShipperList = userShipperDomainService.userShipperList(userShipperDO);
return processShipperList(userShipperList);
if (loginUser != null && loginUser.getUserPo() != null) {
userShipperDO.setPushQueryOrgId(loginUser.getUserPo().getOrganizationId());
}
userShipperDO.setPushQueryOrgId(loginUser.getUserPo().getOrganizationId());
// 不做任何组织权限过滤,前端传了 org 就按 org 查,没传就看全部
log.info("托运人列表查询(所有组织)- organizationId={}", userShipperDO.getOrganizationId());
List<UserShipperPo> userShipperList = userShipperDomainService.userShipperList(userShipperDO);
// 直接走新 mapper 查询,不做组织权限过滤
List<UserShipperPo> userShipperList = userShipperMapper.selectListAllOrgs(userShipperDO);
return processShipperList(userShipperList);
}
@@ -15,6 +15,8 @@ public interface UserShipperMapper extends BaseMapper<UserShipperEntity> {
List<UserShipperPo> selectList(UserShipperDO userShipperDO);
List<UserShipperPo> selectListAllOrgs(UserShipperDO userShipperDO);
UserShipperPo selectByUserId(Long userId);
UserShipperPo findByShipperId(Long shipperId);
@@ -190,6 +190,14 @@
ORDER BY a.create_time DESC
</select>
<select id="selectListAllOrgs" parameterType="com.mhd.user.domain.userAggregate.repository.todo.UserShipperDO"
resultType="com.mhd.user.domain.userAggregate.repository.po.UserShipperPo">
<include refid="selectShipperVo1"/>
<include refid="common_where"></include>
GROUP BY a.user_id
ORDER BY a.create_time DESC
</select>
<select id="selectByUserId" parameterType="java.lang.Long"
resultType="com.mhd.user.domain.userAggregate.repository.po.UserShipperPo">
<include refid="selectShipperVo"/>