Merge branch 'wq1' of SH-Arbitrate/Mediation-Backend into dev
This commit was merged in pull request #162.
This commit is contained in:
+7
@@ -175,6 +175,13 @@ public class MsVideoConferenceController extends BaseController {
|
||||
}
|
||||
return success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 腾讯云短信回调
|
||||
* @param body
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/smsRollBack")
|
||||
public AjaxResult smsRollBack( @RequestBody String body, HttpServletRequest request) {
|
||||
|
||||
@@ -72,7 +72,7 @@ spring:
|
||||
host: 121.40.189.20
|
||||
# 端口,默认为6379
|
||||
port: 6389
|
||||
# 数据库索引,测试环境1,正式环境0
|
||||
# TODO 数据库索引,测试环境1,正式环境0
|
||||
database: 1
|
||||
# 密码
|
||||
password:
|
||||
@@ -131,8 +131,8 @@ mybatis:
|
||||
mapperLocations: classpath*:mapper/**/*Mapper.xml
|
||||
# 加载全局的配置文件
|
||||
configLocation: classpath:mybatis/mybatis-config.xml
|
||||
# configuration:
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
configuration:
|
||||
log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
# PageHelper分页插件
|
||||
pagehelper:
|
||||
helperDialect: mysql
|
||||
@@ -166,7 +166,8 @@ elegent:
|
||||
alipay:
|
||||
appId: 2021003141676135
|
||||
callback:
|
||||
domain: http://121.40.189.20:9001/
|
||||
# TODO
|
||||
domain: http://121.40.189.20:7001/
|
||||
watch: true
|
||||
cycle: 10
|
||||
identityAuthentication:
|
||||
@@ -187,14 +188,15 @@ imConfig:
|
||||
secretId: AKID3xfHgroY4MQHvLXUXMwIQL1UjmbBX1Tv
|
||||
# 腾讯云密钥
|
||||
secretKey: INDrIXcT8YmomZBcsy0oNirnU0LTN4X7
|
||||
# 调解机构代码配置
|
||||
# TODO 调解机构代码配置
|
||||
organizeConfig:
|
||||
# creditCode
|
||||
creditCode: 910000870060480009
|
||||
# 引入仲裁系统url配置
|
||||
# TODO 引入仲裁系统url配置
|
||||
arbitrateConfig:
|
||||
url: http://121.40.189.20:9001/callArbitrateCaseApplication/generateCaseApplication
|
||||
# 回调通知
|
||||
smsURL: http://121.40.189.20:9001/callArbitrateCaseApplication/sendSms
|
||||
# TODO 回调通知
|
||||
signSealCallbackConfig:
|
||||
url: http://121.40.189.20:7001/mssignSeal/signSeaalCaseApplicaCallback
|
||||
# onlyOffice系统url配置
|
||||
|
||||
+4
-1
@@ -1,11 +1,13 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.dto.sendrecord;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import com.ruoyi.wisdomarbitrate.domain.entity.mscase.MsCaseAttach;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class SendMailRecord extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
@@ -49,6 +51,7 @@ public class SendMailRecord extends BaseEntity {
|
||||
|
||||
/** 邮件发件人地址 */
|
||||
private String mailFromAddress;
|
||||
private List<MsCaseAttach> caseAttachList;
|
||||
|
||||
|
||||
public Integer getSendStatus() {
|
||||
|
||||
+7
@@ -50,4 +50,11 @@ public interface MsCaseAttachMapper {
|
||||
* @return
|
||||
*/
|
||||
int countByfileName(@Param("annexName") String fileName,@Param("caseAppliId") Long caseAppliId);
|
||||
|
||||
/**
|
||||
* 根据ids查询
|
||||
* @param fileIds
|
||||
* @return
|
||||
*/
|
||||
List<MsCaseAttach> selectByIds(@Param("ids") List<String> fileIds);
|
||||
}
|
||||
|
||||
+1
-1
@@ -1158,7 +1158,7 @@ public class MsSignSealServiceImpl implements MsSignSealService {
|
||||
sendMailRecord.setSendTime(new Date());
|
||||
sendMailRecord.setMailSubject("签署后的调解书");
|
||||
sendMailRecord.setMailFromAddress(emailFrom);
|
||||
sendMailRecord.setFileIds(fileId != null ? fileId.toString() : null);
|
||||
sendMailRecord.setFileIds(fileId != null ? fileId.toString() : "");
|
||||
// sendMailRecord.setCreateBy(SecurityUtils.getUsername());
|
||||
sendMailRecord.setCreateTime(new Date());
|
||||
sendMailRecord.setMailFromAddress(emailFrom);
|
||||
|
||||
+10
@@ -3,6 +3,8 @@ package com.ruoyi.wisdomarbitrate.service.mscase.impl;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.io.FileUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpRequest;
|
||||
import cn.hutool.http.HttpResponse;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONArray;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
@@ -108,6 +110,9 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
BeiMingInterfaceService beiMingInterfaceService;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
// 仲裁短信回调
|
||||
@Value("${arbitrateConfig.smsURL}")
|
||||
private String smsURL;
|
||||
|
||||
/**
|
||||
视频回调
|
||||
@@ -173,6 +178,11 @@ public class VideoConferenceServiceImpl implements VideoConferenceService {
|
||||
smsSendRecord.setReason(description != null ? description.toString() : null);
|
||||
}
|
||||
smsRecordMapper.updateStatus(smsSendRecord);
|
||||
}else {
|
||||
// 查找仲裁系统,调用仲裁系统短信接口
|
||||
HttpResponse httpResponse = HttpRequest.post(smsURL)
|
||||
.body(JSONUtil.toJsonStr(jsonObject))
|
||||
.execute();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+38
-4
@@ -1,5 +1,8 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.sendrecord.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.utils.EmailOutUtil;
|
||||
import com.ruoyi.system.domain.entity.shortmessage.MsSendMailHistoryRecord;
|
||||
@@ -14,10 +17,9 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||
@@ -28,6 +30,31 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||
@Override
|
||||
public List<SendMailRecord> selectSendMailRecordList(SendMailRecord sendMailRecord) {
|
||||
List<SendMailRecord> records = sendMailRecordMapper.selectSendMailRecord(sendMailRecord);
|
||||
if(CollectionUtil.isNotEmpty(records)){
|
||||
Map<Long, String> recordmap = records.stream().filter(record -> StrUtil.isNotEmpty(record.getFileIds())).collect(Collectors.toMap(SendMailRecord::getId, SendMailRecord::getFileIds, (k1, k2) -> k2));
|
||||
List<String> fileIds = new ArrayList<>(recordmap.values());
|
||||
if(CollectionUtil.isNotEmpty(fileIds)){
|
||||
List<MsCaseAttach> caseAttaches= msCaseAttachMapper.selectByIds(fileIds);
|
||||
if(CollectionUtil.isNotEmpty(caseAttaches)){
|
||||
Map<Long, MsCaseAttach> attachMap = caseAttaches.stream().collect(Collectors.toMap(MsCaseAttach::getAnnexId, Function.identity(), (k1, k2) -> k2));
|
||||
for (SendMailRecord record : records) {
|
||||
List<MsCaseAttach> msCaseAttaches = new ArrayList<>();
|
||||
if(recordmap.containsKey(record.getId())){
|
||||
String fileIdStr = recordmap.get(record.getId());
|
||||
if(ObjectUtil.isNotNull(fileIdStr) ) {
|
||||
String[] splitFileId = fileIdStr.split(",");
|
||||
for (String fileId : splitFileId) {
|
||||
if (ObjectUtil.isNotNull(fileId) && attachMap.containsKey(Long.parseLong(fileId))) {
|
||||
msCaseAttaches.add(attachMap.get(Long.parseLong(fileId)));
|
||||
}
|
||||
}
|
||||
record.setCaseAttachList(msCaseAttaches);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return records;
|
||||
}
|
||||
|
||||
@@ -50,6 +77,13 @@ public class SendMailRecordServiceImpl implements ISendMailRecordService {
|
||||
msSendMailHistoryRecord.setId(null);
|
||||
msSendMailHistoryRecordMapper.insertSelective(msSendMailHistoryRecord);
|
||||
sendMailRecord.setUpdateTime(new Date());
|
||||
if(CollectionUtil.isNotEmpty(sendMailRecord.getCaseAttachList())){
|
||||
List<Long> fileIdList = sendMailRecord.getCaseAttachList().stream().map(MsCaseAttach::getAnnexId).collect(Collectors.toList());
|
||||
if(CollectionUtil.isNotEmpty(fileIdList)){
|
||||
String fileIdStr = StrUtil.join(",", fileIdList);
|
||||
sendMailRecord.setFileIds(fileIdStr);
|
||||
}
|
||||
}
|
||||
sendMailRecordMapper.updateSendMailRecord(sendMailRecord);
|
||||
return AjaxResult.success("编辑成功");
|
||||
} else {
|
||||
|
||||
+8
-1
@@ -157,5 +157,12 @@
|
||||
</where>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="selectByIds" resultMap="CaseAttachResult">
|
||||
select *
|
||||
from ms_case_attach
|
||||
where annex_id in
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</select>
|
||||
</mapper>
|
||||
+2
-2
@@ -21,8 +21,7 @@
|
||||
|
||||
<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 ,
|
||||
s.update_by ,s.update_time , s.send_status ,s.file_ids ,s.mail_subject ,s.mail_from_address ,c.case_num
|
||||
SELECT s.* ,c.case_num
|
||||
from ms_send_mail_record s left join ms_case_application c
|
||||
on s.case_id = c.id
|
||||
<where>
|
||||
@@ -67,6 +66,7 @@
|
||||
<if test="updateTime != null ">,update_time=#{updateTime}</if>
|
||||
<if test="sendTime != null ">,send_time=#{sendTime}</if>
|
||||
<if test="sendStatus != null ">,send_status=#{sendStatus}</if>
|
||||
<if test="fileIds != null and fileIds != ''">,file_ids=#{fileIds}</if>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="querySendMailRecordById" resultMap="SendMailRecordResult">
|
||||
|
||||
Reference in New Issue
Block a user