njs il y a 1 an
Parent
commit
cd7c2bbc31

+ 1 - 2
suishenbang-system/src/main/java/com/dgtly/system/domain/AlertConfiguration.java

@@ -64,8 +64,7 @@ public class AlertConfiguration extends BaseEntity
     private String photoUrl;
 
 
-
-    public void setAlertId(Long alertId) 
+    public void setAlertId(Long alertId)
     {
         this.alertId = alertId;
     }

+ 5 - 6
suishenbang-system/src/main/java/com/dgtly/system/service/impl/AlertConfigurationServiceImpl.java

@@ -1,9 +1,6 @@
 package com.dgtly.system.service.impl;
 
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
+import java.util.*;
 
 import com.dgtly.common.utils.DateUtils;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -88,11 +85,13 @@ public class AlertConfigurationServiceImpl implements IAlertConfigurationService
             }
             while (it.hasNext()) {
                 AlertConfiguration alert = it.next();
-                    if(orgCodes !=null && orgCodes.size()>0){
+                    if(orgCodes !=null && orgCodes.size()>0 && alert.getOrgCode() !=null && !("null").equals(alert.getOrgCode())){
                         if(orgCodes.contains(alert.getOrgCode())){
                             return 1;
                         }
-                }
+                }else{
+                        return 1;
+                    }
             }
         }else{
                     return 0;

+ 2 - 2
suishenbang-system/src/main/resources/mapper/system/AlertConfigurationMapper.xml

@@ -44,8 +44,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectAlertConfigurationListFilter" parameterType="Long" resultMap="AlertConfigurationResult">
         <include refid="selectAlertConfigurationVo"/>
         WHERE alert_status = 1
-        <if test="userType !=null and userType !='' and orgCode !='null' ">
-            and user_type =#{userType}
+        <if test="userType !=null and userType !='' ">
+                and  FIND_IN_SET (#{userType},user_type)>0
         </if>
     </select>