修改商业合作伙伴推送-各组织独立问题
This commit is contained in:
+15
-2
@@ -17,6 +17,7 @@ import org.springframework.stereotype.Service;
|
|||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -55,8 +56,20 @@ public class GwLogApplicationService {
|
|||||||
if(po1.isEmpty()){
|
if(po1.isEmpty()){
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
GwLogPO po = po1.get(0);
|
// 商业合作伙伴按组织隔离,只返回当前组织的报文
|
||||||
return po;
|
if ("商业合作伙伴".equals(gwLog.getType())) {
|
||||||
|
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||||
|
if (loginUser != null && loginUser.getUserPo() != null) {
|
||||||
|
Long orgId = loginUser.getUserPo().getOrganizationId();
|
||||||
|
po1 = po1.stream()
|
||||||
|
.filter(p -> orgId.equals(p.getOrganizationId()))
|
||||||
|
.collect(Collectors.toList());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(po1.isEmpty()){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
return po1.get(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
public AjaxResult insertGwLog(GwLogDTO gwLogDTO) {
|
public AjaxResult insertGwLog(GwLogDTO gwLogDTO) {
|
||||||
|
|||||||
Reference in New Issue
Block a user