新增邮件发送记录编辑接口,邮件记录重新发送接口 #140
+22
-6
@@ -1,13 +1,12 @@
|
|||||||
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
||||||
|
|
||||||
import com.ruoyi.common.core.controller.BaseController;
|
import com.ruoyi.common.core.controller.BaseController;
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.common.core.page.TableDataInfo;
|
import com.ruoyi.common.core.page.TableDataInfo;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||||
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.web.bind.annotation.GetMapping;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@@ -21,13 +20,30 @@ public class SendMailRecordController extends BaseController {
|
|||||||
* 查询发送邮件记录列表
|
* 查询发送邮件记录列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public TableDataInfo list(SendMailRecord sendMailRecord)
|
public TableDataInfo list(SendMailRecord sendMailRecord) {
|
||||||
{
|
|
||||||
startPage();
|
startPage();
|
||||||
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
||||||
return getDataTable(list);
|
return getDataTable(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑邮件记录
|
||||||
|
*/
|
||||||
|
@PostMapping("/update")
|
||||||
|
public AjaxResult update(@RequestBody SendMailRecord sendMailRecord) {
|
||||||
|
return sendMailRecordService.updateSendMailRecord(sendMailRecord);
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新发送邮件记录
|
||||||
|
*/
|
||||||
|
@PostMapping("/reSendMailRecord")
|
||||||
|
public AjaxResult reSendMailRecord(@RequestBody SendMailRecord sendMailRecord) {
|
||||||
|
Boolean aBoolean = sendMailRecordService.reSendMailRecord(sendMailRecord);
|
||||||
|
if (aBoolean) {
|
||||||
|
return AjaxResult.success("发送成功");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("发送失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+107
@@ -0,0 +1,107 @@
|
|||||||
|
package com.ruoyi.system.domain.entity.shortmessage;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
import javax.persistence.*;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import lombok.ToString;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
@ToString
|
||||||
|
@Table(name = "ms_send_mail_history_record")
|
||||||
|
public class MsSendMailHistoryRecord {
|
||||||
|
@Id
|
||||||
|
@GeneratedValue(generator = "JDBC")
|
||||||
|
private Long id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件名称
|
||||||
|
*/
|
||||||
|
@Column(name = "mail_name")
|
||||||
|
private String mailName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件接收地址
|
||||||
|
*/
|
||||||
|
@Column(name = "mail_address")
|
||||||
|
private String mailAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送时间
|
||||||
|
*/
|
||||||
|
@Column(name = "send_time")
|
||||||
|
private Date sendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 案件编号
|
||||||
|
*/
|
||||||
|
@Column(name = "case_num")
|
||||||
|
private String caseNum;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发送状态
|
||||||
|
*/
|
||||||
|
@Column(name = "send_status")
|
||||||
|
private Long sendStatus;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 立案申请id
|
||||||
|
*/
|
||||||
|
@Column(name = "case_id")
|
||||||
|
private Long caseId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@Column(name = "create_time")
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
@Column(name = "create_by")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
@Column(name = "update_by")
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
@Column(name = "update_time")
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 附件id用英文逗号隔开
|
||||||
|
*/
|
||||||
|
@Column(name = "file_ids")
|
||||||
|
private String fileIds;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件主题
|
||||||
|
*/
|
||||||
|
@Column(name = "mail_subject")
|
||||||
|
private String mailSubject;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件发送地址
|
||||||
|
*/
|
||||||
|
@Column(name = "mail_from_address")
|
||||||
|
private String mailFromAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件父类id
|
||||||
|
*/
|
||||||
|
@Column(name = "parent_id")
|
||||||
|
private Long parentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 邮件内容
|
||||||
|
*/
|
||||||
|
@Column(name = "mail_content")
|
||||||
|
private String mailContent;
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
package com.ruoyi.system.mapper.shortmessage;
|
||||||
|
|
||||||
|
import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
|
||||||
|
import tk.mybatis.mapper.common.Mapper;
|
||||||
|
|
||||||
|
public interface MsSendMailHistoryRecordMapper extends Mapper<MsSendMailHistoryRecord> {
|
||||||
|
}
|
||||||
+11
-1
@@ -3,9 +3,10 @@ package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
|||||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
import com.ruoyi.common.annotation.Excel;
|
import com.ruoyi.common.annotation.Excel;
|
||||||
import com.ruoyi.common.core.domain.BaseEntity;
|
import com.ruoyi.common.core.domain.BaseEntity;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@Data
|
||||||
public class SendMailRecord extends BaseEntity {
|
public class SendMailRecord extends BaseEntity {
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
@@ -40,6 +41,15 @@ public class SendMailRecord extends BaseEntity {
|
|||||||
private Integer sendStatus;
|
private Integer sendStatus;
|
||||||
|
|
||||||
|
|
||||||
|
/** 附件id */
|
||||||
|
private String fileIds;
|
||||||
|
|
||||||
|
/** 邮件主题 */
|
||||||
|
private String mailSubject;
|
||||||
|
|
||||||
|
/** 邮件发件人地址 */
|
||||||
|
private String mailFromAddress;
|
||||||
|
|
||||||
|
|
||||||
public Integer getSendStatus() {
|
public Integer getSendStatus() {
|
||||||
return sendStatus;
|
return sendStatus;
|
||||||
|
|||||||
+25
-3
@@ -5,10 +5,32 @@ import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
|||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface SendMailRecordMapper {
|
public interface SendMailRecordMapper {
|
||||||
|
/**
|
||||||
|
* 新增发送邮件记录
|
||||||
|
*
|
||||||
|
* @param sendMailRecord 发送邮件记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
|
||||||
int saveSendMailRecord(SendMailRecord sendMailRecord);
|
int saveSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
|
/**
|
||||||
|
* 查询发送邮件记录
|
||||||
|
*
|
||||||
|
* @param sendMailRecord 发送邮件记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
List<SendMailRecord> selectSendMailRecord(SendMailRecord sendMailRecord);
|
List<SendMailRecord> selectSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
|
/**
|
||||||
|
* 修改发送邮件记录
|
||||||
|
*
|
||||||
|
* @param sendMailRecord 发送邮件记录
|
||||||
|
* @return 结果
|
||||||
|
*/
|
||||||
|
int updateSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 根据id查询发送邮件记录
|
||||||
|
* @param id
|
||||||
|
*/
|
||||||
|
SendMailRecord querySendMailRecordById(Long id);
|
||||||
}
|
}
|
||||||
|
|||||||
+20
-3
@@ -1,15 +1,32 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service.sendrecord;
|
package com.ruoyi.wisdomarbitrate.service.sendrecord;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface ISendMailRecordService {
|
public interface ISendMailRecordService {
|
||||||
|
/**
|
||||||
|
* 查询邮件发送记录
|
||||||
|
*
|
||||||
|
* @param sendMailRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
|
||||||
List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord);
|
List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑邮件记录
|
||||||
|
*
|
||||||
|
* @param sendMailRecord
|
||||||
|
*/
|
||||||
|
AjaxResult updateSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新发送邮件
|
||||||
|
*
|
||||||
|
* @param sendMailRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
Boolean reSendMailRecord(SendMailRecord sendMailRecord);
|
||||||
}
|
}
|
||||||
|
|||||||
+79
@@ -1,11 +1,19 @@
|
|||||||
package com.ruoyi.wisdomarbitrate.service.sendrecord.impl;
|
package com.ruoyi.wisdomarbitrate.service.sendrecord.impl;
|
||||||
|
|
||||||
|
import com.ruoyi.common.core.domain.AjaxResult;
|
||||||
|
import com.ruoyi.common.utils.EmailOutUtil;
|
||||||
|
import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
|
||||||
|
import com.ruoyi.system.mapper.shortmessage.MsSendMailHistoryRecordMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||||
|
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||||
|
import com.ruoyi.wisdomarbitrate.mapper.mscase.MsCaseAttachMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SendMailRecordMapper;
|
import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SendMailRecordMapper;
|
||||||
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
||||||
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Service
|
@Service
|
||||||
@@ -20,6 +28,77 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
|||||||
return records;
|
return records;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
MsSendMailHistoryRecordMapper msSendMailHistoryRecordMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编辑邮件记录
|
||||||
|
*
|
||||||
|
* @param sendMailRecord
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public AjaxResult updateSendMailRecord(SendMailRecord sendMailRecord) {
|
||||||
|
try {
|
||||||
|
if (sendMailRecord != null && sendMailRecord.getId() != null) {
|
||||||
|
SendMailRecord old = sendMailRecordMapper.querySendMailRecordById(sendMailRecord.getId());
|
||||||
|
MsSendMailHistoryRecord msSendMailHistoryRecord = new MsSendMailHistoryRecord();
|
||||||
|
BeanUtils.copyProperties(old, msSendMailHistoryRecord);
|
||||||
|
msSendMailHistoryRecord.setParentId(old.getId());
|
||||||
|
msSendMailHistoryRecord.setId(null);
|
||||||
|
msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
|
||||||
|
sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
|
||||||
|
return AjaxResult.success("编辑成功");
|
||||||
|
} else {
|
||||||
|
return AjaxResult.error("编辑失败");
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
return AjaxResult.error("编辑失败");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private EmailOutUtil emailOutUtil;
|
||||||
|
@Autowired
|
||||||
|
MsCaseAttachMapper msCaseAttachMapper;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 重新发送邮件
|
||||||
|
*
|
||||||
|
* @param sendMailRecord
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public Boolean reSendMailRecord(SendMailRecord sendMailRecord) {
|
||||||
|
List<File> fileList = null;
|
||||||
|
if (sendMailRecord.getFileIds() != null && sendMailRecord.getFileIds() != "") {
|
||||||
|
String[] fileIds = sendMailRecord.getFileIds().split(",");
|
||||||
|
for (int i = 0; i < fileIds.length; i++) {
|
||||||
|
String fileId = fileIds[i];
|
||||||
|
try {
|
||||||
|
Long id = Long.parseLong(fileId);
|
||||||
|
MsCaseAttach msCaseAttach = msCaseAttachMapper.queryAnnexById(id);
|
||||||
|
String annexPath = msCaseAttach.getAnnexPath();
|
||||||
|
if (annexPath != null && annexPath != "") {
|
||||||
|
String prefix = "/profile";
|
||||||
|
int startIndex = prefix.length();
|
||||||
|
String path = "/home/ruoyi/uploadPath/" + annexPath.substring(startIndex + 1);
|
||||||
|
File file = new File(path);
|
||||||
|
fileList.add(file);
|
||||||
|
}
|
||||||
|
} catch (Exception e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Boolean flag = emailOutUtil.sendEmil(sendMailRecord.getMailAddress(), sendMailRecord.getMailContent(), sendMailRecord.getMailSubject(), fileList, null);
|
||||||
|
//发送成功后更细邮件记录的发送时间和发送状态
|
||||||
|
if (flag) {
|
||||||
|
sendMailRecord.setSendStatus(1);
|
||||||
|
sendMailRecord.setSendTime(new java.util.Date());
|
||||||
|
sendMailRecord.setUpdateTime(new java.util.Date());
|
||||||
|
sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
|
||||||
|
}
|
||||||
|
return flag;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+25
@@ -0,0 +1,25 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
|
<mapper namespace="com.ruoyi.system.mapper.shortmessage.MsSendMailHistoryRecordMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord">
|
||||||
|
<!--
|
||||||
|
WARNING - @mbg.generated
|
||||||
|
-->
|
||||||
|
<id column="id" jdbcType="BIGINT" property="id" />
|
||||||
|
<result column="mail_name" jdbcType="VARCHAR" property="mailName" />
|
||||||
|
<result column="mail_address" jdbcType="VARCHAR" property="mailAddress" />
|
||||||
|
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime" />
|
||||||
|
<result column="case_num" jdbcType="VARCHAR" property="caseNum" />
|
||||||
|
<result column="send_status" jdbcType="BIGINT" property="sendStatus" />
|
||||||
|
<result column="case_id" jdbcType="BIGINT" property="caseId" />
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||||
|
<result column="file_ids" jdbcType="VARCHAR" property="fileIds" />
|
||||||
|
<result column="mail_subject" jdbcType="VARCHAR" property="mailSubject" />
|
||||||
|
<result column="mail_from_address" jdbcType="VARCHAR" property="mailFromAddress" />
|
||||||
|
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
|
||||||
|
<result column="mail_content" jdbcType="LONGVARCHAR" property="mailContent" />
|
||||||
|
</resultMap>
|
||||||
|
</mapper>
|
||||||
+25
-10
@@ -13,12 +13,16 @@
|
|||||||
<result property="caseId" column="case_id"/>
|
<result property="caseId" column="case_id"/>
|
||||||
<result property="caseNum" column="case_num"/>
|
<result property="caseNum" column="case_num"/>
|
||||||
<result property="sendStatus" column="send_status"/>
|
<result property="sendStatus" column="send_status"/>
|
||||||
|
<result property="fileIds" column="file_ids"/>
|
||||||
|
<result property="mailSubject" column="mail_subject"/>
|
||||||
|
<result property="mailFromAddress" column="mail_from_address"/>
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord" resultMap="SendMailRecordResult">
|
<select id="selectSendMailRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord"
|
||||||
|
resultMap="SendMailRecordResult">
|
||||||
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
|
SELECT s.id ,s.mail_name ,s.mail_content ,s.mail_address ,s.send_time ,s.case_id ,s.create_time ,s.create_by ,
|
||||||
s.update_by ,s.update_time , s.send_status ,c.case_num
|
s.update_by ,s.update_time , s.send_status ,s.file_ids ,s.mail_subject ,s.mail_from_address ,c.case_num
|
||||||
from ms_send_mail_record s left join ms_case_application c
|
from ms_send_mail_record s left join ms_case_application c
|
||||||
on s.case_id = c.id
|
on s.case_id = c.id
|
||||||
<where>
|
<where>
|
||||||
@@ -38,6 +42,9 @@
|
|||||||
<if test="caseId != null ">case_id,</if>
|
<if test="caseId != null ">case_id,</if>
|
||||||
<if test="sendStatus != null ">send_status,</if>
|
<if test="sendStatus != null ">send_status,</if>
|
||||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||||
|
<if test="fileIds != null and fileIds != ''">file_ids,</if>
|
||||||
|
<if test="mailSubject != null and mailSubject != ''">mail_subject,</if>
|
||||||
|
<if test="mailFromAddress != null and mailFromAddress != ''">mail_from_address,</if>
|
||||||
create_time
|
create_time
|
||||||
)values(
|
)values(
|
||||||
<if test="mailName != null and mailName != ''">#{mailName},</if>
|
<if test="mailName != null and mailName != ''">#{mailName},</if>
|
||||||
@@ -47,15 +54,23 @@
|
|||||||
<if test="caseId != null ">#{caseId},</if>
|
<if test="caseId != null ">#{caseId},</if>
|
||||||
<if test="sendStatus != null ">#{sendStatus},</if>
|
<if test="sendStatus != null ">#{sendStatus},</if>
|
||||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||||
|
<if test="fileIds != null and fileIds != ''">#{fileIds},</if>
|
||||||
|
<if test="mailSubject != null and mailSubject != ''">#{mailSubject},</if>
|
||||||
|
<if test="mailFromAddress != null and mailFromAddress != ''">#{mailFromAddress},</if>
|
||||||
sysdate()
|
sysdate()
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
|
<update id="updateSendMailRecord">
|
||||||
|
update ms_send_mail_record
|
||||||
|
set mail_content= #{mailContent},
|
||||||
|
update_time=#{updateTime},
|
||||||
|
send_time=#{sendTime},
|
||||||
|
send_status=#{sendStatus}
|
||||||
|
where id = #{id}
|
||||||
|
</update>
|
||||||
|
<select id="querySendMailRecordById" resultMap="SendMailRecordResult">
|
||||||
|
select *
|
||||||
|
from ms_send_mail_record
|
||||||
|
where id = #{id}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
+16
-6
@@ -18,7 +18,8 @@
|
|||||||
<result property="sendStatus" column="send_status"/>
|
<result property="sendStatus" column="send_status"/>
|
||||||
<result property="sid" column="sid"/>
|
<result property="sid" column="sid"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<insert id="saveSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord" useGeneratedKeys="true" keyProperty="id">
|
<insert id="saveSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord"
|
||||||
|
useGeneratedKeys="true" keyProperty="id">
|
||||||
|
|
||||||
insert into ms_sms_send_record(
|
insert into ms_sms_send_record(
|
||||||
<if test="caseId != null ">case_appli_id,</if>
|
<if test="caseId != null ">case_appli_id,</if>
|
||||||
@@ -71,7 +72,8 @@
|
|||||||
</foreach>
|
</foreach>
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="getSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord" resultMap="SmsSendRecordResult">
|
<select id="getSmsSendRecord" parameterType="com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord"
|
||||||
|
resultMap="SmsSendRecordResult">
|
||||||
|
|
||||||
select *
|
select *
|
||||||
from ms_sms_send_record
|
from ms_sms_send_record
|
||||||
@@ -84,20 +86,28 @@
|
|||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectBySId" resultMap="SmsSendRecordResult">
|
<select id="selectBySId" resultMap="SmsSendRecordResult">
|
||||||
select * from ms_sms_send_record where sid=#{sid}
|
select *
|
||||||
|
from ms_sms_send_record
|
||||||
|
where sid = #{sid}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<update id="updateStatus">
|
<update id="updateStatus">
|
||||||
update ms_sms_send_record
|
update ms_sms_send_record
|
||||||
set send_status= #{sendStatus} ,reason=#{reason} where sid=#{sid}
|
set send_status= #{sendStatus},
|
||||||
|
reason=#{reason}
|
||||||
|
where sid = #{sid}
|
||||||
</update>
|
</update>
|
||||||
<update id="updateSendContent">
|
<update id="updateSendContent">
|
||||||
update ms_sms_send_record
|
update ms_sms_send_record
|
||||||
set send_content= #{sendContent} ,update_time=#{updateTime} where id=#{id}
|
set send_content= #{sendContent},
|
||||||
|
update_time=#{updateTime}
|
||||||
|
where id = #{id}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectById" resultMap="SmsSendRecordResult">
|
<select id="selectById" resultMap="SmsSendRecordResult">
|
||||||
select * from ms_sms_send_record where id=#{id}
|
select *
|
||||||
|
from ms_sms_send_record
|
||||||
|
where id = #{id}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user