Browse Source

修改查询弹窗逻辑

yousongbo 4 tuần trước cách đây
mục cha
commit
902ed4af36

+ 1 - 1
suishenbang-system/src/main/java/com/dgtly/system/mapper/AlertConfigurationMapper.java

@@ -22,7 +22,7 @@ public interface AlertConfigurationMapper
      */
     public AlertConfiguration selectAlertConfigurationById(Long alertId);
 
-    public List<AlertConfiguration> selectAlertConfigurationByAlertStatus( List userTypeList);
+    public List<AlertConfiguration> selectAlertConfigurationByAlertStatus();
 
 
     /**

+ 2 - 1
suishenbang-system/src/main/java/com/dgtly/system/service/impl/AlertConfigurationServiceImpl.java

@@ -38,7 +38,8 @@ public class AlertConfigurationServiceImpl implements IAlertConfigurationService
 
     @Override
     public AlertConfiguration selectAlertConfigurationByAlertStatus(List<String> userTypeList,String salesLevel,String orgCode) {
-        List<AlertConfiguration> alertConfigurationList = alertConfigurationMapper.selectAlertConfigurationByAlertStatus(userTypeList);
+        //查询有效弹窗
+        List<AlertConfiguration> alertConfigurationList = alertConfigurationMapper.selectAlertConfigurationByAlertStatus();
         if(alertConfigurationList !=null && alertConfigurationList.size()> 0 ){
             //判断弹框的组织 如果弹框有组织 对比该组织与员工的组织是否一致
             Iterator<AlertConfiguration> it = alertConfigurationList.iterator();

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

@@ -60,11 +60,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectAlertConfigurationByAlertStatus" parameterType="Long" resultMap="AlertConfigurationResult">
         <include refid="selectAlertConfigurationVo"/>
         WHERE alert_status = 1
-        and ( user_type  in
-        <foreach item="item" index="index" collection="list" open="(" separator="," close=")">
-            #{item}
-        </foreach>
-        or user_type ='2')
         AND now() >=alert_start_time
         AND alert_end_time > now()
     </select>

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

@@ -72,7 +72,7 @@ public class WxAlertLogController  extends ApiBaseController {
             }
         }
 
-        //是否有启动
+        //是否有启动弹窗
         AlertConfiguration alertConfiguration1 = alertConfigurationService.selectAlertConfigurationByAlertStatus(userTypeList,sysUserExt.getSalesLevel(),sysUserExt.getOrgCode());
 
         if (alertConfiguration1!=null){