短信邮件完善
This commit is contained in:
+5
-13
@@ -496,17 +496,7 @@ public class CaseApplicationController extends BaseController {
|
||||
return AjaxResult.success(caseApplicationService.updateCaseLockStatus(caseApplication));
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/smsRecord")
|
||||
public TableDataInfo getSmsSendRecord(@RequestBody SmsSendRecord smsSendRecord){
|
||||
startPage();
|
||||
List<SmsSendRecord> list = caseApplicationService.getSmsSendRecord(smsSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取userSign
|
||||
* @param userId
|
||||
@@ -566,12 +556,14 @@ public class CaseApplicationController extends BaseController {
|
||||
/**
|
||||
* 案件压缩包导入
|
||||
* @param file
|
||||
* @param applicantType 申请人类型,自然人-1,机构-2
|
||||
* @param resType 被申请人类型,自然人-1,机构-2
|
||||
* @return
|
||||
* @throws IOException
|
||||
*/
|
||||
@PostMapping("/uploadCaseZipFile")
|
||||
public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file,@RequestParam("templateId") Long templateId) throws IOException {
|
||||
return caseApplicationService.uploadCaseZipFile(file,templateId);
|
||||
public AjaxResult uploadCaseZipFile(@RequestParam("file") MultipartFile file,@RequestParam("templateId") Long templateId,Integer applicantType,Integer resType) throws IOException {
|
||||
return caseApplicationService.uploadCaseZipFile(file,templateId,applicantType,resType);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
-48
@@ -1,48 +0,0 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseLogRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.SendMailRecord;
|
||||
import com.ruoyi.wisdomarbitrate.service.ISendMailRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/sendMailRecord")
|
||||
public class SendMailRecordController extends BaseController {
|
||||
@Autowired
|
||||
private ISendMailRecordService sendMailRecordService;
|
||||
|
||||
/**
|
||||
* 查询发送邮件记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SendMailRecord sendMailRecord)
|
||||
{
|
||||
startPage();
|
||||
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
||||
// /**
|
||||
// * 新增立案数据
|
||||
// */
|
||||
// @Log(title = "新增立案数据", businessType = BusinessType.INSERT)
|
||||
// @PostMapping("/addSendMailRecord")
|
||||
// public AjaxResult addSendMailRecord(@Validated @RequestBody SendMailRecord sendMailRecord)
|
||||
// {
|
||||
//
|
||||
// return toAjax(sendMailRecordService.addSendMailRecord(sendMailRecord));
|
||||
// }
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SendMailRecord;
|
||||
import com.ruoyi.wisdomarbitrate.service.sendrecord.ISendMailRecordService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/sendMailRecord")
|
||||
public class SendMailRecordController extends BaseController {
|
||||
@Autowired
|
||||
private ISendMailRecordService sendMailRecordService;
|
||||
|
||||
/**
|
||||
* 查询发送邮件记录列表
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(SendMailRecord sendMailRecord) {
|
||||
startPage();
|
||||
List<SendMailRecord> list = sendMailRecordService.selectSendMailRecordList(sendMailRecord);
|
||||
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("发送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
+143
@@ -0,0 +1,143 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.sendrecord;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.framework.web.service.TokenService;
|
||||
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.dto.sendrecord.SmsSendRecord;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.sms.MsSmsSendRecordParam;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.sms.MsSmsTemplateParam;
|
||||
import com.ruoyi.wisdomarbitrate.domain.shortmessage.MeetingInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.shortmessage.MeetingInfoVO;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.shortmessage.ReSendMessageVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.sendrecord.SmsRecordMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.shortmessage.MeetingInfoMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.sms.MsSmsSendHistoryRecordParamMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.sms.MsSmsSendRecordParamMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.shortmessage.ShortMessageService;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("/shortMessage")
|
||||
public class ShortMessageController extends BaseController {
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
@Autowired
|
||||
private ShortMessageService shortMessageService;
|
||||
@Autowired
|
||||
MsSmsSendRecordParamMapper recordParamMapper;
|
||||
@Autowired
|
||||
MsSmsSendHistoryRecordParamMapper historyRecordParamMapper;
|
||||
|
||||
/**
|
||||
* 查询短信发送记录
|
||||
*
|
||||
* @param smsSendRecord
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/recordList")
|
||||
public TableDataInfo smsSendRecordList(SmsSendRecord smsSendRecord) {
|
||||
startPage();
|
||||
List<SmsSendRecord> list = shortMessageService.smsSendRecordList(smsSendRecord);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
@Anonymous
|
||||
@PostMapping("/updateSendContent")
|
||||
public AjaxResult update(@RequestBody SmsSendRecord smsSendRecord) {
|
||||
if (smsSendRecord == null || smsSendRecord.getId() == null || CollectionUtil.isEmpty(smsSendRecord.getTemplateParams())) {
|
||||
return AjaxResult.error("参数校验失败");
|
||||
}
|
||||
// 查询当前版本记录
|
||||
SmsSendRecord oldSendRecord = smsRecordMapper.selectById(smsSendRecord.getId());
|
||||
smsSendRecord.setUpdateTime(new Date());
|
||||
// 更新短信内容,先删除短信记录参数表
|
||||
Example recordParamExam = new Example(MsSmsSendRecordParam.class);
|
||||
recordParamExam.createCriteria().andEqualTo("smsRecordId", smsSendRecord.getId());
|
||||
recordParamMapper.deleteByExample(recordParamExam);
|
||||
// 新增短信记录参数表
|
||||
List<MsSmsSendRecordParam> recordParams = new ArrayList<>();
|
||||
for (MsSmsTemplateParam templateParam : smsSendRecord.getTemplateParams()) {
|
||||
MsSmsSendRecordParam recordParam = new MsSmsSendRecordParam();
|
||||
recordParam.setSmsRecordId(smsSendRecord.getId());
|
||||
recordParam.setParamValue(templateParam.getParamValue());
|
||||
recordParams.add(recordParam);
|
||||
}
|
||||
recordParamMapper.batchInsert(recordParams);
|
||||
shortMessageService.insertShortMessageHistoryRecord(oldSendRecord, recordParams);
|
||||
return AjaxResult.success();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* 重新发送短信
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/reSendShortMessage")
|
||||
public AjaxResult reSendShortMessage(@RequestBody ReSendMessageVO reSendMessageVO) {
|
||||
if (reSendMessageVO != null) {
|
||||
AjaxResult result = shortMessageService.reSendShortMessage(reSendMessageVO);
|
||||
return result;
|
||||
}
|
||||
return AjaxResult.error("参数缺失");
|
||||
}
|
||||
|
||||
/**
|
||||
* 短信回调
|
||||
* @param body
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/smsCallBack")
|
||||
public AjaxResult smsCallBack(@RequestBody String body) {
|
||||
if(body != null){
|
||||
return shortMessageService.smsCallBack(body);
|
||||
}
|
||||
return AjaxResult.error("参数缺失");
|
||||
}
|
||||
|
||||
@Autowired
|
||||
MeetingInfoMapper meetingInfoMapper;
|
||||
@Autowired
|
||||
SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private TokenService tokenService;
|
||||
|
||||
/**
|
||||
* 查询UID好的密钥
|
||||
*/
|
||||
// @Anonymous
|
||||
// @GetMapping("/getMeetingInfo")
|
||||
// public Object getEncryptInfoByUid(@RequestParam(name = "authId", required = true) String authId) {
|
||||
// MeetingInfoVO result = new MeetingInfoVO();
|
||||
// if (authId != null) {
|
||||
// MeetingInfo meetingInfo = meetingInfoMapper.selectByPrimaryKey(authId);
|
||||
// if (meetingInfo != null && meetingInfo.getUserId() != null) {
|
||||
// BeanUtils.copyProperties(meetingInfo, result);
|
||||
// SysUser sysUser = sysUserMapper.selectUserById(meetingInfo.getUserId());
|
||||
// LoginUser loginUser = new LoginUser();
|
||||
// loginUser.setUserId(sysUser.getUserId());
|
||||
// loginUser.setUser(sysUser);
|
||||
// String token = tokenService.createVideoToken(loginUser, 120);
|
||||
//// String createToken = createToken(claims);
|
||||
// result.setToken(token);
|
||||
// }
|
||||
// return result;
|
||||
// }
|
||||
// return AjaxResult.error("查询失败");
|
||||
// }
|
||||
}
|
||||
+55
@@ -0,0 +1,55 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate.sms;
|
||||
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.page.TableDataInfo;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.sms.MsSmsTemplate;
|
||||
import com.ruoyi.wisdomarbitrate.service.sms.SMSTemplateService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 短信模板控制器
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/smsTemplate")
|
||||
public class SMSTemplateController extends BaseController {
|
||||
@Autowired
|
||||
private SMSTemplateService templateService;
|
||||
|
||||
/**
|
||||
* 查询
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/page")
|
||||
public TableDataInfo page( ){
|
||||
startPage();
|
||||
List<MsSmsTemplate> list = templateService.page();
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
* 新增或者修改
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/insert")
|
||||
public AjaxResult insert(@RequestBody MsSmsTemplate template){
|
||||
return templateService.insert(template);
|
||||
}
|
||||
/**
|
||||
* 删除
|
||||
* @param
|
||||
* @return
|
||||
*/
|
||||
@PostMapping("/delete")
|
||||
public AjaxResult delete(@RequestBody MsSmsTemplate template){
|
||||
if(template.getId()==null){
|
||||
return AjaxResult.warn("id不能为空");
|
||||
}
|
||||
return templateService.delete(template.getId());
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user