Browse Source

【修改】弹框日志列表导出问题调整

lichen 2 tháng trước cách đây
mục cha
commit
09ba70eaa0

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

@@ -57,10 +57,10 @@
 <!--                <a class="btn btn-primary single disabled" onclick="$.operate.edit()" shiro:hasPermission="system:log:edit">-->
 <!--                    <i class="fa fa-edit"></i> 修改-->
 <!--                </a>-->
-                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:log:remove">
+                <a class="btn btn-danger multiple disabled" onclick="$.operate.removeAll()" shiro:hasPermission="system:upvoteLog:remove">
                     <i class="fa fa-remove"></i> 删除
                 </a>
-                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:log:export">
+                <a class="btn btn-warning" onclick="$.table.exportExcel()" shiro:hasPermission="system:upvoteLog:export">
                     <i class="fa fa-download"></i> 导出
                  </a>
             </div>

+ 20 - 7
suishenbang-system/src/main/java/com/dgtly/system/domain/AlertUpvoteLog.java

@@ -21,21 +21,17 @@ public class AlertUpvoteLog extends BaseEntity
     private Long alertUpvoteId;
 
     /** 弹框配置id */
-    @Excel(name = "弹框配置id")
+//    @Excel(name = "弹框配置id")
     private Long alertId;
 
     /** 是否删除 */
-    @Excel(name = "是否删除")
+//    @Excel(name = "是否删除")
     private Long isDelete;
 
     /** 用户id */
-    @Excel(name = "用户id")
+//    @Excel(name = "用户id")
     private Long userId;
 
-    /** 点赞状态。0: 无;1:赞;2:踩 */
-    @Excel(name = "点赞状态。0: 无;1:赞;2:踩")
-    private Integer status;
-
     /** 登录名称 */
     @Excel(name = "登录名称")
     private String loginName;
@@ -49,8 +45,16 @@ public class AlertUpvoteLog extends BaseEntity
     private String alertContent;
 
     /** 弹框图片地址 */
+    @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;
@@ -147,6 +151,14 @@ public class AlertUpvoteLog extends BaseEntity
         this.endTime = endTime;
     }
 
+    public String getStatusName() {
+        return statusName;
+    }
+
+    public void setStatusName(String statusName) {
+        this.statusName = statusName;
+    }
+
     @Override
     public String toString() {
         return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
@@ -163,6 +175,7 @@ public class AlertUpvoteLog extends BaseEntity
             .append("userName", getUserName())
             .append("alertContent", getAlertContent())
             .append("photoUrl", getPhotoUrl())
+            .append("statusName", getStatusName())
             .toString();
     }
 }

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

@@ -18,6 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="userName"    column="user_name"    />
         <result property="alertContent"    column="alert_content"    />
         <result property="photoUrl"    column="photo_url"    />
+        <result property="statusName"    column="statusName"    />
 
     </resultMap>
 
@@ -26,7 +27,25 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </sql>
 
     <select id="selectAlertUpvoteLogList" parameterType="AlertUpvoteLog" resultMap="AlertUpvoteLogResult">
-        <include refid="selectAlertUpvoteLogVo"/>
+        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,
+               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>