保誠-保戶業務員媒合平台
wayne
2021-12-17 40770ab12b3cb92627da7eaed78f088bddc43fd1
[fix] 修正簡訊不需帶入subject

修改2個檔案
9 ■■■■■ 已變更過的檔案
pamapi/src/main/java/com/pollex/pam/service/SendMsgService.java 5 ●●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/web/rest/TestSendMsgResource.java 4 ●●●● 修補檔 | 檢視 | 原始 | 究查 | 歷程
pamapi/src/main/java/com/pollex/pam/service/SendMsgService.java
@@ -1,7 +1,6 @@
package com.pollex.pam.service;
import com.pollex.pam.config.ApplicationProperties;
import com.pollex.pam.config.ApplicationProperties.Email;
import com.pollex.pam.config.ApplicationProperties.SMS;
import com.pollex.pam.service.dto.*;
import com.pollex.pam.service.util.HttpRequestUtil;
@@ -31,7 +30,7 @@
    @Autowired
    ApplicationProperties applicationProperties;
    public void sendMsgBySMS(String subject, String toMobile, String content) throws SendSMSFailException{
    public void sendMsgBySMS(String toMobile, String content) throws SendSMSFailException{
        SMS smsProperties = applicationProperties.getSms();
        SendSMSRequest sendSMSRequest = new SendSMSRequest();
@@ -40,7 +39,7 @@
        sendSMSRequest.setSender(smsProperties.getSender());
        sendSMSRequest.setMsgTypeSet(smsProperties.getSmsType());
        sendSMSRequest.setSendTime(LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:00")));
        sendSMSRequest.setSubject(subject);
        sendSMSRequest.setSubject("");
        sendSMSRequest.setActivityId("");
        SMSDetail smsDetail = new SMSDetail();
pamapi/src/main/java/com/pollex/pam/web/rest/TestSendMsgResource.java
@@ -14,8 +14,8 @@
    SendMsgService sendMsgService;
    @GetMapping("/bySMS")
    public ResponseEntity<Void> bySMS(@RequestParam String subject, @RequestParam String toMobile, @RequestParam String content) {
        sendMsgService.sendMsgBySMS(subject, toMobile, content);
    public ResponseEntity<Void> bySMS(@RequestParam String toMobile, @RequestParam String content) {
        sendMsgService.sendMsgBySMS(toMobile, content);
        return ResponseEntity.noContent().build();
    }