review 收件地址
review 短信模块,部分代码
This commit is contained in:
parent
83d9afd3d0
commit
3c5486c80a
@ -13,6 +13,7 @@ import java.util.List;
|
||||
* @time 2019-04-06 13:29
|
||||
*/
|
||||
@Repository
|
||||
// TODO FROM 芋艿 to 小范:替换成 Mybatis Plus
|
||||
public interface UserAddressMapper {
|
||||
|
||||
int insert(UserAddressDO userAddressDO);
|
||||
|
@ -12,6 +12,7 @@ import lombok.experimental.Accessors;
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
// TODO FROM 芋艿 to 小范:还是放在 user 服务,哈哈哈,我表述错了。
|
||||
public class UserAddressDO extends DeletableDO {
|
||||
|
||||
/**
|
||||
|
@ -26,7 +26,7 @@ import java.util.Map;
|
||||
* @author Sin
|
||||
* @time 2019/5/25 12:28 PM
|
||||
*/
|
||||
@Component
|
||||
@Component // TODO FROM 芋艿 to 小范:建议类名改成 AliYunSmsClient
|
||||
public class SmsClientOfAliYun implements SmsClient {
|
||||
|
||||
private static final Logger LOGGER = LoggerFactory.getLogger(SmsClientOfAliYun.class);
|
||||
|
@ -61,6 +61,7 @@ public class SmsServiceImpl implements SmsService {
|
||||
|
||||
@Override
|
||||
public PageResult<ListSmsSignBO> listSmsSign(ListSmsSignDTO queryDTO) {
|
||||
// TODO FROM 芋艿 to 小范:mybatis-plus 的 QueryWrapper 不要到 Service 层,可以抽 Dao 方法里哈。其它的类似可以瞅瞅噢
|
||||
QueryWrapper<SmsSignDO> queryWrapper = new QueryWrapper<>();
|
||||
if (queryDTO.getApplyStatus() != null) {
|
||||
queryWrapper.eq("apply_status", queryDTO.getApplyStatus());
|
||||
@ -109,6 +110,7 @@ public class SmsServiceImpl implements SmsService {
|
||||
= SmsTemplateConvert.INSTANCE.convert(signPage.getRecords());
|
||||
|
||||
if (CollectionUtils.isEmpty(templateList)) {
|
||||
// TODO FROM 芋艿 to 小范,Collections.EMPTY_LIST =》Collections.emptyList();另外,可以考虑直接 Convert 哈
|
||||
return new PageResult<>().setList(Collections.EMPTY_LIST).setTotal((int) signPage.getTotal());
|
||||
}
|
||||
|
||||
@ -147,6 +149,7 @@ public class SmsServiceImpl implements SmsService {
|
||||
);
|
||||
|
||||
if (smsSignDO != null) {
|
||||
// TODO FROM 芋艿 to 小范:可以使用 ServiceExceptionUtil.exception(SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT);
|
||||
throw new ServiceException(SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getCode(),
|
||||
SystemErrorCodeEnum.SMS_SIGN_IS_EXISTENT.getMessage());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user