review 收件地址

review 短信模块,部分代码
This commit is contained in:
YunaiV 2020-05-02 20:18:27 +08:00
parent 83d9afd3d0
commit 3c5486c80a
4 changed files with 6 additions and 1 deletions

View File

@ -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);

View File

@ -12,6 +12,7 @@ import lombok.experimental.Accessors;
*/
@Data
@Accessors(chain = true)
// TODO FROM 芋艿 to 小范还是放在 user 服务哈哈哈我表述错了
public class UserAddressDO extends DeletableDO {
/**

View File

@ -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);

View File

@ -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());
}