Pārlūkot izejas kodu

Merge remote-tracking branch 'origin/div-20251104' into div-20251104

yanym 4 nedēļas atpakaļ
vecāks
revīzija
9150e1d1aa

+ 18 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/SysUser.java

@@ -146,6 +146,10 @@ public class SysUser extends BaseEntity
     //门店账号标识 1门店账号 0非门店账号
     private String  isShopAccount;
 
+    private String officeName;
+
+    private String subOfficeName;
+
     //应用类型对应关系
     private List<Map<String,Object> >loginTypeList;
    //门店对应关系
@@ -214,7 +218,21 @@ public class SysUser extends BaseEntity
         return isSelfDelivery;
     }
 
+    public String getOfficeName() {
+        return officeName;
+    }
+
+    public void setOfficeName(String officeName) {
+        this.officeName = officeName;
+    }
+
+    public String getSubOfficeName() {
+        return subOfficeName;
+    }
 
+    public void setSubOfficeName(String subOfficeName) {
+        this.subOfficeName = subOfficeName;
+    }
 
     public void setIsSelfDelivery(String isSelfDelivery) {
         this.isSelfDelivery = isSelfDelivery;

+ 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 - 13
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();
@@ -55,18 +56,6 @@ public class AlertConfigurationServiceImpl implements IAlertConfigurationService
                         }
                     }
                 }
-//                if(orgCode ==null || ("").equals(orgCode)){
-//                    if( alert.getOrgCode() ==null || ("null").equals(alert.getOrgCode())){
-//                        return alert;
-//                    }
-//                }else{
-//                    List<String>  orgCodes = alertConfigurationMapper.selectOrgCodeByInterface(alert.getSalesLevel(),alert.getOrgCode());
-//                    if(orgCodes !=null && orgCodes.size()>0){
-//                        if(orgCodes.contains(orgCode)){
-//                            return alert;
-//                        }
-//                    }
-//                }
             }
         }
         return  null;

+ 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" separator=",">
-            #{item}
-        </foreach>
-        or user_type ='2')
         AND now() >=alert_start_time
         AND alert_end_time > now()
     </select>

+ 4 - 1
suishenbang-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -31,6 +31,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 		<result property="updateBy"     column="update_by"    />
 		<result property="updateTime"   column="update_time"  />
 		<result property="remark"       column="remark"       />
+		<result property="officeName"       column="sales_office_name"       />
+		<result property="subOfficeName"       column="sales_group_name"       />
 		<result property="isConsignee"       column="is_consignee"       />
 		<result property="isIndependently"  column="is_independently" />
 		<result property="isSelfDelivery" column="is_self_delivery" />
@@ -96,13 +98,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
        		    d.dept_id, d.parent_id, d.dept_name, d.order_num, d.leader, d.status as dept_status,
        		    r.role_id, r.role_name, r.role_key, r.role_sort, r.data_scope, r.status as role_status,
        		    suse.sales_level,suse.org_name,suse.org_code,suse.sap_employee_id,suse.boss_employee_id,suse.boss_name,suse.customer_code,suse.is_customer_manager,
-       		    suse.post_name,suse.post_code,suse.identity
+       		    suse.post_name,suse.post_code,suse.identity,cust.sales_office_name,cust.sales_office_name ,cust.sales_group_name
 		from sys_user u
 			 left join sys_dept d on u.dept_id = d.dept_id
 			 left join sys_company c on u.company_id = c.id
 			 left join sys_user_role ur on u.user_id = ur.user_id
 			 left join sys_role r on r.role_id = ur.role_id
 			 left join sys_user_ext suse on suse.user_id = u.user_id  and suse.del_flag = '0'
+			 left join data_master_customer cust on cust.CustomerCode = suse.customer_code
     </sql>
 
 	<select id="selectUserList" parameterType="SysUser" resultMap="SysUserResult">

+ 1 - 1
suishenbang-system/src/main/resources/mapper/system/SysUserShopExtMapper.xml

@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 
     <select id="selectSysUserShopExtById" parameterType="String" resultMap="SysUserShopExtResult">
         <include refid="selectSysUserShopExtVo"/>
-        where user_id = #{userId} and delFlag='0'
+        where user_id = #{userId} and del_flag='0'
     </select>
 
     <insert id="insertSysUserShopExt" parameterType="SysUserShopExt">

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

@@ -58,13 +58,21 @@ public class WxAlertLogController  extends ApiBaseController {
         SysUserExt sysUserExt = sysUserExtService.selectSysUserExtById(userId);
         String salesLevel = sysUserExt.getSalesLevel();
         List<String> userTypeList = new ArrayList<>();
+        SysUserShopExt sysUserShopExt = sysUserShopExtService.selectSysUserShopExtById(obj.getString("userId"));
         if(("customer_level").equals(salesLevel)||("reseller_level").equals(salesLevel) ){
             userTypeList.add("1");
         }else{
             userTypeList.add("0");
         }
+        if (sysUserShopExt != null){
+            if ("0".equals(sysUserShopExt.getIsShopType())){
+                userTypeList.add("3");
+            }else {
+                userTypeList.add("4");
+            }
+        }
 
-        //是否有启动
+        //是否有启动弹窗
         AlertConfiguration alertConfiguration1 = alertConfigurationService.selectAlertConfigurationByAlertStatus(userTypeList,sysUserExt.getSalesLevel(),sysUserExt.getOrgCode());
 
         if (alertConfiguration1!=null){
@@ -109,7 +117,7 @@ public class WxAlertLogController  extends ApiBaseController {
                         return AjaxResult.success(alertConfiguration1);
                     }
                 }
-                SysUserShopExt sysUserShopExt = sysUserShopExtService.selectSysUserShopExtById(obj.getString("userId"));
+
                 //判断该用户是否为金牌店或仿石漆
                 if (sysUserShopExt != null){
                     if((strings.contains("3") || strings.contains("2")) && "0".equals(sysUserShopExt.getIsShopType())){

+ 0 - 2
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/WxPortalController.java

@@ -139,8 +139,6 @@ public class WxPortalController extends ApiBaseController {
             }
         }
         List<SysRidingLantern> lanternList = sysRidingLanternService.selectLanternList();
-        log.info("qqqqqqqqqq{}",userTypeList);
-        log.info("wwwwwwwwww{}",lanternList);
         List<SysRidingLantern> lanternListhow=new ArrayList<>();
         if (lanternList != null && lanternList.size() > 0) {
             lanternList.forEach(lantern->{