|
|
@ -48,9 +48,9 @@ public class SmsServiceImpl implements SmsService {
|
|
|
|
throw new ApiException(termId + "该装置缺少iccid2");
|
|
|
|
throw new ApiException(termId + "该装置缺少iccid2");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (Constants.NetType_Dahan.equals(simcard.getType2())) {
|
|
|
|
if (Constants.NetType_Dahan.equals(simcard.getType2())) {
|
|
|
|
dahanList.add(term.getIccid());
|
|
|
|
dahanList.add(simcard.getIccid2());
|
|
|
|
} else if (Constants.NetType_Rabchaser.equals(simcard.getType2())) {
|
|
|
|
} else if (Constants.NetType_Rabchaser.equals(simcard.getType2())) {
|
|
|
|
rabchaserList.add(term.getIccid());
|
|
|
|
rabchaserList.add(simcard.getIccid2());
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|
throw new ApiException(termId + "该装置的运营商类型type2暂不支持发短信");
|
|
|
|
throw new ApiException(termId + "该装置的运营商类型type2暂不支持发短信");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -63,4 +63,24 @@ public class SmsServiceImpl implements SmsService {
|
|
|
|
smsAdapter.sendSms(Constants.NetType_Rabchaser, rabchaserList, model.getContent());
|
|
|
|
smsAdapter.sendSms(Constants.NetType_Rabchaser, rabchaserList, model.getContent());
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
|
|
|
public Object listSms(Integer termId) {
|
|
|
|
|
|
|
|
Terminals term = newCacheService.getTerminal(termId);
|
|
|
|
|
|
|
|
if (term == null) {
|
|
|
|
|
|
|
|
throw new ApiException(termId + "该装置不存在");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
TerminalSimcard simcard = simcardMapper.selectByPrimaryKey(termId);
|
|
|
|
|
|
|
|
if (simcard == null) {
|
|
|
|
|
|
|
|
throw new ApiException(termId + "该装置缺少simcard信息");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (StringUtils.isBlank(simcard.getIccid2())) {
|
|
|
|
|
|
|
|
throw new ApiException(termId + "该装置缺少iccid2");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (Constants.NetType_Dahan.equals(simcard.getType2())) {
|
|
|
|
|
|
|
|
return smsAdapter.listSms(Constants.NetType_Dahan, simcard.getIccid2());
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
throw new ApiException(termId + "该装置的运营商类型type2暂不支持查询短信");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|