短信 code review 2020-02-25
This commit is contained in:
@@ -37,12 +37,10 @@ public class SmsChannelController {
|
||||
return success(service.getSmsChannelEnums());
|
||||
}
|
||||
|
||||
|
||||
@ApiOperation("添加消息渠道")
|
||||
@PostMapping("/create")
|
||||
public CommonResult<Long> add(@Validated @RequestBody SmsChannelCreateReqVO reqVO) {
|
||||
return success(service.createSmsChannel(reqVO));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -24,7 +24,7 @@ public class SmsSendConsumer extends AbstractChannelMessageListener<SmsSendMessa
|
||||
|
||||
@Override
|
||||
public void onMessage(SmsSendMessage message) {
|
||||
log.info("[onMessage][收到 发送短信 消息]");
|
||||
log.info("[onMessage][收到 发送短信 消息]"); // TODO FROM 芋艿 to zzf:log 如果要打,这里要内容打上。其他 Consumer 没打的原因,是没内容。。。
|
||||
SmsResult send = sysSmsService.send(message.getSmsBody(), message.getTargetPhones());
|
||||
}
|
||||
|
||||
|
||||
@@ -18,9 +18,6 @@ import java.util.List;
|
||||
*/
|
||||
public interface SysSmsChannelService {
|
||||
|
||||
// TODO FROM 芋艿 to ZZF:SmsChannelService=》SysSmsChannelService,增加 Sys 前缀,算在系统模块里
|
||||
// TODO FROM 芋艿 to ZZF:方法名,保持不去掉 Sms 前缀。虽然长点,嘿嘿
|
||||
|
||||
/**
|
||||
* 初始化短信渠道
|
||||
*/
|
||||
|
||||
@@ -42,6 +42,7 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService {
|
||||
@Autowired
|
||||
private SmsClientFactory clientFactory;
|
||||
|
||||
// TODO FROM 芋艿 to zzf:方法要放在成员变量下面;
|
||||
/**
|
||||
* 初始化短信客户端
|
||||
*/
|
||||
@@ -65,7 +66,6 @@ public class SysSmsChannelServiceImpl implements SysSmsChannelService {
|
||||
});
|
||||
}
|
||||
|
||||
// TODO FROM 芋艿 to ZZF:channelMapper 嘿,保持命名统一。 DONE
|
||||
@Resource
|
||||
private SysSmsChannelMapper channelMapper;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user