fix pull sms content

pull/26/head
3y 2 years ago
parent c0c1bdc699
commit 5de82a9d2a

@ -47,7 +47,7 @@ public class SmsPullReceiptStarterImpl implements ReceiptMessageStater {
List<ChannelAccount> channelAccountList = channelAccountDao.findAllByIsDeletedEqualsAndSendChannelEquals(CommonConstant.FALSE, ChannelType.SMS.getCode());
for (ChannelAccount channelAccount : channelAccountList) {
SmsAccount smsAccount = JSON.parseObject(channelAccount.getAccountConfig(), SmsAccount.class);
List<SmsRecord> smsRecordList = scriptMap.get(smsAccount.getScriptName()).pull(smsAccount.getScriptName());
List<SmsRecord> smsRecordList = scriptMap.get(smsAccount.getScriptName()).pull(channelAccount.getId().intValue());
if (CollUtil.isNotEmpty(smsRecordList)) {
smsRecordDao.saveAll(smsRecordList);
}

@ -26,9 +26,9 @@ public interface SmsScript {
/**
*
*
* @param scriptName
* @param id ID
* @return
*/
List<SmsRecord> pull(String scriptName);
List<SmsRecord> pull(Integer id);
}

@ -59,9 +59,9 @@ public class TencentSmsScript implements SmsScript {
}
@Override
public List<SmsRecord> pull(String scriptName) {
public List<SmsRecord> pull(Integer accountId) {
try {
TencentSmsAccount account = accountUtils.getSmsAccountByScriptName(scriptName, TencentSmsAccount.class);
TencentSmsAccount account = accountUtils.getAccountById(accountId, TencentSmsAccount.class);
SmsClient client = init(account);
PullSmsSendStatusRequest req = assemblePullReq(account);
PullSmsSendStatusResponse resp = client.PullSmsSendStatus(req);

@ -58,8 +58,7 @@ public class YunPianSmsScript implements SmsScript {
}
@Override
public List<SmsRecord> pull(String scriptName) {
YunPianSmsAccount account = accountUtils.getSmsAccountByScriptName(scriptName, YunPianSmsAccount.class);
public List<SmsRecord> pull(Integer accountId) {
// .....
return null;
}

Loading…
Cancel
Save