Merge branch 'wq' of SH-Arbitrate/Arbitrate-Backend into dev
This commit was merged in pull request #213.
This commit is contained in:
+44
@@ -8,6 +8,7 @@ import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.DateUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.BookSendVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.*;
|
||||
import com.ruoyi.wisdomarbitrate.utils.CaseLogUtils;
|
||||
@@ -66,6 +67,8 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
private RedisCache redisCache;
|
||||
@Autowired
|
||||
private SendMailRecordMapper sendMailRecordMapper;
|
||||
@Autowired
|
||||
private SmsRecordMapper smsRecordMapper;
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
@@ -565,6 +568,47 @@ public class AdjudicationServiceImpl implements IAdjudicationService {
|
||||
sendMailRecord1.setCreateBy(getUsername());
|
||||
if (b) {
|
||||
sendMailRecord1.setSendStatus(1);
|
||||
// 发送短信
|
||||
if(CollectionUtil.isNotEmpty(caseAffiliates)) {
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("1990362");
|
||||
for (CaseAffiliate affiliate : caseAffiliates) {
|
||||
|
||||
request.setPhone(affiliate.getContactTelphone());
|
||||
if(affiliate.getIdentityType() == 1) {
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), appEmail});
|
||||
}else {
|
||||
request.setTemplateParamSet(new String[]{caseAffiliate.getName(), caseApplication1.getCaseNum(), resEmail});
|
||||
}
|
||||
Boolean aBoolean = SmsUtils.sendSms(request);
|
||||
|
||||
// 保存短信发送记录
|
||||
SmsSendRecord smsSendRecord = new SmsSendRecord();
|
||||
smsSendRecord.setCaseId(caseAffiliate.getCaseAppliId());
|
||||
|
||||
smsSendRecord.setCaseNum(caseApplication1.getCaseNum());
|
||||
smsSendRecord.setPhone(request.getPhone());
|
||||
smsSendRecord.setSendTime(new Date());
|
||||
// 尊敬的{1}用户,您的{2}仲裁案件,裁决书已送达至{3}邮箱,请知晓,如非本人操作,请忽略本短信。
|
||||
if(affiliate.getIdentityType() == 1) {
|
||||
smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +appEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||
}else {
|
||||
smsSendRecord.setSendContent("尊敬的" + caseAffiliate.getName() + "用户,您的" + caseApplication1.getCaseNum() + "仲裁案件,裁决书已送达至" +resEmail+"邮箱,请知晓,如非本人操作,请忽略本短信。");
|
||||
}
|
||||
|
||||
smsSendRecord.setCreateBy(getUsername());
|
||||
if (aBoolean) {
|
||||
smsSendRecord.setSendStatus(1);
|
||||
} else {
|
||||
smsSendRecord.setSendStatus(0);
|
||||
}
|
||||
smsRecordMapper.saveSmsSendRecord(smsSendRecord);
|
||||
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
} else {
|
||||
sendMailRecord1.setSendStatus(0);
|
||||
}
|
||||
|
||||
@@ -30,14 +30,14 @@
|
||||
<result property="residenAffili" column="residen_affili" />
|
||||
<result property="appliAgentTitle" column="appli_agent_title" />
|
||||
<result property="userId" column="user_id" />
|
||||
|
||||
<result property="email" column="email" />
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCaseAffiliate" parameterType="CaseAffiliate" resultMap="CaseAffiliateResult">
|
||||
select c.id ,c.case_appli_id ,c.identity_type ,c.name ,c.identity_num ,c.contact_telphone ,c.contact_address ,
|
||||
c.work_address ,c.work_telphone ,c.name_agent, c.identity_num_agent ,c.contact_telphone_agent ,c.contact_address_agent,
|
||||
c.comp_legal_person,c.comp_legalper_post,c.respon_sex,c.respon_birth,
|
||||
c.residen_affili,c.appli_agent_title,
|
||||
c.residen_affili,c.appli_agent_title,c.email,
|
||||
c.track_num,c.application_organ_id,c.application_organ_name,s.user_id
|
||||
from case_affiliate c
|
||||
left join sys_user s on c.identity_num=s.id_card
|
||||
|
||||
Reference in New Issue
Block a user