diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/ProductBO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/admin/ProductBO.java similarity index 93% rename from mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/ProductBO.java rename to mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/admin/ProductBO.java index fab6976f3..888e5360b 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/ProductBO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/admin/ProductBO.java @@ -1,4 +1,4 @@ -package com.youlai.mall.pms.bo; +package com.youlai.mall.pms.bo.admin; import com.youlai.mall.pms.pojo.domain.PmsSku; import com.youlai.mall.pms.pojo.domain.PmsSpuAttrValue; diff --git a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/AppProductBO.java b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/app/ProductBO.java similarity index 89% rename from mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/AppProductBO.java rename to mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/app/ProductBO.java index fb682b0db..180c05489 100644 --- a/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/AppProductBO.java +++ b/mall-pms/pms-api/src/main/java/com/youlai/mall/pms/bo/app/ProductBO.java @@ -1,4 +1,4 @@ -package com.youlai.mall.pms.bo; +package com.youlai.mall.pms.bo.app; import com.youlai.mall.pms.pojo.domain.PmsSku; import com.youlai.mall.pms.pojo.domain.PmsSpuAttrValue; @@ -13,7 +13,7 @@ import java.util.List; @Data @AllArgsConstructor @NoArgsConstructor -public class AppProductBO { +public class ProductBO { private SpuDTO spu; diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/AttrController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/AttrController.java index 07d8d1123..42a2b02f0 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/AttrController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/AttrController.java @@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.stream.Collectors; -@Api(tags = "分类属性接口") +@Api(tags = "【系统管理】分类属性") @RestController @RequestMapping("/admin-api/v1/attrs") @@ -26,7 +26,7 @@ public class AttrController { private IPmsCategoryAttrService iPmsCategoryAttrService; - @ApiOperation(value = "属性分类列表", httpMethod = "GET") + @ApiOperation(value = "分类属性列表", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "categoryId", value = "分类ID", paramType = "query", dataType = "Long") diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java index 1c1652420..006119b93 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/BrandController.java @@ -21,7 +21,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.List; -@Api(tags = "品牌接口") +@Api(tags = "【系统管理】品牌接口") @RestController @RequestMapping("/brands") @Slf4j diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/CategoryController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/CategoryController.java index d6f31c0c6..b1b90f181 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/CategoryController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/CategoryController.java @@ -19,7 +19,7 @@ import java.util.Arrays; import java.util.List; import java.util.stream.Collectors; -@Api(tags = "商品分类接口") +@Api(tags = "【系统管理】商品分类") @RestController @RequestMapping("/categories") @Slf4j diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SkuController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/InventoryController.java similarity index 87% rename from mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SkuController.java rename to mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/InventoryController.java index 01b9497f0..00a140453 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SkuController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/InventoryController.java @@ -13,17 +13,17 @@ import lombok.AllArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; -@Api(tags = "商品sku接口") +@Api(tags = "【系统管理】商品库存") @RestController -@RequestMapping("/api.admin/v1/sku") +@RequestMapping("/api.admin/v1/inventories") @Slf4j @AllArgsConstructor -public class SkuController { +public class InventoryController { private IPmsSkuService iPmsSkuService; - @ApiOperation(value = "商品sku详情", httpMethod = "GET") - @ApiImplicitParam(name = "id", value = "商品sku id", required = true, paramType = "path", dataType = "Long") + @ApiOperation(value = "库存明细", httpMethod = "GET") + @ApiImplicitParam(name = "id", value = "商品SKU ID", required = true, paramType = "path", dataType = "Long") @GetMapping("/{id}") public Result detail(@PathVariable Long id) { PmsSku sku = iPmsSkuService.getById(id); @@ -32,7 +32,7 @@ public class SkuController { return Result.success(skuDTO); } - @ApiOperation(value = "修改商品库存", httpMethod = "PUT") + @ApiOperation(value = "修改库存", httpMethod = "PUT") @ApiImplicitParams({ @ApiImplicitParam(name = "id", value = "商品id", required = true, paramType = "path", dataType = "Long"), @ApiImplicitParam(name = "sku", value = "实体JSON对象", required = true, paramType = "body", dataType = "PmsSku") diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/ProductController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/ProductController.java index 9826415fd..5e4bfae2a 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/ProductController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/ProductController.java @@ -6,7 +6,7 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.youlai.common.enums.QueryModeEnum; import com.youlai.common.result.Result; import com.youlai.common.result.ResultCode; -import com.youlai.mall.pms.bo.ProductBO; +import com.youlai.mall.pms.bo.admin.ProductBO; import com.youlai.mall.pms.pojo.domain.PmsSpu; import com.youlai.mall.pms.service.IPmsSpuService; import io.swagger.annotations.Api; @@ -20,7 +20,7 @@ import org.springframework.web.bind.annotation.*; import java.util.Arrays; import java.util.stream.Collectors; -@Api(tags = "商品接口") +@Api(tags = "【系统管理】商品信息") @RestController @RequestMapping("/api.admin/v1/products") @Slf4j diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SpecController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SpecificationController.java similarity index 93% rename from mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SpecController.java rename to mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SpecificationController.java index bb6c33325..891634b36 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SpecController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/admin/SpecificationController.java @@ -16,16 +16,16 @@ import org.springframework.web.bind.annotation.*; import java.util.List; import java.util.stream.Collectors; -@Api(tags = "规格接口") +@Api(tags = "【系统管理】商品规格") @RestController -@RequestMapping("/admin-api/v1/specs") +@RequestMapping("/admin-api/v1/specifications") @Slf4j @AllArgsConstructor -public class SpecController { +public class SpecificationController { private IPmsCategorySpecService iPmsCategorySpecService; - @ApiOperation(value = "规格分类列表", httpMethod = "GET") + @ApiOperation(value = "分类规格列表", httpMethod = "GET") @ApiImplicitParams({ @ApiImplicitParam(name = "categoryId", value = "分类ID", paramType = "query", dataType = "Long") }) diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppCategoryController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java similarity index 92% rename from mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppCategoryController.java rename to mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java index 0b8c2175f..b8874d4c9 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppCategoryController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/CategoryController.java @@ -17,12 +17,12 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; -@Api(tags = "分类接口【移动端】") -@RestController +@Api(tags = "【移动端】商品分类") +@RestController("AppCategoryController") @RequestMapping("/api.app/v1/categories") @Slf4j @AllArgsConstructor -public class AppCategoryController { +public class CategoryController { private IPmsCategoryService iPmsCategoryService; diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppSkuController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/InventoryController.java similarity index 95% rename from mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppSkuController.java rename to mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/InventoryController.java index d130ecde9..6f76c9c92 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppSkuController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/InventoryController.java @@ -17,12 +17,11 @@ import org.springframework.web.bind.annotation.*; import java.util.List; -@Api(tags = "商品SKU") -@RestController -@RequestMapping("/api.app/v1/sku") -@Slf4j +@Api(tags = "【移动端】商品库存") +@RestController("AppInventoryController") +@RequestMapping("/api.app/v1/inventories") @AllArgsConstructor -public class AppSkuController { +public class InventoryController { private IPmsSkuService iPmsSkuService; diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppProductController.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/ProductController.java similarity index 86% rename from mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppProductController.java rename to mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/ProductController.java index c649e4fb5..1743afd58 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/AppProductController.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/controller/app/ProductController.java @@ -3,7 +3,7 @@ package com.youlai.mall.pms.controller.app; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.youlai.common.result.Result; -import com.youlai.mall.pms.bo.AppProductBO; +import com.youlai.mall.pms.bo.app.ProductBO; import com.youlai.mall.pms.pojo.domain.PmsSpu; import com.youlai.mall.pms.service.IPmsSpuService; import io.swagger.annotations.Api; @@ -11,15 +11,13 @@ import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiImplicitParams; import io.swagger.annotations.ApiOperation; import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.*; -@Api(tags = "商品接口") -@RestController +@Api(tags = "【移动端】商品信息") +@RestController("AppProductController") @RequestMapping("/api.app/v1/products") -@Slf4j @AllArgsConstructor -public class AppProductController { +public class ProductController { private IPmsSpuService iPmsSpuService; @@ -47,8 +45,8 @@ public class AppProductController { @ApiOperation(value = "商品详情", httpMethod = "GET") @ApiImplicitParam(name = "id", value = "商品id", required = true, paramType = "path", dataType = "Long") @GetMapping("/{id}") - public Result detail(@PathVariable Long id) { - AppProductBO product = iPmsSpuService.getProductByIdForApp(id); + public Result detail(@PathVariable Long id) { + ProductBO product = iPmsSpuService.getProductByIdForApp(id); return Result.success(product); } diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsSpuService.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsSpuService.java index a86a1b63a..29c3cf633 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsSpuService.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/IPmsSpuService.java @@ -3,8 +3,7 @@ package com.youlai.mall.pms.service; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.IService; -import com.youlai.mall.pms.bo.AppProductBO; -import com.youlai.mall.pms.bo.ProductBO; +import com.youlai.mall.pms.bo.app.ProductBO; import com.youlai.mall.pms.pojo.domain.PmsSpu; import java.util.List; @@ -13,13 +12,13 @@ public interface IPmsSpuService extends IService { IPage list(Page page, PmsSpu spu); - boolean add(ProductBO spuBO); + boolean add(com.youlai.mall.pms.bo.admin.ProductBO spuBO); - ProductBO getBySpuId(Long id); + com.youlai.mall.pms.bo.admin.ProductBO getBySpuId(Long id); boolean removeBySpuIds(List spuIds); - boolean updateById(ProductBO spuBO); + boolean updateById(com.youlai.mall.pms.bo.admin.ProductBO spuBO); - AppProductBO getProductByIdForApp(Long id); + ProductBO getProductByIdForApp(Long id); } diff --git a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/impl/PmsSpuServiceImpl.java b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/impl/PmsSpuServiceImpl.java index 156b62106..8c71cb6c4 100644 --- a/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/impl/PmsSpuServiceImpl.java +++ b/mall-pms/pms-boot/src/main/java/com/youlai/mall/pms/service/impl/PmsSpuServiceImpl.java @@ -7,8 +7,7 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; -import com.youlai.mall.pms.bo.AppProductBO; -import com.youlai.mall.pms.bo.ProductBO; +import com.youlai.mall.pms.bo.app.ProductBO; import com.youlai.mall.pms.mapper.PmsSpuMapper; import com.youlai.mall.pms.pojo.domain.*; import com.youlai.mall.pms.pojo.dto.SpuDTO; @@ -44,7 +43,7 @@ public class PmsSpuServiceImpl extends ServiceImpl impleme @Override @Transactional - public boolean add(ProductBO spuBO) { + public boolean add(com.youlai.mall.pms.bo.admin.ProductBO spuBO) { SpuDTO spuDTO = spuBO.getSpu(); List attrs = spuBO.getAttrs(); List specs = spuBO.getSpecs(); @@ -81,7 +80,7 @@ public class PmsSpuServiceImpl extends ServiceImpl impleme } @Override - public ProductBO getBySpuId(Long id) { + public com.youlai.mall.pms.bo.admin.ProductBO getBySpuId(Long id) { // spu SpuDTO spuDTO = new SpuDTO(); PmsSpu spu = this.getById(id); @@ -102,13 +101,13 @@ public class PmsSpuServiceImpl extends ServiceImpl impleme List skuList = iPmsSkuService.list(new LambdaQueryWrapper().eq(PmsSku::getSpuId, id)); // 组合 - ProductBO spuBO = new ProductBO(spuDTO, attrs, specs, skuList); + com.youlai.mall.pms.bo.admin.ProductBO spuBO = new com.youlai.mall.pms.bo.admin.ProductBO(spuDTO, attrs, specs, skuList); return spuBO; } @Override - public boolean updateById(ProductBO spuBO) { + public boolean updateById(com.youlai.mall.pms.bo.admin.ProductBO spuBO) { SpuDTO spuDTO = spuBO.getSpu(); List attrs = spuBO.getAttrs(); @@ -196,7 +195,7 @@ public class PmsSpuServiceImpl extends ServiceImpl impleme } @Override - public AppProductBO getProductByIdForApp(Long spuId) { + public ProductBO getProductByIdForApp(Long spuId) { // spu PmsSpu spu = this.getById(spuId); SpuDTO spuDTO = new SpuDTO(); @@ -218,7 +217,7 @@ public class PmsSpuServiceImpl extends ServiceImpl impleme // sku List skuList = iPmsSkuService.list(new LambdaQueryWrapper().eq(PmsSku::getSpuId, spuId)); - AppProductBO product = new AppProductBO(spuDTO, attrs, specs, skuList); + ProductBO product = new ProductBO(spuDTO, attrs, specs, skuList); return product; } } diff --git a/mall-pms/pms-boot/src/test/java/com/youlai/mall/pms/controller/ProductControllerTest.java b/mall-pms/pms-boot/src/test/java/com/youlai/mall/pms/controller/ProductControllerTest.java index e4aa63c8d..c1c521102 100644 --- a/mall-pms/pms-boot/src/test/java/com/youlai/mall/pms/controller/ProductControllerTest.java +++ b/mall-pms/pms-boot/src/test/java/com/youlai/mall/pms/controller/ProductControllerTest.java @@ -1,7 +1,7 @@ package com.youlai.mall.pms.controller; import com.youlai.common.result.ResultCode; -import com.youlai.mall.pms.bo.AppProductBO; +import com.youlai.mall.pms.bo.app.ProductBO; import com.youlai.mall.pms.controller.admin.ProductController; import com.youlai.mall.pms.pojo.domain.PmsCategorySpec; import com.youlai.mall.pms.service.IPmsSpuAttrValueService; @@ -69,7 +69,7 @@ public class ProductControllerTest { @Test public void getProduct() { - AppProductBO product = iPmsSpuService.getProductByIdForApp(1l); + ProductBO product = iPmsSpuService.getProductByIdForApp(1l); log.info(product.toString()); } } diff --git a/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/admin/AdminAdvertController.java b/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/admin/AdvertController.java similarity index 98% rename from mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/admin/AdminAdvertController.java rename to mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/admin/AdvertController.java index e28c9812f..8a84239af 100644 --- a/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/admin/AdminAdvertController.java +++ b/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/admin/AdvertController.java @@ -20,12 +20,12 @@ import java.util.Arrays; import java.util.Date; import java.util.List; -@Api(tags = "广告接口") +@Api(tags = "【系统管理】营销广告") @RestController @RequestMapping("/api.admin/v1/adverts") @Slf4j @AllArgsConstructor -public class AdminAdvertController { +public class AdvertController { private ISmsAdvertService iSmsAdvertService; diff --git a/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/app/AppAdvertController.java b/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/app/AdvertController.java similarity index 90% rename from mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/app/AppAdvertController.java rename to mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/app/AdvertController.java index 1e511faea..71c0b7470 100644 --- a/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/app/AppAdvertController.java +++ b/mall-sms/sms-boot/src/main/java/com/youlai/mall/sms/controller/app/AdvertController.java @@ -14,12 +14,12 @@ import org.springframework.web.bind.annotation.RestController; import java.util.List; -@Api(tags = "广告接口") -@RestController +@Api(tags = "【移动端】营销广告") +@RestController("AppAdvertController") @RequestMapping("/api.app/v1/adverts") @Slf4j @AllArgsConstructor -public class AppAdvertController { +public class AdvertController { private ISmsAdvertService iSmsAdvertService;