Przeglądaj źródła

新增邮件发送记录编辑接口,邮件记录重新发送接口

wangqiong 2 lat temu
rodzic
commit
75da02d795

+ 23
- 7
ruoyi-admin/src/main/java/com/ruoyi/web/controller/wisdomarbitrate/sendrecord/SendMailRecordController.java Wyświetl plik

@@ -1,19 +1,18 @@
1 1
 package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
2 2
 
3 3
 import com.ruoyi.common.core.controller.BaseController;
4
+import com.ruoyi.common.core.domain.AjaxResult;
4 5
 import com.ruoyi.common.core.page.TableDataInfo;
5 6
 import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
6 7
 import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
7 8
 import org.springframework.beans.factory.annotation.Autowired;
8
-import org.springframework.web.bind.annotation.GetMapping;
9
-import org.springframework.web.bind.annotation.RequestMapping;
10
-import org.springframework.web.bind.annotation.RestController;
9
+import org.springframework.web.bind.annotation.*;
11 10
 
12 11
 import java.util.List;
13 12
 
14 13
 @RestController
15 14
 @RequestMapping("/sendMailRecord")
16
-public class SendMailRecordController  extends BaseController {
15
+public class SendMailRecordController extends BaseController {
17 16
     @Autowired
18 17
     private ISendMailRecordService sendMailRecordService;
19 18
 
@@ -21,13 +20,30 @@ public class SendMailRecordController  extends BaseController {
21 20
      * 查询发送邮件记录列表
22 21
      */
23 22
     @GetMapping("/list")
24
-    public TableDataInfo list(SendMailRecord sendMailRecord)
25
-    {
23
+    public TableDataInfo list(SendMailRecord sendMailRecord) {
26 24
         startPage();
27 25
         List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
28 26
         return getDataTable(list);
29 27
     }
30 28
 
29
+    /**
30
+     * 编辑邮件记录
31
+     */
32
+    @PostMapping("/update")
33
+    public AjaxResult update(@RequestBody SendMailRecord sendMailRecord) {
34
+        return sendMailRecordService.updateSendMailRecord(sendMailRecord);
35
+    }
31 36
 
32
-
37
+    /**
38
+     * 重新发送邮件记录
39
+     */
40
+    @PostMapping("/reSendMailRecord")
41
+    public AjaxResult reSendMailRecord(@RequestBody SendMailRecord sendMailRecord) {
42
+        Boolean aBoolean = sendMailRecordService.reSendMailRecord(sendMailRecord);
43
+        if (aBoolean) {
44
+            return AjaxResult.success("发送成功");
45
+        } else {
46
+            return AjaxResult.error("发送失败");
47
+        }
48
+    }
33 49
 }

+ 107
- 0
ruoyi-system/src/main/java/com/ruoyi/system/domain/entity/shortmessage/MsSendMailHistoryRecord.java Wyświetl plik

@@ -0,0 +1,107 @@
1
+package com.ruoyi.system.domain.entity.shortmessage;
2
+
3
+import java.util.Date;
4
+import javax.persistence.*;
5
+import lombok.Getter;
6
+import lombok.Setter;
7
+import lombok.ToString;
8
+
9
+@Getter
10
+@Setter
11
+@ToString
12
+@Table(name = "ms_send_mail_history_record")
13
+public class MsSendMailHistoryRecord {
14
+    @Id
15
+    @GeneratedValue(generator = "JDBC")
16
+    private Long id;
17
+
18
+    /**
19
+     * 邮件名称
20
+     */
21
+    @Column(name = "mail_name")
22
+    private String mailName;
23
+
24
+    /**
25
+     * 邮件接收地址
26
+     */
27
+    @Column(name = "mail_address")
28
+    private String mailAddress;
29
+
30
+    /**
31
+     * 发送时间
32
+     */
33
+    @Column(name = "send_time")
34
+    private Date sendTime;
35
+
36
+    /**
37
+     * 案件编号
38
+     */
39
+    @Column(name = "case_num")
40
+    private String caseNum;
41
+
42
+    /**
43
+     * 发送状态
44
+     */
45
+    @Column(name = "send_status")
46
+    private Long sendStatus;
47
+
48
+    /**
49
+     * 立案申请id
50
+     */
51
+    @Column(name = "case_id")
52
+    private Long caseId;
53
+
54
+    /**
55
+     * 创建时间
56
+     */
57
+    @Column(name = "create_time")
58
+    private Date createTime;
59
+
60
+    /**
61
+     * 创建者
62
+     */
63
+    @Column(name = "create_by")
64
+    private String createBy;
65
+
66
+    /**
67
+     * 更新者
68
+     */
69
+    @Column(name = "update_by")
70
+    private String updateBy;
71
+
72
+    /**
73
+     * 更新时间
74
+     */
75
+    @Column(name = "update_time")
76
+    private Date updateTime;
77
+
78
+    /**
79
+     * 附件id用英文逗号隔开
80
+     */
81
+    @Column(name = "file_ids")
82
+    private String fileIds;
83
+
84
+    /**
85
+     * 邮件主题
86
+     */
87
+    @Column(name = "mail_subject")
88
+    private String mailSubject;
89
+
90
+    /**
91
+     * 邮件发送地址
92
+     */
93
+    @Column(name = "mail_from_address")
94
+    private String mailFromAddress;
95
+
96
+    /**
97
+     * 邮件父类id
98
+     */
99
+    @Column(name = "parent_id")
100
+    private Long parentId;
101
+
102
+    /**
103
+     * 邮件内容
104
+     */
105
+    @Column(name = "mail_content")
106
+    private String mailContent;
107
+}

+ 7
- 0
ruoyi-system/src/main/java/com/ruoyi/system/mapper/shortmessage/MsSendMailHistoryRecordMapper.java Wyświetl plik

@@ -0,0 +1,7 @@
1
+package com.ruoyi.system.mapper.shortmessage;
2
+
3
+import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
4
+import tk.mybatis.mapper.common.Mapper;
5
+
6
+public interface MsSendMailHistoryRecordMapper extends Mapper<MsSendMailHistoryRecord> {
7
+}

+ 11
- 1
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/domain/dto/sendrecord/SendMailRecord.java Wyświetl plik

@@ -3,9 +3,10 @@ package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
3 3
 import com.fasterxml.jackson.annotation.JsonFormat;
4 4
 import com.ruoyi.common.annotation.Excel;
5 5
 import com.ruoyi.common.core.domain.BaseEntity;
6
+import lombok.Data;
6 7
 
7 8
 import java.util.Date;
8
-
9
+@Data
9 10
 public class SendMailRecord   extends BaseEntity {
10 11
     private static final long serialVersionUID = 1L;
11 12
 
@@ -40,6 +41,15 @@ public class SendMailRecord   extends BaseEntity {
40 41
     private Integer sendStatus;
41 42
 
42 43
 
44
+    /** 附件id */
45
+    private String fileIds;
46
+
47
+    /** 邮件主题 */
48
+    private String mailSubject;
49
+
50
+    /** 邮件发件人地址 */
51
+    private String mailFromAddress;
52
+
43 53
 
44 54
     public Integer getSendStatus() {
45 55
         return sendStatus;

+ 25
- 3
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/mapper/sendrecord/SendMailRecordMapper.java Wyświetl plik

@@ -5,10 +5,32 @@ import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
5 5
 import java.util.List;
6 6
 
7 7
 public interface SendMailRecordMapper {
8
-    int saveSendMailRecord(SendMailRecord sendMailRecord);
8
+    /**
9
+     * 新增发送邮件记录
10
+     *
11
+     * @param sendMailRecord 发送邮件记录
12
+     * @return 结果
13
+     */
9 14
 
15
+    int saveSendMailRecord(SendMailRecord sendMailRecord);
16
+/**
17
+     * 查询发送邮件记录
18
+     *
19
+     * @param sendMailRecord 发送邮件记录
20
+     * @return 结果
21
+     */
10 22
     List<SendMailRecord>  selectSendMailRecord(SendMailRecord sendMailRecord);
23
+/**
24
+     * 修改发送邮件记录
25
+     *
26
+     * @param sendMailRecord 发送邮件记录
27
+     * @return 结果
28
+     */
29
+   int updateSendMailRecord(SendMailRecord sendMailRecord);
11 30
 
12
-
13
-
31
+    /**
32
+     * 根据id查询发送邮件记录
33
+     * @param id
34
+     */
35
+    SendMailRecord querySendMailRecordById(Long id);
14 36
 }

+ 21
- 4
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/ISendMailRecordService.java Wyświetl plik

@@ -1,15 +1,32 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.sendrecord;
2 2
 
3
+import com.ruoyi.common.core.domain.AjaxResult;
3 4
 import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
4 5
 
5 6
 import java.util.List;
6 7
 
7 8
 public interface ISendMailRecordService {
8
-
9
+    /**
10
+     * 查询邮件发送记录
11
+     *
12
+     * @param sendMailRecord
13
+     * @return
14
+     */
9 15
 
10 16
     List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord);
11 17
 
12
-
13
-
14
-
18
+    /**
19
+     * 编辑邮件记录
20
+     *
21
+     * @param sendMailRecord
22
+     */
23
+    AjaxResult updateSendMailRecord(SendMailRecord sendMailRecord);
24
+
25
+    /**
26
+     * 重新发送邮件
27
+     *
28
+     * @param sendMailRecord
29
+     * @return
30
+     */
31
+    Boolean reSendMailRecord(SendMailRecord sendMailRecord);
15 32
 }

+ 79
- 0
ruoyi-system/src/main/java/com/ruoyi/wisdomarbitrate/service/sendrecord/impl/SendMailRecordServiceImpl.java Wyświetl plik

@@ -1,11 +1,19 @@
1 1
 package com.ruoyi.wisdomarbitrate.service.sendrecord.impl;
2 2
 
3
+import com.ruoyi.common.core.domain.AjaxResult;
4
+import com.ruoyi.common.utils.EmailOutUtil;
5
+import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
6
+import com.ruoyi.system.mapper.shortmessage.MsSendMailHistoryRecordMapper;
3 7
 import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
8
+import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
9
+import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
4 10
 import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SendMailRecordMapper;
5 11
 import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
12
+import org.springframework.beans.BeanUtils;
6 13
 import org.springframework.beans.factory.annotation.Autowired;
7 14
 import org.springframework.stereotype.Service;
8 15
 
16
+import java.io.File;
9 17
 import java.util.List;
10 18
 
11 19
 @Service
@@ -20,6 +28,77 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
20 28
         return records;
21 29
     }
22 30
 
31
+    @Autowired
32
+    MsSendMailHistoryRecordMapper msSendMailHistoryRecordMapper;
33
+
34
+    /**
35
+     * 编辑邮件记录
36
+     *
37
+     * @param sendMailRecord
38
+     */
39
+    @Override
40
+    public AjaxResult updateSendMailRecord(SendMailRecord sendMailRecord) {
41
+        try {
42
+            if (sendMailRecord != null && sendMailRecord.getId() != null) {
43
+                SendMailRecord old = sendMailRecordMapper.querySendMailRecordById(sendMailRecord.getId());
44
+                MsSendMailHistoryRecord msSendMailHistoryRecord = new MsSendMailHistoryRecord();
45
+                BeanUtils.copyProperties(old, msSendMailHistoryRecord);
46
+                msSendMailHistoryRecord.setParentId(old.getId());
47
+                msSendMailHistoryRecord.setId(null);
48
+                msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
49
+                sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
50
+                return AjaxResult.success("编辑成功");
51
+            } else {
52
+                return AjaxResult.error("编辑失败");
53
+            }
54
+        } catch (Exception e) {
55
+            e.printStackTrace();
56
+            return AjaxResult.error("编辑失败");
57
+        }
58
+    }
23 59
 
60
+    @Autowired
61
+    private EmailOutUtil emailOutUtil;
62
+    @Autowired
63
+    MsCaseAttachMapper msCaseAttachMapper;
24 64
 
65
+    /**
66
+     * 重新发送邮件
67
+     *
68
+     * @param sendMailRecord
69
+     * @return
70
+     */
71
+    @Override
72
+    public Boolean reSendMailRecord(SendMailRecord sendMailRecord) {
73
+        List<File> fileList = null;
74
+        if (sendMailRecord.getFileIds() != null && sendMailRecord.getFileIds() != "") {
75
+            String[] fileIds = sendMailRecord.getFileIds().split(",");
76
+            for (int i = 0; i < fileIds.length; i++) {
77
+                String fileId = fileIds[i];
78
+                try {
79
+                    Long id = Long.parseLong(fileId);
80
+                    MsCaseAttach msCaseAttach = msCaseAttachMapper.queryAnnexById(id);
81
+                    String annexPath = msCaseAttach.getAnnexPath();
82
+                    if (annexPath != null && annexPath != "") {
83
+                        String prefix = "/profile";
84
+                        int startIndex = prefix.length();
85
+                        String path = "/home/ruoyi/uploadPath/" + annexPath.substring(startIndex + 1);
86
+                        File file = new File(path);
87
+                        fileList.add(file);
88
+                    }
89
+                } catch (Exception e) {
90
+                    e.printStackTrace();
91
+                }
92
+            }
93
+        }
94
+        Boolean flag = emailOutUtil.sendEmil(sendMailRecord.getMailAddress(), sendMailRecord.getMailContent(), sendMailRecord.getMailSubject(), fileList, null);
95
+       //发送成功后更细邮件记录的发送时间和发送状态
96
+        if (flag) {
97
+            sendMailRecord.setSendStatus(1);
98
+            sendMailRecord.setSendTime(new java.util.Date());
99
+            sendMailRecord.setUpdateTime(new java.util.Date());
100
+            sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
101
+        }
102
+        return flag;
103
+    }
25 104
 }

+ 25
- 0
ruoyi-system/src/main/resources/com/ruoyi/system/mapper/shortmessage/MsSendMailHistoryRecordMapper.xml Wyświetl plik

@@ -0,0 +1,25 @@
1
+<?xml version="1.0" encoding="UTF-8"?>
2
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
3
+<mapper namespace="com.ruoyi.system.mapper.shortmessage.MsSendMailHistoryRecordMapper">
4
+  <resultMap id="BaseResultMap" type="com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord">
5
+    <!--
6
+      WARNING - @mbg.generated
7
+    -->
8
+    <id column="id" jdbcType="BIGINT" property="id" />
9
+    <result column="mail_name" jdbcType="VARCHAR" property="mailName" />
10
+    <result column="mail_address" jdbcType="VARCHAR" property="mailAddress" />
11
+    <result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
12
+    <result column="case_num" jdbcType="VARCHAR" property="caseNum" />
13
+    <result column="send_status" jdbcType="BIGINT" property="sendStatus" />
14
+    <result column="case_id" jdbcType="BIGINT" property="caseId" />
15
+    <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
16
+    <result column="create_by" jdbcType="VARCHAR" property="createBy" />
17
+    <result column="update_by" jdbcType="VARCHAR" property="updateBy" />
18
+    <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
19
+    <result column="file_ids" jdbcType="VARCHAR" property="fileIds" />
20
+    <result column="mail_subject" jdbcType="VARCHAR" property="mailSubject" />
21
+    <result column="mail_from_address" jdbcType="VARCHAR" property="mailFromAddress" />
22
+    <result column="parent_id" jdbcType="BIGINT" property="parentId" />
23
+    <result column="mail_content" jdbcType="LONGVARCHAR" property="mailContent" />
24
+  </resultMap>
25
+</mapper>

+ 34
- 19
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SendMailRecordMapper.xml Wyświetl plik

@@ -5,22 +5,26 @@
5 5
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.sendrecord.SendMailRecordMapper">
6 6
 
7 7
     <resultMap type="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord" id="SendMailRecordResult">
8
-        <id     property="id"       column="id"      />
9
-        <result property="mailName"       column="mail_name"      />
10
-        <result property="mailContent"     column="mail_content"    />
11
-        <result property="mailAddress"     column="mail_address"    />
12
-        <result property="sendTime"        column="send_time"        />
13
-        <result property="caseId"  column="case_id"  />
14
-        <result property="caseNum"  column="case_num"  />
15
-        <result property="sendStatus"  column="send_status"  />
8
+        <id property="id" column="id"/>
9
+        <result property="mailName" column="mail_name"/>
10
+        <result property="mailContent" column="mail_content"/>
11
+        <result property="mailAddress" column="mail_address"/>
12
+        <result property="sendTime" column="send_time"/>
13
+        <result property="caseId" column="case_id"/>
14
+        <result property="caseNum" column="case_num"/>
15
+        <result property="sendStatus" column="send_status"/>
16
+        <result property="fileIds" column="file_ids"/>
17
+        <result property="mailSubject" column="mail_subject"/>
18
+        <result property="mailFromAddress" column="mail_from_address"/>
16 19
 
17 20
     </resultMap>
18 21
 
19
-    <select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord" resultMap="SendMailRecordResult">
22
+    <select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord"
23
+            resultMap="SendMailRecordResult">
20 24
         SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
21
-        s.update_by ,s.update_time , s.send_status ,c.case_num
25
+        s.update_by ,s.update_time , s.send_status ,s.file_ids ,s.mail_subject ,s.mail_from_address ,c.case_num
22 26
         from ms_send_mail_record s left join ms_case_application c
23
-        on s.case_id  = c.id
27
+        on s.case_id = c.id
24 28
         <where>
25 29
             <if test="caseNum != null and caseNum != ''">
26 30
                 AND c.case_num = #{caseNum}
@@ -38,6 +42,9 @@
38 42
         <if test="caseId != null ">case_id,</if>
39 43
         <if test="sendStatus != null ">send_status,</if>
40 44
         <if test="createBy != null  and createBy != ''">create_by,</if>
45
+        <if test="fileIds != null  and fileIds != ''">file_ids,</if>
46
+        <if test="mailSubject != null  and mailSubject != ''">mail_subject,</if>
47
+        <if test="mailFromAddress != null  and mailFromAddress != ''">mail_from_address,</if>
41 48
         create_time
42 49
         )values(
43 50
         <if test="mailName != null and mailName != ''">#{mailName},</if>
@@ -47,15 +54,23 @@
47 54
         <if test="caseId != null ">#{caseId},</if>
48 55
         <if test="sendStatus != null ">#{sendStatus},</if>
49 56
         <if test="createBy != null  and createBy != ''">#{createBy},</if>
57
+        <if test="fileIds != null  and fileIds != ''">#{fileIds},</if>
58
+        <if test="mailSubject != null  and mailSubject != ''">#{mailSubject},</if>
59
+        <if test="mailFromAddress != null  and mailFromAddress != ''">#{mailFromAddress},</if>
50 60
         sysdate()
51 61
         )
52 62
     </insert>
53
-
54
-
55
-
56
-
57
-
58
-
59
-
60
-
63
+    <update id="updateSendMailRecord">
64
+        update ms_send_mail_record
65
+        set mail_content= #{mailContent},
66
+            update_time=#{updateTime},
67
+            send_time=#{sendTime},
68
+            send_status=#{sendStatus}
69
+        where id = #{id}
70
+    </update>
71
+    <select id="querySendMailRecordById" resultMap="SendMailRecordResult">
72
+        select *
73
+        from ms_send_mail_record
74
+        where id = #{id}
75
+    </select>
61 76
 </mapper>

+ 45
- 35
ruoyi-system/src/main/resources/mapper/wisdomarbitrate/sendrecord/SmsRecordMapper.xml Wyświetl plik

@@ -5,20 +5,21 @@
5 5
 
6 6
 <mapper namespace="com.ruoyi.wisdomarbitrate.mapper.sendrecord.SmsRecordMapper">
7 7
     <resultMap type="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord" id="SmsSendRecordResult">
8
-        <id     property="id"       column="id"      />
9
-        <result property="caseId"       column="case_appli_id"      />
10
-        <result property="caseNum"       column="case_num"      />
11
-        <result property="phone"     column="phone"    />
12
-        <result property="sendTime"     column="send_time"    />
13
-        <result property="sendContent"        column="send_content"        />
14
-        <result property="createTime"   column="create_time"  />
15
-        <result property="updateTime"   column="update_time"  />
16
-        <result property="createBy"   column="create_by"  />
17
-        <result property="updateBy"   column="update_by"  />
18
-        <result property="sendStatus"   column="send_status"  />
19
-        <result property="sid"   column="sid"  />
8
+        <id property="id" column="id"/>
9
+        <result property="caseId" column="case_appli_id"/>
10
+        <result property="caseNum" column="case_num"/>
11
+        <result property="phone" column="phone"/>
12
+        <result property="sendTime" column="send_time"/>
13
+        <result property="sendContent" column="send_content"/>
14
+        <result property="createTime" column="create_time"/>
15
+        <result property="updateTime" column="update_time"/>
16
+        <result property="createBy" column="create_by"/>
17
+        <result property="updateBy" column="update_by"/>
18
+        <result property="sendStatus" column="send_status"/>
19
+        <result property="sid" column="sid"/>
20 20
     </resultMap>
21
-    <insert id="saveSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord" useGeneratedKeys="true" keyProperty="id">
21
+    <insert id="saveSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord"
22
+            useGeneratedKeys="true" keyProperty="id">
22 23
 
23 24
         insert into ms_sms_send_record(
24 25
         <if test="caseId != null ">case_appli_id,</if>
@@ -47,31 +48,32 @@
47 48
     <insert id="batchSaveSmsSendRecord">
48 49
 
49 50
         insert into ms_sms_send_record(
50
-       case_appli_id,
51
-       case_num,
52
-       phone,
53
-       send_time,
54
-       send_content,
55
-       create_by,
56
-       send_status,
51
+        case_appli_id,
52
+        case_num,
53
+        phone,
54
+        send_time,
55
+        send_content,
56
+        create_by,
57
+        send_status,
57 58
         create_time,
58 59
         sid,reason
59 60
         )values
60 61
         <foreach item="item" index="index" collection="list" separator=",">
61
-        (
62
-        #{item.caseId},
63
-        #{item.caseNum},
64
-        #{item.phone},
65
-        #{item.sendTime},
66
-        #{item.sendContent},
67
-        #{item.createBy},
68
-        #{item.sendStatus},
69
-        sysdate(),#{sid},#{reason}
70
-        )
62
+            (
63
+            #{item.caseId},
64
+            #{item.caseNum},
65
+            #{item.phone},
66
+            #{item.sendTime},
67
+            #{item.sendContent},
68
+            #{item.createBy},
69
+            #{item.sendStatus},
70
+            sysdate(),#{sid},#{reason}
71
+            )
71 72
         </foreach>
72 73
     </insert>
73 74
 
74
-    <select id="getSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord" resultMap="SmsSendRecordResult">
75
+    <select id="getSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord"
76
+            resultMap="SmsSendRecordResult">
75 77
 
76 78
         select *
77 79
         from ms_sms_send_record
@@ -84,20 +86,28 @@
84 86
     </select>
85 87
 
86 88
     <select id="selectBySId" resultMap="SmsSendRecordResult">
87
-        select  * from ms_sms_send_record where sid=#{sid}
89
+        select *
90
+        from ms_sms_send_record
91
+        where sid = #{sid}
88 92
     </select>
89 93
 
90 94
     <update id="updateStatus">
91 95
         update ms_sms_send_record
92
-       set send_status= #{sendStatus} ,reason=#{reason} where sid=#{sid}
96
+        set send_status= #{sendStatus},
97
+            reason=#{reason}
98
+        where sid = #{sid}
93 99
     </update>
94 100
     <update id="updateSendContent">
95 101
         update ms_sms_send_record
96
-        set send_content= #{sendContent} ,update_time=#{updateTime} where id=#{id}
102
+        set send_content= #{sendContent},
103
+            update_time=#{updateTime}
104
+        where id = #{id}
97 105
     </update>
98 106
 
99 107
     <select id="selectById" resultMap="SmsSendRecordResult">
100
-        select  * from ms_sms_send_record where id=#{id}
108
+        select *
109
+        from ms_sms_send_record
110
+        where id = #{id}
101 111
     </select>
102 112
 </mapper>
103 113