diff --git a/product/product-biz-api/src/main/java/cn/iocoder/mall/product/biz/enums/category/ProductCategoryConstants.java b/product/product-biz-api/src/main/java/cn/iocoder/mall/product/biz/enums/category/ProductCategoryConstants.java index 4039f3cd..39686426 100644 --- a/product/product-biz-api/src/main/java/cn/iocoder/mall/product/biz/enums/category/ProductCategoryConstants.java +++ b/product/product-biz-api/src/main/java/cn/iocoder/mall/product/biz/enums/category/ProductCategoryConstants.java @@ -1,5 +1,6 @@ package cn.iocoder.mall.product.biz.enums.category; +// TODO FROM 芋艿 to sunderui:改到枚举类,我之前没弄对,哈哈哈 public interface ProductCategoryConstants { /** @@ -16,4 +17,4 @@ public interface ProductCategoryConstants { */ Integer PID_ROOT = 0; -} \ No newline at end of file +} diff --git a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/convert/sku/ProductSpuConvert.java b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/convert/sku/ProductSpuConvert.java index 624980de..2c898bde 100644 --- a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/convert/sku/ProductSpuConvert.java +++ b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/convert/sku/ProductSpuConvert.java @@ -40,15 +40,9 @@ public interface ProductSpuConvert { }) ProductSpuBO convert(ProductSpuDO spu); - @Named("translatePicUrlsFromString") - default List translatePicUrlsFromString(String picUrls) { - return StringUtil.split(picUrls, ","); - } - @Mappings({}) List convert(List spus); - @Mappings({ @Mapping(source = "picUrls", target = "picUrls", ignore = true) }) @@ -131,4 +125,9 @@ public interface ProductSpuConvert { return spuDetailList; } + @Named("translatePicUrlsFromString") + default List translatePicUrlsFromString(String picUrls) { + return StringUtil.split(picUrls, ","); + } + } diff --git a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dto/sku/ProductSpuAddDTO.java b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dto/sku/ProductSpuAddDTO.java index d4e0455d..7543dcf6 100644 --- a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dto/sku/ProductSpuAddDTO.java +++ b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/dto/sku/ProductSpuAddDTO.java @@ -12,6 +12,7 @@ import java.util.List; */ @Data @Accessors(chain = true) +// TODO FROM 芋艿 to sunderui && q2118cs:貌似重复了,只要保留一个哈 public class ProductSpuAddDTO { // ========== 基本信息 ========= diff --git a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/category/ProductCategoryServiceImpl.java b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/category/ProductCategoryServiceImpl.java index c540ab8f..2d81f99f 100644 --- a/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/category/ProductCategoryServiceImpl.java +++ b/product/product-biz/src/main/java/cn/iocoder/mall/product/biz/service/category/ProductCategoryServiceImpl.java @@ -114,6 +114,7 @@ public class ProductCategoryServiceImpl implements ProductCategoryService { throw ServiceExceptionUtil.exception(PRODUCT_CATEGORY_DELETE_ONLY_DISABLE); } // 只有不存在子分类才可以删除 + // TODO FROM 芋艿 to jiangweifan:Wrappers 只用在 Mapper 层 Integer childCount = productCategoryMapper.selectCount( Wrappers.lambdaQuery().eq(ProductCategoryDO::getPid, productCategoryId) ); diff --git a/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/bo/banner/BannerListBO.java b/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/bo/banner/BannerListBO.java index 7cf13983..935f5897 100644 --- a/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/bo/banner/BannerListBO.java +++ b/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/bo/banner/BannerListBO.java @@ -15,6 +15,7 @@ import java.util.Date; */ @Data @Accessors(chain = true) +// TODO FROM 芋艿 to 小范:捉摸是不是先统一的 BannerBO;另外,biz 不使用 swagger 注解哈,其他 banner 的 dto 和 bo 也一起改改哈; public class BannerListBO implements Serializable { diff --git a/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/dao/BannerMapper.java b/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/dao/BannerMapper.java index 39cdfb5d..5d3d46ca 100644 --- a/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/dao/BannerMapper.java +++ b/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/dao/BannerMapper.java @@ -26,6 +26,7 @@ public interface BannerMapper extends BaseMapper { * @param dto * @return */ + // TODO FROM 芋艿 to 小范:Page 方法哈 default IPage selectBannerList(BannerListDTO dto) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); if (StringUtils.isEmpty(dto.getStatus())) { @@ -41,4 +42,4 @@ public interface BannerMapper extends BaseMapper { return result; } -} \ No newline at end of file +} diff --git a/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/service/banner/BannerService.java b/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/service/banner/BannerService.java index aea1db0d..c526c933 100644 --- a/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/service/banner/BannerService.java +++ b/promotion/promotion-biz/src/main/java/cn/iocoder/mall/promotion/biz/service/banner/BannerService.java @@ -48,6 +48,7 @@ public interface BannerService { */ void updateBanner(BannerUpdateDTO adminsBannerUpdateDTO); + // TODO FROM 芋艿 to 小范:貌似要把 dto 搞起来,嘿嘿; /** * 更新 - banner 状态 * diff --git a/promotion/promotion-rest/src/main/java/cn/iocoder/mall/promotion/rest/request/banner/BannerAddRequest.java b/promotion/promotion-rest/src/main/java/cn/iocoder/mall/promotion/rest/request/banner/BannerAddRequest.java index 654f363a..ffb49b44 100644 --- a/promotion/promotion-rest/src/main/java/cn/iocoder/mall/promotion/rest/request/banner/BannerAddRequest.java +++ b/promotion/promotion-rest/src/main/java/cn/iocoder/mall/promotion/rest/request/banner/BannerAddRequest.java @@ -17,7 +17,7 @@ import java.io.Serializable; @Accessors(chain = true) public class BannerAddRequest implements Serializable { - @NotNull + @NotNull // TODO FROM 芋艿 to 小范:提示要加下,哈哈哈 @ApiModelProperty("跳转链接") private Integer url; diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/systemlog/AccessLogBO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/systemlog/AccessLogBO.java index c423596f..ad2f6259 100644 --- a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/systemlog/AccessLogBO.java +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/bo/systemlog/AccessLogBO.java @@ -6,7 +6,7 @@ import lombok.experimental.Accessors; import java.io.Serializable; import java.util.Date; -/** +/** // TODO FROM 芋艿 to 2447007062:最好加下字段的注释哈; * @author:mac * @descriptio * @create: 2020-5-12 20:43:00 diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/user/UserMapper.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/user/UserMapper.java index 3cac873f..bf45488d 100644 --- a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/user/UserMapper.java +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dao/user/UserMapper.java @@ -26,7 +26,7 @@ public interface UserMapper extends BaseMapper { */ default IPage selectUserPage(UserPageDTO userPageDTO) { // TODO FROM 芋艿 to jwf1173:看下 QueryWrapperX 噢,已经提供判空啦 - // TODO FROM 伟帆 to 芋艿: 这里是使用MP原生的判空,支持lambda好,还是使用QueryWrapperX,使用字段名字符串的好呢 + // TODO FROM 伟帆 to 芋艿: 这里是使用MP原生的判空,支持lambda好,还是使用QueryWrapperX,使用字段名字符串的好呢;reply:没特别想好,现在建议还是 QueryWrapperX return this.selectPage(new Page<>(userPageDTO.getPageNo(), userPageDTO.getPageSize()), Wrappers.query().lambda() .eq(StringUtils.isNotBlank(userPageDTO.getNickname()), UserDO::getNickname, userPageDTO.getNickname()) diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/system/AccessLogPageDTO.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/system/AccessLogPageDTO.java index 4af88b55..6e7a6fe8 100644 --- a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/system/AccessLogPageDTO.java +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/dto/system/AccessLogPageDTO.java @@ -4,14 +4,13 @@ import lombok.Data; import lombok.experimental.Accessors; import javax.validation.constraints.NotNull; -import java.util.Date; /** * 访问日志添加 DTO */ @Data @Accessors(chain = true) -public class AccessLogPageDTO { +public class AccessLogPageDTO { // TODO FROM 芋艿 to 2447007062:有个 PageParams 类哈,可以继承 /** diff --git a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/systemlog/SystemLogServiceImpl.java b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/systemlog/SystemLogServiceImpl.java index 85c86f71..769f4e5c 100644 --- a/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/systemlog/SystemLogServiceImpl.java +++ b/system/system-biz/src/main/java/cn/iocoder/mall/system/biz/service/systemlog/SystemLogServiceImpl.java @@ -48,7 +48,7 @@ public class SystemLogServiceImpl implements SystemLogService { @SuppressWarnings("Duplicates") public PageResult getAccessLogPage(AccessLogPageDTO accessLogPageDTO) { PageResult accessLogPageBOPageResult = SystemLogConvert.INSTANCE.convertPage( - accessLogMapper.selectPage(accessLogPageDTO)); + accessLogMapper.selectPage(accessLogPageDTO)); // TODO FROM 芋艿 to 2447007062:可以考虑直接 return,简洁 + IDEA 不告警; return accessLogPageBOPageResult; } } diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/systemlog/SystemLogController.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/systemlog/SystemLogController.java index 5f7a1d47..096fa19e 100644 --- a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/systemlog/SystemLogController.java +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/controller/systemlog/SystemLogController.java @@ -41,7 +41,8 @@ public class SystemLogController { @RequestParam(value = "pageNo", defaultValue = "1") Integer pageNo, @RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) { - + // TODO FROM 芋艿 to 2447007062:不要留这么大的空行; + // TODO FROM 芋艿 to 2447007062:使用 Request 接收参数噢; AccessLogPageDTO accessLogPageDTO = new AccessLogPageDTO().setAccountId(accountId) .setPageNo(pageNo).setPageSize(pageSize); // 查询分页 diff --git a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/systemlog/AccessLogConvert.java b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/systemlog/AccessLogConvert.java index a07b36c4..e5f20cf7 100644 --- a/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/systemlog/AccessLogConvert.java +++ b/system/system-rest/src/main/java/cn/iocoder/mall/system/rest/convert/systemlog/AccessLogConvert.java @@ -19,7 +19,7 @@ public interface AccessLogConvert { AccessLogConvert INSTANCE = Mappers.getMapper(AccessLogConvert.class); - @Mappings({}) + @Mappings({}) // TODO FROM 芋艿 to 2447007062:注意空行哟;另外,如果不需要专门 mapping,可以不添加该注解,嘿嘿。 PageResult convert(PageResult result); diff --git a/user/user-rpc/src/main/java/cn/iocoder/mall/user/rpc/convert/user/UserAddressRPCConvert.java b/user/user-rpc/src/main/java/cn/iocoder/mall/user/rpc/convert/user/UserAddressRPCConvert.java index 6bda9b15..16056e74 100644 --- a/user/user-rpc/src/main/java/cn/iocoder/mall/user/rpc/convert/user/UserAddressRPCConvert.java +++ b/user/user-rpc/src/main/java/cn/iocoder/mall/user/rpc/convert/user/UserAddressRPCConvert.java @@ -3,7 +3,6 @@ package cn.iocoder.mall.user.rpc.convert.user; import cn.iocoder.mall.user.biz.bo.user.UserAddressBO; import cn.iocoder.mall.user.rpc.response.user.UserAddressResponse; import org.mapstruct.Mapper; -import org.mapstruct.Mappings; import org.mapstruct.factory.Mappers; /** @@ -17,7 +16,6 @@ public interface UserAddressRPCConvert { UserAddressRPCConvert INSTANCE = Mappers.getMapper(UserAddressRPCConvert.class); - // TODO DONE FROM 芋艿 to 小范:如果不用映射,可以不用 @Mappings 哈 - @Mappings({}) UserAddressResponse convert(UserAddressBO userAddressBO); + }