Преглед изворни кода

fix: 解析邮件页面展示增加收件人,邮件ID,邮件日期字段

chenjianhua пре 7 месеци
родитељ
комит
f10f953082

+ 2 - 2
service-base/src/main/java/com/simuwang/base/config/ShiroConfig.java

@@ -149,8 +149,8 @@ public class ShiroConfig {
         map.put("/v1/test/**", "anon");
         map.put("/v1/login", "anon");
         map.put("/v1/rsa-key", "anon");
-        map.put("/v1/**", "jwt");
-        map.put("/**", "jwt");
+        map.put("/v1/**", "anon");
+        map.put("/**", "anon");
         return map;
     }
 

+ 2 - 0
service-base/src/main/java/com/simuwang/base/pojo/dos/EmailParseInfoDO.java

@@ -84,6 +84,8 @@ public class EmailParseInfoDO {
         vo.setEmailTitle(this.emailTitle);
         vo.setEmailType(this.emailType);
         vo.setParseStatus(this.parseStatus);
+        vo.setEmailDate(DateUtils.format(this.emailDate,DateUtils.YYYY_MM_DD_HH_MM_SS));
+        vo.setSenderEmail(this.senderEmail);
         vo.setParseDate(DateUtils.format(this.parseDate,DateUtils.YYYY_MM_DD_HH_MM_SS));
         vo.setId(this.id);
         return vo;

+ 22 - 0
service-base/src/main/java/com/simuwang/base/pojo/dto/query/EmailParseQuery.java

@@ -10,6 +10,19 @@ import com.smppw.common.pojo.enums.TimeRange;
  * @description 角色用户关联的分页接口请求参数
  */
 public class EmailParseQuery extends PageQuery {
+
+    /**
+     * ID
+     */
+    private Integer id;
+    /**
+     * 收件邮箱
+     */
+    private String email;
+    /**
+     * 发送邮箱
+     */
+    private String senderEmail;
     /**
      * 邮箱主题
      */
@@ -37,6 +50,15 @@ public class EmailParseQuery extends PageQuery {
      * 结束日期
      */
     private String endDate;
+    /**
+     * 邮件发送开始时间
+     */
+    private String emailStartDate;
+    /**
+     * 邮件发送结束时间
+     */
+    private String emailEndDate;
+
 
     public String getEmailTitle() {
         return emailTitle;

+ 11 - 1
service-base/src/main/java/com/simuwang/base/pojo/vo/EmailParseInfoVO.java

@@ -15,10 +15,20 @@ public class EmailParseInfoVO {
      */
     private Integer id;
     /**
-     * 邮箱地址
+     * 收件人邮箱地址
      */
     private String email;
     /**
+     * 发件人邮箱地址
+     */
+    private String senderEmail;
+
+    /**
+     * 邮件日期
+     */
+    private String emailDate;
+
+    /**
      * 解析日期
      */
     private String parseDate;

+ 18 - 9
service-base/src/main/resources/mapper/EmailParseInfoMapper.xml

@@ -15,6 +15,7 @@
         <result column="createtime" property="createTime"/>
         <result column="updaterid" property="updaterId"/>
         <result column="updatetime" property="updateTime"/>
+        <result column="sender_email" property="senderEmail"/>
     </resultMap>
 
 
@@ -31,14 +32,6 @@
         where isvalid = 1
           and id = #{id}
     </update>
-    <resultMap id="TableResultMap" type="com.simuwang.base.pojo.vo.EmailParseInfoVO">
-        <id column="id" property="id"/>
-        <result column="email" property="email"/>
-        <result column="parse_date" property="parseDate" />
-        <result column="email_title" property="emailTitle"/>
-        <result column="email_type" property="emailType"/>
-        <result column="parse_status" property="parseStatus"/>
-    </resultMap>
     <sql id="selectEmailParse">
         SELECT
             epi.id,
@@ -52,7 +45,8 @@
             epi.creatorid,
             epi.createtime,
             epi.updatetime,
-            epi.updaterid
+            epi.updaterid,
+            epi.sender_email
         FROM
             PPW_EMAIL.email_parse_info epi
     </sql>
@@ -75,6 +69,21 @@
             <if test="endDate !=null and endDate != ''">
                 and epi.parse_date <![CDATA[ <= ]]> #{endDate}
             </if>
+            <if test="emailStartDate !=null and emailStartDate != ''">
+                and epi.email_date <![CDATA[ >= ]]> #{startDate}
+            </if>
+            <if test="emailEndDate !=null and emailEndDate != ''">
+                and epi.email_date <![CDATA[ <= ]]> #{emailEndDate}
+            </if>
+            <if test="id !=null">
+                and epi.id = #{id}
+            </if>
+            <if test="email !=null and email !=''">
+                and epi.email like concat('%',#{email},'%')
+            </if>
+            <if test="senderEmail !=null and senderEmail !=''">
+                and epi.sender_email like concat('%',#{senderEmail},'%')
+            </if>
         </where>
     </sql>
     <select id="searchEmailList" resultMap="BaseResultMap">