4 Commits a548a12d5c ... 065f839380

Autor SHA1 Mensaje Fecha
  lichen 065f839380 【修改】弹框日志列表操作时间调整 hace 9 meses
  lichen 4b3485e0e8 【修改】弹框日志调整 hace 9 meses
  lichen 4539cd54ab 【修改】弹框日志弹框标题特殊处理 hace 9 meses
  lichen 7b1f145d6a 【修改】企微弹框配置增加弹框标题字段,弹框点赞日志增加员工组织架构,岗位,员工号等字段 hace 9 meses

+ 9 - 0
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/add.html

@@ -9,6 +9,12 @@
 <body class="white-bg">
 <div class="wrapper wrapper-content animated fadeInRight ibox-content">
     <form class="form-horizontal m" id="form-configuration-add">
+        <div class="form-group">
+            <label class="col-sm-3 control-label">弹框标题:</label>
+            <div class="col-sm-8">
+                <input id="alertTitle" name="alertTitle" class="form-control" type="text" required>
+            </div>
+        </div>
         <div class="form-group">
             <label class="col-sm-3 control-label">弹框类型:</label>
             <div class="col-sm-3">
@@ -259,6 +265,8 @@
 
     function submitHandler() {
         if ($.validate.form()) {
+            debugger
+            var alertTitle = $('#alertTitle').val();
             var alertType = $('#alertType').val();
             var contentVal = $('#alertContent').val();
             var startTime = $('#alertStartTime').val().replace('T',' ');
@@ -269,6 +277,7 @@
                 $.modal.alertWarning("弹框结束时间不能小于开始时间");
             }else {
                 var objSubmit = {
+                    alertTitle:alertTitle,
                     alertType:alertType,
                     photoUrl:photoUrl,
                     alertContent:contentVal,

+ 4 - 0
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/configuration.html

@@ -125,6 +125,10 @@
                     title : 'id',
                     visible: false
                 },
+                {
+                    field : 'alertTitle',
+                    title : '弹框标题'
+                },
                 {
                     field : 'alertContent', 
                     title : '弹框内容',

+ 8 - 0
suishenbang-admin/src/main/resources/templates/system/alertConfiguration/edit.html

@@ -9,6 +9,12 @@
     <div class="wrapper wrapper-content animated fadeInRight ibox-content">
         <form class="form-horizontal m" id="form-configuration-edit" th:object="${alertConfiguration}">
             <input name="alertId" th:field="*{alertId}" type="hidden">
+            <div class="form-group">
+                <label class="col-sm-3 control-label">弹框标题:</label>
+                <div class="col-sm-8">
+                    <input id="alertTitle" name="alertTitle" th:field="*{alertTitle}" class="form-control" type="text" required>
+                </div>
+            </div>
             <div class="form-group">
                 <label class="col-sm-3 control-label">弹框类型:</label>
                 <div class="col-sm-8">
@@ -266,6 +272,7 @@
 
         function submitHandler() {
             if ($.validate.form()) {
+                var alertTitle = $('#alertTitle').val();
                 var alertId = $('#alertId').val();
                 var alertType = $('#alertType').val();
                 var contentVal = $('#alertContent').val();
@@ -277,6 +284,7 @@
                     $.modal.alertWarning("弹框结束时间不能小于开始时间");
                 }else {
                     var objSubmit = {
+                        alertTitle:alertTitle,
                         alertId:alertId,
                         alertType:alertType,
                         photoUrl:photoUrl,

+ 36 - 6
suishenbang-admin/src/main/resources/templates/system/upvoteLog/upvoteLog.html

@@ -92,6 +92,13 @@
                     title : '日志编号',
                     visible: false
                 },
+                {
+                    field : 'alertTitle',
+                    title : '弹框标题',
+                    formatter: function(value, row, index) {
+                        return $.table.tooltip(value); // 使用tooltip显示完整内容
+                    }
+                },
                 {
                     field : 'userId',
                     title : '用户id',
@@ -105,6 +112,20 @@
                     field : 'loginName',
                     title : '用户账号',
                 },
+                {
+                    field : 'orgName',
+                    title : '组织架构',
+                    visible: false
+                },
+                {
+                    field : 'postName',
+                    title : '岗位',
+                },
+                {
+                    field : 'sapEmployeeId',
+                    title : '员工号',
+                },
+
                 {
                     field : 'status',
                     title : '点赞状态',
@@ -126,7 +147,8 @@
                         }else {
                             return $.table.tooltip(value); // 使用tooltip显示完整内容
                         }
-                    }
+                    },
+                    visible: false
                 },
                 {
                     field : 'photoUrl',
@@ -140,15 +162,23 @@
                             console.log('url2',valueStr);
                             return '<img width="24" height="22" src="' + value + '" onclick="imgPreview(\'' + valueStr + '\')"/>'
                         }
-                    }
+                    },
+                    visible: false
                 },
                 {
-                    field : 'isDelete', 
-                    title : '是否删除',
-                    visible: false
+                    field : 'companyName',
+                    title : '公司'
+                },
+                {
+                    field : 'officeName',
+                    title : '大区'
+                },
+                {
+                    field : 'subOfficeName',
+                    title : '销售部'
                 },
                 {
-                    field : 'createTime',
+                    field : 'updateTime',
                     title : '操作时间'
                 },
                 {

+ 5 - 0
suishenbang-system/src/main/java/com/dgtly/system/domain/AlertConfiguration.java

@@ -1,5 +1,6 @@
 package com.dgtly.system.domain;
 
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.dgtly.common.annotation.Excel;
@@ -12,6 +13,7 @@ import java.util.Date;
  * @author chenyn
  * @date 2023-06-13
  */
+@Data
 public class AlertConfiguration extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -23,6 +25,9 @@ public class AlertConfiguration extends BaseEntity
     @Excel(name = "是否删除")
     private Long isDelete;
 
+    /** 弹框标题 */
+    @Excel(name = "弹框标题")
+    private String alertTitle;
     /** 弹框内容 */
     @Excel(name = "弹框内容")
     private String alertContent;

+ 34 - 12
suishenbang-system/src/main/java/com/dgtly/system/domain/AlertUpvoteLog.java

@@ -1,5 +1,6 @@
 package com.dgtly.system.domain;
 
+import lombok.Data;
 import org.apache.commons.lang3.builder.ToStringBuilder;
 import org.apache.commons.lang3.builder.ToStringStyle;
 import com.dgtly.common.annotation.Excel;
@@ -13,6 +14,7 @@ import java.util.Date;
  * @author dgtly
  * @date 2024-12-24
  */
+@Data
 public class AlertUpvoteLog extends BaseEntity
 {
     private static final long serialVersionUID = 1L;
@@ -31,30 +33,50 @@ public class AlertUpvoteLog extends BaseEntity
     /** 用户id */
 //    @Excel(name = "用户id")
     private Long userId;
-
-    /** 登录名称 */
-    @Excel(name = "登录名称")
-    private String loginName;
-
+    /** 组织架构 */
+//    @Excel(name = "组织架构")
+    private String orgName;
+    /** 弹框标题 */
+    @Excel(name = "弹框标题")
+    private String alertTitle;
     /** 用户名称 */
-    @Excel(name = "用户名")
+    @Excel(name = "用户名")
     private String userName;
+    /** 登录名称 */
+    @Excel(name = "用户账号")
+    private String loginName;
+    /** 岗位 */
+    @Excel(name = "岗位")
+    private String postName;
+    /** 员工号 */
+    @Excel(name = "员工号")
+    private String sapEmployeeId;
+    /** 点赞状态。0: 无;1:赞;2:踩 */
+    @Excel(name = "点赞状态")
+    private String statusName;
+    /** 公司 */
+    @Excel(name = "公司")
+    private String companyName;
+    /** 大区 */
+    @Excel(name = "大区")
+    private String officeName;
+    /** 销售部 */
+    @Excel(name = "销售部")
+    private String subOfficeName;
+    /** 级别 */
+    private String salesLevel;
 
     /** 弹框内容 */
-    @Excel(name = "弹框内容")
+//    @Excel(name = "弹框内容")
     private String alertContent;
 
     /** 弹框图片地址 */
-    @Excel(name = "弹框图片url")
+//    @Excel(name = "弹框图片url")
     private String photoUrl;
 
     /** 点赞状态。0: 无;1:赞;2:踩 */
 //    @Excel(name = "点赞状态。0: 无;1:赞;2:踩")
     private Integer status;
-    /** 点赞状态。0: 无;1:赞;2:踩 */
-    @Excel(name = "点赞状态")
-    private String statusName;
-
     //用于查询
     private Date startTime;
     private Date endTime;

+ 4 - 0
suishenbang-system/src/main/java/com/dgtly/system/mapper/AlertUpvoteLogMapper.java

@@ -71,4 +71,8 @@ public interface AlertUpvoteLogMapper
      * @date 2024-12-25 11:12
      */
     public AlertUpvoteLog selectUpvoteByUidAndAid(@Param("userId") Long userId, @Param("alertId")Long alertId);
+
+    public AlertUpvoteLog selectMasterNameByCode(@Param("customerCode") String customerCode,
+                                                 @Param("salesOfficeCode")String salesOfficeCode,
+                                                 @Param("salesGroupCode")String salesGroupCode);
 }

+ 2 - 0
suishenbang-system/src/main/java/com/dgtly/system/mapper/SysUserMapper.java

@@ -239,4 +239,6 @@ public interface SysUserMapper
     List<UserVO> sendmailUnionUser();
 
     int deleteUserByLoginName(@Param("loginName") String loginName);
+
+    public SysUser selectAllUserByUserId(@Param("userId")Long userId);
 }

+ 60 - 2
suishenbang-system/src/main/java/com/dgtly/system/service/impl/AlertUpvoteLogServiceImpl.java

@@ -2,6 +2,10 @@ package com.dgtly.system.service.impl;
 
 import java.util.List;
 import com.dgtly.common.utils.DateUtils;
+import com.dgtly.system.domain.AlertConfiguration;
+import com.dgtly.system.domain.SysUser;
+import com.dgtly.system.mapper.AlertConfigurationMapper;
+import com.dgtly.system.mapper.SysUserMapper;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.dgtly.system.mapper.AlertUpvoteLogMapper;
@@ -20,6 +24,10 @@ public class AlertUpvoteLogServiceImpl implements IAlertUpvoteLogService
 {
     @Autowired
     private AlertUpvoteLogMapper alertUpvoteLogMapper;
+    @Autowired
+    private SysUserMapper sysUserMapper;
+    @Autowired
+    private AlertConfigurationMapper alertConfigurationMapper;
 
     /**
      * 查询弹框点赞日志
@@ -55,7 +63,13 @@ public class AlertUpvoteLogServiceImpl implements IAlertUpvoteLogService
     public int insertAlertUpvoteLog(AlertUpvoteLog alertUpvoteLog)
     {
         alertUpvoteLog.setCreateTime(DateUtils.getNowDate());
-        return alertUpvoteLogMapper.insertAlertUpvoteLog(alertUpvoteLog);
+        if (alertUpvoteLog.getStatus()==0){
+            return 0;
+        }else {
+            extracted(alertUpvoteLog);
+            return alertUpvoteLogMapper.insertAlertUpvoteLog(alertUpvoteLog);
+        }
+
     }
 
     /**
@@ -68,7 +82,12 @@ public class AlertUpvoteLogServiceImpl implements IAlertUpvoteLogService
     public int updateAlertUpvoteLog(AlertUpvoteLog alertUpvoteLog)
     {
         alertUpvoteLog.setUpdateTime(DateUtils.getNowDate());
-        return alertUpvoteLogMapper.updateAlertUpvoteLog(alertUpvoteLog);
+        if (alertUpvoteLog.getStatus()==0){
+            return 0;
+        }else {
+            extracted(alertUpvoteLog);
+            return alertUpvoteLogMapper.updateAlertUpvoteLog(alertUpvoteLog);
+        }
     }
 
     /**
@@ -107,4 +126,43 @@ public class AlertUpvoteLogServiceImpl implements IAlertUpvoteLogService
     public AlertUpvoteLog selectUpvoteByUidAndAid(Long userId, Long alertId) {
         return alertUpvoteLogMapper.selectUpvoteByUidAndAid(userId, alertId);
     }
+
+    private void extracted(AlertUpvoteLog alertUpvoteLog) {
+        AlertConfiguration alertConfiguration = alertConfigurationMapper.selectAlertConfigurationById(alertUpvoteLog.getAlertId());
+        alertUpvoteLog.setAlertTitle(alertConfiguration.getAlertTitle());
+        alertUpvoteLog.setAlertContent(alertConfiguration.getAlertContent());
+        alertUpvoteLog.setPhotoUrl(alertConfiguration.getPhotoUrl());
+        SysUser sysUser = sysUserMapper.selectAllUserByUserId(alertUpvoteLog.getUserId());
+        alertUpvoteLog.setUserName(sysUser.getUserName());
+        alertUpvoteLog.setLoginName(sysUser.getLoginName());
+        alertUpvoteLog.setSapEmployeeId(sysUser.getSysUserExt().getSapEmployeeId());
+        alertUpvoteLog.setPostName(sysUser.getSysUserExt().getPostName());
+        String salesLevel = sysUser.getSysUserExt().getSalesLevel();
+        alertUpvoteLog.setSalesLevel(salesLevel);
+        if ("company_level".equals(salesLevel)) {
+            alertUpvoteLog.setCompanyName(sysUser.getSysUserExt().getOrgName());
+        } else if("office_level".equals(salesLevel)||"saledept_level".equals(salesLevel)){
+            AlertUpvoteLog nameByCode = alertUpvoteLogMapper.selectMasterNameByCode(null, sysUser.getSysUserExt().getOrgCode(), null);
+            if (nameByCode!=null) {
+                alertUpvoteLog.setCompanyName(nameByCode.getCompanyName());
+                alertUpvoteLog.setOfficeName(nameByCode.getOfficeName());
+            }
+        }else if("emp_level".equals(salesLevel)||"suboffice_level".equals(salesLevel)){
+            AlertUpvoteLog nameByCode = alertUpvoteLogMapper.selectMasterNameByCode(null, null, sysUser.getSysUserExt().getOrgCode());
+            if (nameByCode!=null) {
+                alertUpvoteLog.setCompanyName(nameByCode.getCompanyName());
+                alertUpvoteLog.setOfficeName(nameByCode.getOfficeName());
+                alertUpvoteLog.setSubOfficeName(nameByCode.getSubOfficeName());
+            }
+        }else if("customer_level".equals(salesLevel)||"reseller_level".equals(salesLevel)){
+            AlertUpvoteLog nameByCode = alertUpvoteLogMapper.selectMasterNameByCode(sysUser.getSysUserExt().getOrgCode(), null,null );
+            if (nameByCode!=null) {
+                alertUpvoteLog.setCompanyName(nameByCode.getCompanyName());
+                alertUpvoteLog.setOfficeName(nameByCode.getOfficeName());
+                alertUpvoteLog.setSubOfficeName(nameByCode.getSubOfficeName());
+            }
+        } else if ("ysl_emp".equals(salesLevel)) {
+            alertUpvoteLog.setSubOfficeName(sysUser.getSysUserExt().getOrgName());
+        }
+    }
 }

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

@@ -22,10 +22,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="orgName"    column="org_name"    />
         <result property="alertType"    column="alert_type"    />
         <result property="photoUrl"    column="photo_url"    />
+        <result property="alertTitle"    column="alert_title"    />
     </resultMap>
 
     <sql id="selectAlertConfigurationVo">
-        select alert_id, create_by, create_time, update_by, update_time, is_delete, alert_content, alert_start_time, alert_end_time, alert_num, user_type, alert_status,sales_level,org_code,org_name,alert_type,photo_url from alert_configuration
+        select alert_id, create_by, create_time, update_by, update_time, is_delete,alert_title, alert_content, alert_start_time, alert_end_time, alert_num, user_type, alert_status,sales_level,org_code,org_name,alert_type,photo_url from alert_configuration
     </sql>
 
     <select id="selectAlertConfigurationList" parameterType="AlertConfiguration" resultMap="AlertConfigurationResult">
@@ -85,6 +86,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orgName != null  and orgName != ''">org_name,</if>
             <if test="alertType != null  and alertType != ''">alert_type,</if>
             <if test="photoUrl != null  and photoUrl != ''">photo_url,</if>
+            <if test="alertTitle != null  and alertTitle != ''">alert_title,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="createBy != null  and createBy != ''">#{createBy},</if>
@@ -103,6 +105,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orgName != null  and orgName != ''">#{orgName},</if>
             <if test="alertType != null  and alertType != ''">#{alertType},</if>
             <if test="photoUrl != null  and photoUrl != ''">#{photoUrl},</if>
+            <if test="alertTitle != null  and alertTitle != ''">#{alertTitle},</if>
          </trim>
     </insert>
 
@@ -125,6 +128,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="orgName != null  and orgName != ''">org_name = #{orgName},</if>
             <if test="alertType != null  and alertType != ''">alert_type = #{alertType},</if>
             <if test="photoUrl != null  and photoUrl != ''">photo_url = #{photoUrl},</if>
+            <if test="alertTitle != null  and alertTitle != ''">alert_title = #{alertTitle},</if>
         </trim>
         where alert_id = #{alertId}
     </update>

+ 67 - 26
suishenbang-system/src/main/resources/mapper/system/AlertUpvoteLogMapper.xml

@@ -16,9 +16,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="status"    column="status"    />
         <result property="loginName"    column="login_name"    />
         <result property="userName"    column="user_name"    />
+        <result property="sapEmployeeId"    column="alert_title"    />
+        <result property="postName"    column="post_name"    />
         <result property="alertContent"    column="alert_content"    />
         <result property="photoUrl"    column="photo_url"    />
         <result property="statusName"    column="statusName"    />
+        <result property="alertTitle"    column="alert_title"    />
+        <result property="companyName"    column="company_name"    />
+        <result property="officeName"    column="office_name"    />
+        <result property="subOfficeName"    column="sub_office_name"    />
 
     </resultMap>
 
@@ -26,34 +32,36 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         select alert_upvote_id, alert_id, create_by, create_time, update_by, update_time, is_delete, user_id, status,login_name,user_name,alert_content,photo_url from alert_upvote_log
     </sql>
 
-    <select id="selectAlertUpvoteLogList" parameterType="AlertUpvoteLog" resultMap="AlertUpvoteLogResult">
-        select alert_upvote_id,
-               alert_id,
-               create_by,
-               create_time,
-               update_by,
-               update_time,
-               is_delete,
-               user_id,
-               status,
-               login_name,
-               user_name,
-               IF(alert_content!='null', alert_content, "") alert_content,
-               photo_url,
+    <select id="selectAlertUpvoteLogList"  resultType="com.dgtly.system.domain.AlertUpvoteLog">
+        select alert_upvote_id as alertUpvoteId,
+               alert_id as alertId,
+               create_time as createTime,
+               update_time as updateTime,
+               user_id as userId,
+               status as status,
+               login_name as loginName,
+               user_name as userName,
+               sap_employee_id as sapEmployeeId,
+               post_name as postName,
+               alert_content as alertContent,
+               photo_url as photoUrl,
+               alert_title as alertTitle,
+               company_name as companyName,
+               office_name as officeName,
+               sub_office_name as subOfficeName,
                CASE
                 WHEN status = '0' THEN '无'
                 WHEN status = '1' THEN '赞'
                 WHEN status = '2' THEN '踩'
                 END statusName
         from alert_upvote_log
-        <where>
-            <if test="userName != null "> and user_name like concat('%', #{userName}, '%')</if>
-            <if test="loginName != null "> and login_name like concat('%', #{loginName}, '%')</if>
-            <if test="alertContent != null "> and alert_content like concat('%', #{alertContent}, '%')</if>
-            <if test="status != null "> and status = #{status}</if>
+         where status != '0'
+            <if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+            <if test="loginName != null and loginName != '' "> and login_name like concat('%', #{loginName}, '%')</if>
+            <if test="alertContent != null and alertContent != '' "> and alert_content like concat('%', #{alertContent}, '%')</if>
+            <if test="status != null"> and status = #{status}</if>
             <if test="startTime != null "> and create_time &gt;= #{startTime}</if>
             <if test="endTime != null "> and create_time &lt; #{endTime}</if>
-        </where>
         order by create_time desc
     </select>
     
@@ -73,10 +81,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDelete != null ">is_delete,</if>
             <if test="userId != null ">user_id,</if>
             <if test="status != null ">status,</if>
-            <if test="loginName != null ">login_name,</if>
-            <if test="userName != null ">user_name,</if>
+            <if test="alertTitle != null  and alertTitle != ''">alert_title,</if>
             <if test="alertContent != null ">alert_content,</if>
             <if test="photoUrl != null ">photo_url,</if>
+            <if test="loginName != null  and loginName != ''">login_name,</if>
+            <if test="userName != null  and userName != ''">user_name,</if>
+            <if test="postName != null  and postName != ''">post_name,</if>
+            <if test="sapEmployeeId != null  and sapEmployeeId != ''">sap_employee_id,</if>
+            <if test="salesLevel != null  and salesLevel != ''">sales_level,</if>
+            <if test="companyName != null  and companyName != ''">company_name,</if>
+            <if test="officeName != null  and officeName != ''">office_name,</if>
+            <if test="subOfficeName != null  and subOfficeName != ''">sub_office_name,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="alertId != null ">#{alertId},</if>
@@ -87,10 +102,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDelete != null ">#{isDelete},</if>
             <if test="userId != null ">#{userId},</if>
             <if test="status != null ">#{status},</if>
-            <if test="loginName != null ">#{loginName},</if>
-            <if test="userName != null ">#{userName},</if>
+            <if test="alertTitle != null  and alertTitle != ''">#{alertTitle},</if>
             <if test="alertContent != null ">#{alertContent},</if>
             <if test="photoUrl != null ">#{photoUrl},</if>
+            <if test="loginName != null  and loginName != ''">#{loginName},</if>
+            <if test="userName != null  and userName != ''">#{userName},</if>
+            <if test="postName != null  and postName != ''">#{postName},</if>
+            <if test="sapEmployeeId != null  and sapEmployeeId != ''">#{sapEmployeeId},</if>
+            <if test="salesLevel != null  and salesLevel != ''">#{salesLevel},</if>
+            <if test="companyName != null  and companyName != ''">#{companyName},</if>
+            <if test="officeName != null  and officeName != ''">#{officeName},</if>
+            <if test="subOfficeName != null  and subOfficeName != ''">#{subOfficeName},</if>
          </trim>
     </insert>
 
@@ -105,10 +127,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="isDelete != null ">is_delete = #{isDelete},</if>
             <if test="userId != null ">user_id = #{userId},</if>
             <if test="status != null ">status = #{status},</if>
-            <if test="loginName != null ">login_name = #{loginName},</if>
-            <if test="userName != null ">user_name = #{userName},</if>
+            <if test="alertTitle != null  and alertTitle != ''">alert_title = #{alertTitle},</if>
             <if test="alertContent != null ">alert_content = #{alertContent},</if>
             <if test="photoUrl != null ">photo_url = #{photoUrl},</if>
+            <if test="loginName != null  and loginName != ''">login_name = #{loginName},</if>
+            <if test="userName != null  and userName != ''">user_name = #{userName},</if>
+            <if test="postName != null  and postName != ''">post_name = #{postName},</if>
+            <if test="sapEmployeeId != null  and sapEmployeeId != ''">sap_employee_id = #{sapEmployeeId},</if>
+            <if test="salesLevel != null  and salesLevel != ''">sales_level = #{salesLevel},</if>
+            <if test="companyName != null  and companyName != ''">company_name = #{companyName},</if>
+            <if test="officeName != null  and officeName != ''">office_name = #{officeName},</if>
+            <if test="subOfficeName != null  and subOfficeName != ''">sub_office_name = #{subOfficeName},</if>
         </trim>
         where alert_upvote_id = #{alertUpvoteId}
     </update>
@@ -128,4 +157,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectAlertUpvoteLogVo"/>
         where user_id = #{userId} and alert_id = #{alertId}
     </select>
+
+    <select id="selectMasterNameByCode" resultType="com.dgtly.system.domain.AlertUpvoteLog">
+        select
+            sales_company_name AS companyName,
+            sales_office_name AS officeName,
+            sales_group_name AS subOfficeName
+        from data_master_customer where 1=1
+        <if test="customerCode !=null and customerCode !='' ">and CustomerCode =#{customerCode}</if>
+        <if test="salesOfficeCode !=null and salesOfficeCode !='' ">and sales_office =#{salesOfficeCode}</if>
+        <if test="salesGroupCode !=null and salesGroupCode !='' ">and sales_group =#{salesGroupCode}</if>
+        limit 1
+    </select>
 </mapper>

+ 8 - 0
suishenbang-system/src/main/resources/mapper/system/SysUserMapper.xml

@@ -624,4 +624,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
 					count(*) > 1) and u.del_flag=0 and u.quit is null
 				and e.is_customer_manager is null order by user_name
 	</select>
+
+	<select id="selectAllUserByUserId" parameterType="Long" resultMap="SysUserResult">
+		SELECT *
+		FROM
+			sys_user u
+				LEFT JOIN sys_user_ext suse ON suse.user_id = u.user_id
+		where u.user_id = #{userId}
+	</select>
 </mapper>

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

@@ -246,11 +246,11 @@ public class WxAlertLogController  extends ApiBaseController {
     public Object getUpvoteStatus() throws ParseException {
         ParameterObject obj = getParameterObject();
         Long userId = Long.valueOf(obj.getString("userId"));//用户ID
-        String loginName = String.valueOf(obj.getString("loginName"));//用户账号
-        String userName = String.valueOf(obj.getString("userName"));//用户姓名
+//        String loginName = String.valueOf(obj.getString("loginName"));//用户账号
+//        String userName = String.valueOf(obj.getString("userName"));//用户姓名
         Long alertId = Long.valueOf(obj.getString("alertId"));//弹框ID
-        String alertContent = String.valueOf(obj.getString("alertContent"));//弹框内容
-        String photoUrl = String.valueOf(obj.getString("photoUrl"));//弹框图片
+//        String alertContent = String.valueOf(obj.getString("alertContent"));//弹框内容
+//        String photoUrl = String.valueOf(obj.getString("photoUrl"));//弹框图片
         Integer status=3;//如果没有传status,为查询
         if (obj.getString("status")!=null){
             status = Integer.valueOf(obj.getString("status"));//状态
@@ -262,21 +262,21 @@ public class WxAlertLogController  extends ApiBaseController {
             if (status!=3) {
                 alertUpvoteLog.setStatus(status);
             }
-            alertUpvoteLog.setLoginName(loginName);
-            alertUpvoteLog.setUserName(userName);
-            alertUpvoteLog.setAlertContent(alertContent);
-            alertUpvoteLog.setPhotoUrl(photoUrl);
+//            alertUpvoteLog.setLoginName(loginName);
+//            alertUpvoteLog.setUserName(userName);
+//            alertUpvoteLog.setAlertContent(alertContent);
+//            alertUpvoteLog.setPhotoUrl(photoUrl);
             alertUpvoteLogService.updateAlertUpvoteLog(alertUpvoteLog);
             return AjaxResult.success(alertUpvoteLog);
         }else {
             //没有新增记录
             AlertUpvoteLog upvoteLog = new AlertUpvoteLog();
             upvoteLog.setUserId(userId);
-            upvoteLog.setLoginName(loginName);
-            upvoteLog.setUserName(userName);
             upvoteLog.setAlertId(alertId);
-            upvoteLog.setAlertContent(alertContent);
-            upvoteLog.setPhotoUrl(photoUrl);
+//            upvoteLog.setLoginName(loginName);
+//            upvoteLog.setUserName(userName);
+//            upvoteLog.setAlertContent(alertContent);
+//            upvoteLog.setPhotoUrl(photoUrl);
             if (status!=3) {
                 upvoteLog.setStatus(status);
             }else{