Bläddra i källkod

Merge branch 'div-20251104' of http://git.dgtis.com/qxp/suishenbang-oneportal into div-20251104

yanym 3 veckor sedan
förälder
incheckning
660bdc23fc

+ 2 - 0
suishenbang-system/src/main/java/com/dgtly/system/service/IAlertConfigurationService.java

@@ -22,6 +22,8 @@ public interface IAlertConfigurationService
 
     public AlertConfiguration selectAlertConfigurationByAlertStatus(String orgCode);
 
+    public AlertConfiguration selectAlertConfiguration();
+
     /**
      * 查询弹框配置列表
      * 

+ 18 - 0
suishenbang-system/src/main/java/com/dgtly/system/service/impl/AlertConfigurationServiceImpl.java

@@ -61,6 +61,24 @@ public class AlertConfigurationServiceImpl implements IAlertConfigurationService
         return  null;
     }
 
+    @Override
+    public AlertConfiguration selectAlertConfiguration() {
+        //查询有效弹窗
+        List<AlertConfiguration> alertConfigurationList = alertConfigurationMapper.selectAlertConfigurationByAlertStatus();
+        if(alertConfigurationList !=null && alertConfigurationList.size()> 0 ){
+            //判断弹框的组织 如果弹框有组织 对比该组织与员工的组织是否一致
+            Iterator<AlertConfiguration> it = alertConfigurationList.iterator();
+            while (it.hasNext()) {
+                AlertConfiguration alert = it.next();
+                //diy
+                if( alert.getOrgCode() ==null || ("null").equals(alert.getOrgCode())){
+                    return alert;
+                }
+            }
+        }
+        return  null;
+    }
+
     /**
      * 查询弹框配置列表
      * 

+ 9 - 4
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxAlertLogController.java

@@ -57,15 +57,20 @@ public class WxAlertLogController  extends ApiBaseController {
         Set<String> userTypeSet = new HashSet<>();
         SysUserExt sysUserExt = sysUserExtService.selectSysUserExtById(userId);
         List<SysUserShopExt>  sysUserShopExt = sysUserShopExtService.selectSysUserShopExtById(obj.getString("userId"));
-        if (sysUserShopExt != null && sysUserShopExt.size() > 0){
-            for (SysUserShopExt shopExt : sysUserShopExt){
+        if (sysUserShopExt != null && sysUserShopExt.size() > 0) {
+            for (SysUserShopExt shopExt : sysUserShopExt) {
                 userTypeSet.add(shopExt.getIsShopType());
             }
         }
+        AlertConfiguration alertConfiguration1 = null;
+        if (sysUserExt != null){
+            alertConfiguration1 = alertConfigurationService.selectAlertConfigurationByAlertStatus(sysUserExt.getOrgCode());
+        }else {
+            alertConfiguration1 = alertConfigurationService. selectAlertConfiguration();
+        }
         //是否有启动弹窗
-        AlertConfiguration alertConfiguration1 = alertConfigurationService.selectAlertConfigurationByAlertStatus(sysUserExt.getOrgCode());
 
-        if (alertConfiguration1!=null){
+        if (alertConfiguration1 != null){
             //有启动
             alertConfiguration1.setIsClearCache(false);
             Date datez = new Date();