From 1622984df721209a09bcf59055d877b9101c55d1 Mon Sep 17 00:00:00 2001 From: perry <292303709@qq.com> Date: Thu, 11 May 2023 22:33:51 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../express/ShippingTemplatesController.java | 16 ++++++------ .../ShippingTemplatesFreeController.java | 4 +-- ...ShippingTemplatesNoDeliveryController.java | 4 +-- .../ShippingTemplatesRegionController.java | 4 +-- .../express/ShippingTemplatesDO.java | 2 +- .../product/StoreProductResponse.java | 5 ++-- .../admin/category/CategoryController.java | 18 ++++++------- .../admin/order/StoreOrderController.java | 26 +++++++++---------- .../order/StoreOrderStatusController.java | 4 +-- .../admin/product/StoreProductController.java | 21 +++++++-------- .../product/StoreProductReplyController.java | 12 ++++----- .../product/StoreProductRuleController.java | 12 ++++----- .../product/StoreProductAttrConvert.java | 2 ++ .../dal/dataobject/product/StoreProduct.java | 3 ++- .../product/impl/StoreProductServiceImpl.java | 3 ++- .../admin/user/AdminUserController.java | 1 + .../service/demo/PayDemoOrderServiceImpl.java | 2 +- .../src/main/resources/application.yaml | 4 +++ 18 files changed, 76 insertions(+), 67 deletions(-) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java index 3d37bc078..788aff229 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesController.java @@ -32,8 +32,8 @@ import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success; */ @Slf4j @RestController -@RequestMapping("api/admin/express/shipping/templates") -@Tag(name = "设置 -- 物流 -- 模板") +@RequestMapping("admin/express/shipping/templates") +@Tag(name = "管理后台 - 物流模板") public class ShippingTemplatesController { @Autowired @@ -43,9 +43,9 @@ public class ShippingTemplatesController { * 分页显示 * @param request 搜索条件 */ - @PreAuthorize("hasAuthority('admin:shipping:templates:list')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:list')") @Operation(summary = "分页列表") - @RequestMapping(value = "/list", method = RequestMethod.GET) + @GetMapping(value = "/list") public CommonResult> getList(@Validated ShippingTemplatesSearchReqVO request){ PageResult shippingTemplatesCommonPage = shippingTemplatesService.getList(request); return CommonResult.success(shippingTemplatesCommonPage); @@ -55,7 +55,7 @@ public class ShippingTemplatesController { * 新增 * @param request 新增参数 */ - @PreAuthorize("hasAuthority('admin:shipping:templates:save')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:save')") @Operation(summary = "新增") @RequestMapping(value = "/save", method = RequestMethod.POST) public CommonResult save(@RequestBody @Validated ShippingTemplatesReqVO request){ @@ -69,7 +69,7 @@ public class ShippingTemplatesController { * 删除 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:shipping:templates:delete')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:delete')") @Operation(summary = "删除") @RequestMapping(value = "/delete", method = RequestMethod.GET) @Parameter(name="id", description="模板ID", required = true) @@ -86,7 +86,7 @@ public class ShippingTemplatesController { * @param id integer id * @param request ShippingTemplatesRequest 修改参数 */ - @PreAuthorize("hasAuthority('admin:shipping:templates:update')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:update')") @Operation(summary = "修改") @RequestMapping(value = "/update", method = RequestMethod.POST) public CommonResult update(@RequestParam Integer id, @RequestBody @Validated ShippingTemplatesReqVO request){ @@ -100,7 +100,7 @@ public class ShippingTemplatesController { * 查询信息 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:shipping:templates:info')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:info')") @Operation(summary = "详情") @RequestMapping(value = "/info", method = RequestMethod.GET) @Parameter(name="id", description="模板ID", required = true) diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java index e7ce82a96..72edd9ddb 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesFreeController.java @@ -29,7 +29,7 @@ import java.util.List; */ @Slf4j @RestController -@RequestMapping("api/admin/express/shipping/free") +@RequestMapping("admin/express/shipping/free") @Tag(name = "设置 -- 物流 -- 免费") public class ShippingTemplatesFreeController { @@ -40,7 +40,7 @@ public class ShippingTemplatesFreeController { * 根据模板id查询数据 * @param tempId Integer 模板id */ - @PreAuthorize("hasAuthority('admin:shipping:templates:free:list')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:free:list')") @Operation(summary = "根据模板id查询数据") @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@RequestParam Integer tempId){ diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java index c7a9cb80a..6c3fea29f 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesNoDeliveryController.java @@ -29,7 +29,7 @@ import java.util.List; */ @Slf4j @RestController -@RequestMapping("api/admin/express/shipping/no_delivery") +@RequestMapping("admin/express/shipping/no_delivery") @Tag(name = "设置 -- 物流 -- 免费") public class ShippingTemplatesNoDeliveryController { @@ -40,7 +40,7 @@ public class ShippingTemplatesNoDeliveryController { * 根据模板id查询数据 * @param tempId Integer 模板id */ - @PreAuthorize("hasAuthority('admin:shipping:templates:free:list')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:free:list')") @Operation(summary = "根据模板id查询数据") @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@RequestParam Integer tempId){ diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java index 40c49da09..31befc767 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/admin/express/ShippingTemplatesRegionController.java @@ -29,7 +29,7 @@ import java.util.List; */ @Slf4j @RestController -@RequestMapping("api/admin/express/shipping/region") +@RequestMapping("admin/express/shipping/region") @Tag(name = "设置 -- 物流 -- 付费") public class ShippingTemplatesRegionController { @@ -40,7 +40,7 @@ public class ShippingTemplatesRegionController { * 根据模板id查询数据 * @param tempId Integer 模板id */ - @PreAuthorize("hasAuthority('admin:shipping:templates:region:list')") + @PreAuthorize("@ss.hasPermission('admin:shipping:templates:region:list')") @Operation(summary = "根据模板id查询数据") @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@RequestParam Integer tempId){ diff --git a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java index cef9e2ad8..f3eb3cb40 100644 --- a/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java +++ b/yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/dal/dataobject/express/ShippingTemplatesDO.java @@ -28,7 +28,7 @@ public class ShippingTemplatesDO extends TenantBaseDO { private static final long serialVersionUID=1L; - @TableId(value = "id", type = IdType.AUTO) + @TableId(value = "id", type = IdType.ASSIGN_ID) private Integer id; /** diff --git a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/response/product/StoreProductResponse.java b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/response/product/StoreProductResponse.java index 5c4b8f47f..243c851da 100644 --- a/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/response/product/StoreProductResponse.java +++ b/yudao-module-mall/yudao-module-shop-api/src/main/java/cn/iocoder/yudao/module/shop/response/product/StoreProductResponse.java @@ -8,6 +8,7 @@ import lombok.experimental.Accessors; import java.io.Serializable; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -100,7 +101,7 @@ public class StoreProductResponse implements Serializable { private Boolean isNew; @Schema(description= "添加时间") - private Integer addTime; + private LocalDateTime addTime; @Schema(description= "是否包邮") private Boolean isPostage; @@ -252,5 +253,5 @@ public class StoreProductResponse implements Serializable { private BigDecimal minPrice; @Schema(description= "砍价结束时间") - private Long endTime; + private LocalDateTime endTime; } diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/category/CategoryController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/category/CategoryController.java index b4778fe73..c629046b0 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/category/CategoryController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/category/CategoryController.java @@ -38,7 +38,7 @@ import java.util.List; */ @Slf4j @RestController -@RequestMapping("api/admin/category") +@RequestMapping("admin/category") @Tag(name = "管理后台 - 分类服务") public class CategoryController { @@ -53,7 +53,7 @@ public class CategoryController { * @author Mr.Zhang * @since 2020-04-16 */ - @PreAuthorize("hasAuthority('admin:category:list')") + @PreAuthorize("@ss.hasPermission('admin:category:list')") @Operation(summary = "分页分类列表") @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@ModelAttribute CategorySearchRequest request, @ModelAttribute PageParam pageParamRequest) { @@ -64,7 +64,7 @@ public class CategoryController { * 新增分类表 * @param categoryRequest 新增参数 */ - @PreAuthorize("hasAuthority('admin:category:save')") + @PreAuthorize("@ss.hasPermission('admin:category:save')") @Operation(summary = "新增") @RequestMapping(value = "/save", method = RequestMethod.POST) public CommonResult save(@Validated CategoryRequest categoryRequest) { @@ -81,7 +81,7 @@ public class CategoryController { * @author Mr.Zhang * @since 2020-04-16 */ - @PreAuthorize("hasAuthority('admin:category:delete')") + @PreAuthorize("@ss.hasPermission('admin:category:delete')") @Operation(summary = "删除") @RequestMapping(value = "/delete", method = RequestMethod.GET) @Parameter(name="id", description="分类ID") @@ -100,7 +100,7 @@ public class CategoryController { * @author Mr.Zhang * @since 2020-04-16 */ - @PreAuthorize("hasAuthority('admin:category:update')") + @PreAuthorize("@ss.hasPermission('admin:category:update')") @Operation(summary = "修改") @RequestMapping(value = "/update", method = RequestMethod.POST) @Parameter(name="id", description="分类ID") @@ -120,7 +120,7 @@ public class CategoryController { * @author Mr.Zhang * @since 2020-04-16 */ - @PreAuthorize("hasAuthority('admin:category:info')") + @PreAuthorize("@ss.hasPermission('admin:category:info')") @Operation(summary = "分类详情") @RequestMapping(value = "/info", method = RequestMethod.GET) @Parameter(name="id", description="分类ID") @@ -135,7 +135,7 @@ public class CategoryController { * @author Mr.Zhang * @since 2020-04-16 */ - @PreAuthorize("hasAuthority('admin:category:list:tree')") + @PreAuthorize("@ss.hasPermission('admin:category:list:tree')") @Operation(summary = "获取tree结构的列表") @RequestMapping(value = "/list/tree", method = RequestMethod.GET) @Parameters({ @@ -155,7 +155,7 @@ public class CategoryController { * @param ids String id集合字符串 * @since 2020-04-16 */ - @PreAuthorize("hasAuthority('admin:category:list:ids')") + @PreAuthorize("@ss.hasPermission('admin:category:list:ids')") @Operation(summary = "根据id集合获取分类列表") @RequestMapping(value = "/list/ids", method = RequestMethod.GET) @Parameter(name = "ids", description="分类id集合") @@ -169,7 +169,7 @@ public class CategoryController { * @since 2020-04-16 * @return */ - @PreAuthorize("hasAuthority('admin:category:update:status')") + @PreAuthorize("@ss.hasPermission('admin:category:update:status')") @Operation(summary = "更改分类状态") @RequestMapping(value = "/updateStatus/{id}", method = RequestMethod.GET) @Parameter(name = "id", description="分类id") diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderController.java index 5fe68efce..f7d429f5e 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderController.java @@ -38,7 +38,7 @@ import cn.iocoder.yudao.module.shop.response.order.StoreOrderCountItemResponse; */ @Slf4j @RestController -@RequestMapping("api/admin/store/order") +@RequestMapping("admin/store/order") @Tag(name = "管理后台 - 订单") //配合swagger使用 public class StoreOrderController { @@ -51,7 +51,7 @@ public class StoreOrderController { * @param request 搜索条件 * @param pageParamRequest 分页参数 */ - @PreAuthorize("hasAuthority('admin:order:list')") + @PreAuthorize("@ss.hasPermission('admin:order:list')") @Operation(summary = "分页列表") //配合swagger使用 @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@Validated StoreOrderSearchRequest request, @Validated PageParam pageParamRequest) { @@ -61,7 +61,7 @@ public class StoreOrderController { /** * 获取订单各状态数量 */ - @PreAuthorize("hasAuthority('admin:order:status:num')") + @PreAuthorize("@ss.hasPermission('admin:order:status:num')") @Operation(summary = "获取订单各状态数量") @RequestMapping(value = "/status/num", method = RequestMethod.GET) public CommonResult getOrderStatusNum( @@ -73,7 +73,7 @@ public class StoreOrderController { /** * 获取订单统计数据 */ - @PreAuthorize("hasAuthority('admin:order:list:data')") + @PreAuthorize("@ss.hasPermission('admin:order:list:data')") @Operation(summary = "获取订单统计数据") @RequestMapping(value = "/list/data", method = RequestMethod.GET) public CommonResult getOrderData(@RequestParam(value = "dateLimit", defaultValue = "")String dateLimit) { @@ -84,7 +84,7 @@ public class StoreOrderController { /** * 订单删除 */ - @PreAuthorize("hasAuthority('admin:order:delete')") + @PreAuthorize("@ss.hasPermission('admin:order:delete')") @Operation(summary = "订单删除") @RequestMapping(value = "/delete", method = RequestMethod.GET) public CommonResult delete(@RequestParam(value = "orderNo") String orderNo) { @@ -98,7 +98,7 @@ public class StoreOrderController { /** * 备注订单 */ - @PreAuthorize("hasAuthority('admin:order:mark')") + @PreAuthorize("@ss.hasPermission('admin:order:mark')") @Operation(summary = "备注") @RequestMapping(value = "/mark", method = RequestMethod.POST) public CommonResult mark(@RequestParam String orderNo, @RequestParam String mark) { @@ -112,7 +112,7 @@ public class StoreOrderController { /** * 修改订单(改价) */ - @PreAuthorize("hasAuthority('admin:order:update:price')") + @PreAuthorize("@ss.hasPermission('admin:order:update:price')") @Operation(summary = "修改订单(改价)") @RequestMapping(value = "/update/price", method = RequestMethod.POST) public CommonResult updatePrice(@RequestBody @Validated StoreOrderUpdatePriceRequest request) { @@ -126,7 +126,7 @@ public class StoreOrderController { /** * 订单详情 */ - @PreAuthorize("hasAuthority('admin:order:info')") + @PreAuthorize("@ss.hasPermission('admin:order:info')") @Operation(summary = "详情") @RequestMapping(value = "/info", method = RequestMethod.GET) public CommonResult info(@RequestParam(value = "orderNo") String orderNo) { @@ -136,7 +136,7 @@ public class StoreOrderController { /** * 发送货 */ - @PreAuthorize("hasAuthority('admin:order:send')") + @PreAuthorize("@ss.hasPermission('admin:order:send')") @Operation(summary = "发送货") @RequestMapping(value = "/send", method = RequestMethod.POST) public CommonResult send(@RequestBody @Validated StoreOrderSendRequest request) { @@ -149,7 +149,7 @@ public class StoreOrderController { /** * 退款 */ - @PreAuthorize("hasAuthority('admin:order:refund')") + @PreAuthorize("@ss.hasPermission('admin:order:refund')") @Operation(summary = "退款") @RequestMapping(value = "/refund", method = RequestMethod.GET) public CommonResult send(@Validated StoreOrderRefundRequest request) { @@ -159,7 +159,7 @@ public class StoreOrderController { /** * 拒绝退款 */ - @PreAuthorize("hasAuthority('admin:order:refund:refuse')") + @PreAuthorize("@ss.hasPermission('admin:order:refund:refuse')") @Operation(summary = "拒绝退款") @RequestMapping(value = "/refund/refuse", method = RequestMethod.GET) public CommonResult refundRefuse(@RequestParam String orderNo, @RequestParam String reason) { @@ -172,7 +172,7 @@ public class StoreOrderController { /** * 快递查询 */ - @PreAuthorize("hasAuthority('admin:order:logistics:info')") + @PreAuthorize("@ss.hasPermission('admin:order:logistics:info')") @Operation(summary = "快递查询") @RequestMapping(value = "/getLogisticsInfo", method = RequestMethod.GET) public CommonResult getLogisticsInfo(@RequestParam(value = "orderNo") String orderNo) { @@ -192,7 +192,7 @@ public class StoreOrderController { * @author stivepeim * @since 2020-09-01 */ - @PreAuthorize("hasAuthority('admin:order:time')") + @PreAuthorize("@ss.hasPermission('admin:order:time')") @Operation(summary = "订单统计详情") @RequestMapping(value = "/time", method = RequestMethod.GET) @Parameters({ diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderStatusController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderStatusController.java index a587b1636..032adda39 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderStatusController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/order/StoreOrderStatusController.java @@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.RestController; */ @Slf4j @RestController -@RequestMapping("api/admin/store/order/status") +@RequestMapping("admin/store/order/status") @Tag(name = "管理后台 - 订单 -- 操作记录") //配合swagger使用 public class StoreOrderStatusController { @@ -44,7 +44,7 @@ public class StoreOrderStatusController { * @param request 搜索条件 * @param pageParamRequest 分页参数 */ - @PreAuthorize("hasAuthority('admin:order:status:list')") + @PreAuthorize("@ss.hasPermission('admin:order:status:list')") @Operation(summary = "分页列表") //配合swagger使用 @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@Validated StoreOrderStatusSearchRequest request, diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductController.java index 6fc92f0e0..ee8b57293 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductController.java @@ -37,7 +37,7 @@ import java.util.List; */ @Slf4j @RestController -@RequestMapping("api/admin/store/product") +@RequestMapping("admin/store/product") @Tag(name = "管理后台 - 商品", description = "商品") //配合swagger使用 public class StoreProductController { @@ -52,7 +52,7 @@ public class StoreProductController { * @param request 搜索条件 * @param pageParamRequest 分页参数 */ - @PreAuthorize("hasAuthority('admin:product:list')") +// @PreAuthorize("@ss.hasPermission('admin:product:list')") @Operation(summary = "分页列表") //配合swagger使用 @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@Validated StoreProductSearchRequest request, @@ -64,7 +64,7 @@ public class StoreProductController { * 新增商品 * @param request 新增参数 */ - @PreAuthorize("hasAuthority('admin:product:save')") +// @PreAuthorize("@ss.hasPermission('admin:product:save')") @Operation(summary = "新增商品") @RequestMapping(value = "/save", method = RequestMethod.POST) public CommonResult save(@RequestBody @Validated StoreProductAddRequest request) { @@ -79,7 +79,7 @@ public class StoreProductController { * 删除商品表 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:product:delete')") +// @PreAuthorize("@ss.hasPermission('admin:product:delete')") @Operation(summary = "删除") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) public CommonResult delete(@RequestBody @PathVariable Integer id, @RequestParam(value = "type", required = false, defaultValue = "recycle")String type) { @@ -99,7 +99,7 @@ public class StoreProductController { * 恢复已删除商品表 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:product:restore')") +// @PreAuthorize("@ss.hasPermission('admin:product:restore')") @Operation(summary = "恢复商品") @RequestMapping(value = "/restore/{id}", method = RequestMethod.GET) public CommonResult restore(@RequestBody @PathVariable Integer id) { @@ -114,7 +114,7 @@ public class StoreProductController { * 商品修改 * @param storeProductRequest 商品参数 */ - @PreAuthorize("hasAuthority('admin:product:update')") +// @PreAuthorize("@ss.hasPermission('admin:product:update')") @Operation(summary = "商品修改") @RequestMapping(value = "/update", method = RequestMethod.POST) public CommonResult update(@RequestBody @Validated StoreProductAddRequest storeProductRequest) { @@ -129,7 +129,7 @@ public class StoreProductController { * 商品详情 * @param id 商品id */ - @PreAuthorize("hasAuthority('admin:product:info')") +// @PreAuthorize("@ss.hasPermission('admin:product:info')") @Operation(summary = "商品详情") @RequestMapping(value = "/info/{id}", method = RequestMethod.GET) public CommonResult info(@PathVariable Integer id) { @@ -139,18 +139,17 @@ public class StoreProductController { /** * 商品tabs表头数据 */ - @PreAuthorize("hasAuthority('admin:product:tabs:headers')") +// @PreAuthorize("@ss.hasPermission('admin:product:tabs:headers')") @Operation(summary = "商品表头数量") @RequestMapping(value = "/tabs/headers", method = RequestMethod.GET) public CommonResult> getTabsHeader() { return CommonResult.success(storeProductService.getTabsHeader()); } - /** * 上架 */ - @PreAuthorize("hasAuthority('admin:product:up')") +// @PreAuthorize("@ss.hasPermission('admin:product:up')") @Operation(summary = "上架") @RequestMapping(value = "/putOnShell/{id}", method = RequestMethod.GET) public CommonResult putOn(@PathVariable Integer id) { @@ -164,7 +163,7 @@ public class StoreProductController { /** * 下架 */ - @PreAuthorize("hasAuthority('admin:product:down')") +// @PreAuthorize("@ss.hasPermission('admin:product:down')") @Operation(summary = "下架") @RequestMapping(value = "/offShell/{id}", method = RequestMethod.GET) public CommonResult offShell(@PathVariable Integer id) { diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductReplyController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductReplyController.java index 8d06f8bed..e2ddafe9b 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductReplyController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductReplyController.java @@ -33,7 +33,7 @@ import org.springframework.web.bind.annotation.*; */ @Slf4j @RestController -@RequestMapping("api/admin/store/product/reply") +@RequestMapping("/admin/store/product/reply") @Tag(name = "管理后台 商品 -- 评论") //配合swagger使用 public class StoreProductReplyController { @@ -45,7 +45,7 @@ public class StoreProductReplyController { * @param request 搜索条件 * @param pageParamRequest 分页参数 */ - @PreAuthorize("hasAuthority('admin:product:reply:list')") + @PreAuthorize("@ss.hasPermission('admin:product:reply:list')") @Operation(summary = "分页列表") //配合swagger使用 @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList(@Validated StoreProductReplySearchRequest request, @@ -58,7 +58,7 @@ public class StoreProductReplyController { * 新增评论表 * @param request 新增参数 */ - @PreAuthorize("hasAuthority('admin:product:reply:save')") + @PreAuthorize("@ss.hasPermission('admin:product:reply:save')") @Operation(summary = "新增") @RequestMapping(value = "/save", method = RequestMethod.POST) public CommonResult save(@RequestBody @Validated StoreProductReplyAddRequest request) { @@ -73,7 +73,7 @@ public class StoreProductReplyController { * 删除评论表 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:product:reply:delete')") + @PreAuthorize("@ss.hasPermission('admin:product:reply:delete')") @Operation(summary = "删除") @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET) public CommonResult delete(@PathVariable Integer id) { @@ -88,7 +88,7 @@ public class StoreProductReplyController { * 查询评论表信息 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:product:reply:info')") + @PreAuthorize("@ss.hasPermission('admin:product:reply:info')") @Operation(summary = "详情") @RequestMapping(value = "/info/{id}", method = RequestMethod.GET) public CommonResult info(@PathVariable Integer id) { @@ -100,7 +100,7 @@ public class StoreProductReplyController { * 回复商品评论 * @param request StoreProductReplyCommentRequest 回复参数 */ - @PreAuthorize("hasAuthority('admin:product:reply:comment')") + @PreAuthorize("@ss.hasPermission('admin:product:reply:comment')") @Operation(summary = "回复") @RequestMapping(value = "/comment", method = RequestMethod.POST) public CommonResult comment(@RequestBody StoreProductReplyCommentRequest request) { diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductRuleController.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductRuleController.java index 5d38ca368..3c144bd4f 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductRuleController.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/controller/admin/product/StoreProductRuleController.java @@ -32,7 +32,7 @@ import org.springframework.web.bind.annotation.*; */ @Slf4j @RestController -@RequestMapping("api/admin/store/product/rule") +@RequestMapping("admin/store/product/rule") @Tag(name = "管理后台 商品 -- 规则值(规格)") //配合swagger使用 public class StoreProductRuleController { @@ -44,7 +44,7 @@ public class StoreProductRuleController { * @param request 搜索条件 * @param pageParamRequest 分页参数 */ - @PreAuthorize("hasAuthority('admin:product:rule:list')") + @PreAuthorize("@ss.hasPermission('admin:product:rule:list')") @Operation(summary = "分页列表") //配合swagger使用 @RequestMapping(value = "/list", method = RequestMethod.GET) public CommonResult> getList( @@ -56,7 +56,7 @@ public class StoreProductRuleController { * 新增商品规则值(规格)表 * @param storeProductRuleRequest 新增参数 */ - @PreAuthorize("hasAuthority('admin:product:rule:save')") + @PreAuthorize("@ss.hasPermission('admin:product:rule:save')") @Operation(summary = "新增") @RequestMapping(value = "/save", method = RequestMethod.POST) public CommonResult save(@RequestBody @Validated StoreProductRuleRequest storeProductRuleRequest) { @@ -71,7 +71,7 @@ public class StoreProductRuleController { * 删除商品规则值(规格)表 * @param ids Integer */ - @PreAuthorize("hasAuthority('admin:product:rule:delete')") + @PreAuthorize("@ss.hasPermission('admin:product:rule:delete')") @Operation(summary = "删除") @RequestMapping(value = "/delete/{ids}", method = RequestMethod.GET) public CommonResult delete(@PathVariable String ids) { @@ -86,7 +86,7 @@ public class StoreProductRuleController { * 修改商品规则值(规格)表 * @param storeProductRuleRequest 修改参数 */ - @PreAuthorize("hasAuthority('admin:product:rule:update')") + @PreAuthorize("@ss.hasPermission('admin:product:rule:update')") @Operation(summary = "修改") @RequestMapping(value = "/update", method = RequestMethod.POST) public CommonResult update(@RequestBody @Validated StoreProductRuleRequest storeProductRuleRequest) { @@ -101,7 +101,7 @@ public class StoreProductRuleController { * 查询商品规则值(规格)表信息 * @param id Integer */ - @PreAuthorize("hasAuthority('admin:product:rule:info')") + @PreAuthorize("@ss.hasPermission('admin:product:rule:info')") @Operation(summary = "详情") @RequestMapping(value = "/info/{id}", method = RequestMethod.GET) public CommonResult info(@PathVariable Integer id) { diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/convert/product/StoreProductAttrConvert.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/convert/product/StoreProductAttrConvert.java index 56ec321f4..f8bf876f3 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/convert/product/StoreProductAttrConvert.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/convert/product/StoreProductAttrConvert.java @@ -2,10 +2,12 @@ package cn.iocoder.yudao.module.shop.convert.product; import cn.iocoder.yudao.module.shop.dal.dataobject.product.StoreProductAttr; import cn.iocoder.yudao.module.shop.vo.product.StoreProductAttrVO; +import org.mapstruct.Mapper; import org.mapstruct.factory.Mappers; import java.util.List; +@Mapper public interface StoreProductAttrConvert { StoreProductAttrConvert INSTANCE = Mappers.getMapper(StoreProductAttrConvert.class); diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/product/StoreProduct.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/product/StoreProduct.java index c32146dd4..94683bd74 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/product/StoreProduct.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/dal/dataobject/product/StoreProduct.java @@ -12,6 +12,7 @@ import lombok.experimental.Accessors; import java.io.Serializable; import java.math.BigDecimal; +import java.time.LocalDateTime; import java.util.Date; /** @@ -106,7 +107,7 @@ public class StoreProduct implements Serializable { private Boolean isNew; @Schema(description= "添加时间") - private Date addTime; + private LocalDateTime addTime; @Schema(description= "是否包邮") private Boolean isPostage; diff --git a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/product/impl/StoreProductServiceImpl.java b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/product/impl/StoreProductServiceImpl.java index 1a60c1b8a..f3913f00f 100644 --- a/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/product/impl/StoreProductServiceImpl.java +++ b/yudao-module-mall/yudao-module-shop-biz/src/main/java/cn/iocoder/yudao/module/shop/service/product/impl/StoreProductServiceImpl.java @@ -40,6 +40,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.support.TransactionTemplate; import javax.annotation.Resource; +import java.time.LocalDateTime; import java.util.*; import java.util.stream.Collectors; @@ -234,7 +235,7 @@ public class StoreProductServiceImpl extends ServiceImpl 应用信息] 里添加 */ - private static final Long PAY_APP_ID = 7L; + private static final Long PAY_APP_ID = 8L; /** * 商品信息 Map diff --git a/yudao-server/src/main/resources/application.yaml b/yudao-server/src/main/resources/application.yaml index 76b94a49e..3c8f44645 100644 --- a/yudao-server/src/main/resources/application.yaml +++ b/yudao-server/src/main/resources/application.yaml @@ -191,6 +191,10 @@ yudao: - eb_shipping_templates_free - eb_shipping_templates_no_delivery - eb_shipping_templates_region + - eb_store_product_attr + - eb_store_product_attr_result + - eb_store_product_attr_value + - eb_store_product_description sms-code: # 短信验证码相关的配置项 expire-times: 10m send-frequency: 1m