Commit a80ba4888911f770ed09e3143dead2eba467aa8d
1 parent
907f3a58
bugfix:同步 master 修改的 bug
Showing
5 changed files
with
13 additions
and
16 deletions
yudao-module-crm/yudao-module-crm-biz/src/main/java/cn/iocoder/yudao/module/crm/service/receivable/CrmReceivablePlanServiceImpl.java
| ... | ... | @@ -20,7 +20,6 @@ import com.mzt.logapi.context.LogRecordContext; |
| 20 | 20 | import com.mzt.logapi.service.impl.DiffParseFunction; |
| 21 | 21 | import com.mzt.logapi.starter.annotation.LogRecord; |
| 22 | 22 | import jakarta.annotation.Resource; |
| 23 | -import org.springframework.context.annotation.Lazy; | |
| 24 | 23 | import org.springframework.stereotype.Service; |
| 25 | 24 | import org.springframework.transaction.annotation.Transactional; |
| 26 | 25 | import org.springframework.validation.annotation.Validated; |
| ... | ... | @@ -47,9 +46,6 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService { |
| 47 | 46 | private CrmReceivablePlanMapper receivablePlanMapper; |
| 48 | 47 | |
| 49 | 48 | @Resource |
| 50 | - @Lazy // 延迟加载,避免循环依赖 | |
| 51 | - private CrmReceivableService receivableService; | |
| 52 | - @Resource | |
| 53 | 49 | private CrmContractService contractService; |
| 54 | 50 | @Resource |
| 55 | 51 | private CrmPermissionService permissionService; |
| ... | ... | @@ -144,7 +140,7 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService { |
| 144 | 140 | // 2. 删除 |
| 145 | 141 | receivablePlanMapper.deleteById(id); |
| 146 | 142 | // 3. 删除数据权限 |
| 147 | - permissionService.deletePermission(CrmBizTypeEnum.CRM_CUSTOMER.getType(), id); | |
| 143 | + permissionService.deletePermission(CrmBizTypeEnum.CRM_RECEIVABLE_PLAN.getType(), id); | |
| 148 | 144 | |
| 149 | 145 | // 4. 记录操作日志上下文 |
| 150 | 146 | LogRecordContext.putVariable("receivablePlan", receivablePlan); | ... | ... |
yudao-module-erp/yudao-module-erp-biz/src/main/java/cn/iocoder/yudao/module/erp/controller/admin/purchase/ErpPurchaseOrderController.java
| ... | ... | @@ -61,14 +61,14 @@ public class ErpPurchaseOrderController { |
| 61 | 61 | |
| 62 | 62 | @PostMapping("/create") |
| 63 | 63 | @Operation(summary = "创建采购订单") |
| 64 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:create')") | |
| 64 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:create')") | |
| 65 | 65 | public CommonResult<Long> createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) { |
| 66 | 66 | return success(purchaseOrderService.createPurchaseOrder(createReqVO)); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | @PutMapping("/update") |
| 70 | 70 | @Operation(summary = "更新采购订单") |
| 71 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:update')") | |
| 71 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:update')") | |
| 72 | 72 | public CommonResult<Boolean> updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) { |
| 73 | 73 | purchaseOrderService.updatePurchaseOrder(updateReqVO); |
| 74 | 74 | return success(true); |
| ... | ... | @@ -76,7 +76,7 @@ public class ErpPurchaseOrderController { |
| 76 | 76 | |
| 77 | 77 | @PutMapping("/update-status") |
| 78 | 78 | @Operation(summary = "更新采购订单的状态") |
| 79 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:update-status')") | |
| 79 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:update-status')") | |
| 80 | 80 | public CommonResult<Boolean> updatePurchaseOrderStatus(@RequestParam("id") Long id, |
| 81 | 81 | @RequestParam("status") Integer status) { |
| 82 | 82 | purchaseOrderService.updatePurchaseOrderStatus(id, status); |
| ... | ... | @@ -86,7 +86,7 @@ public class ErpPurchaseOrderController { |
| 86 | 86 | @DeleteMapping("/delete") |
| 87 | 87 | @Operation(summary = "删除采购订单") |
| 88 | 88 | @Parameter(name = "ids", description = "编号数组", required = true) |
| 89 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:delete')") | |
| 89 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:delete')") | |
| 90 | 90 | public CommonResult<Boolean> deletePurchaseOrder(@RequestParam("ids") List<Long> ids) { |
| 91 | 91 | purchaseOrderService.deletePurchaseOrder(ids); |
| 92 | 92 | return success(true); |
| ... | ... | @@ -95,7 +95,7 @@ public class ErpPurchaseOrderController { |
| 95 | 95 | @GetMapping("/get") |
| 96 | 96 | @Operation(summary = "获得采购订单") |
| 97 | 97 | @Parameter(name = "id", description = "编号", required = true, example = "1024") |
| 98 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:query')") | |
| 98 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:query')") | |
| 99 | 99 | public CommonResult<ErpPurchaseOrderRespVO> getPurchaseOrder(@RequestParam("id") Long id) { |
| 100 | 100 | ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id); |
| 101 | 101 | if (purchaseOrder == null) { |
| ... | ... | @@ -115,7 +115,7 @@ public class ErpPurchaseOrderController { |
| 115 | 115 | |
| 116 | 116 | @GetMapping("/page") |
| 117 | 117 | @Operation(summary = "获得采购订单分页") |
| 118 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:query')") | |
| 118 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:query')") | |
| 119 | 119 | public CommonResult<PageResult<ErpPurchaseOrderRespVO>> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) { |
| 120 | 120 | PageResult<ErpPurchaseOrderDO> pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO); |
| 121 | 121 | return success(buildPurchaseOrderVOPageResult(pageResult)); |
| ... | ... | @@ -123,7 +123,7 @@ public class ErpPurchaseOrderController { |
| 123 | 123 | |
| 124 | 124 | @GetMapping("/export-excel") |
| 125 | 125 | @Operation(summary = "导出采购订单 Excel") |
| 126 | - @PreAuthorize("@ss.hasPermission('erp:purchase-create:export')") | |
| 126 | + @PreAuthorize("@ss.hasPermission('erp:purchase-order:export')") | |
| 127 | 127 | @OperateLog(type = EXPORT) |
| 128 | 128 | public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO, |
| 129 | 129 | HttpServletResponse response) throws IOException { | ... | ... |
yudao-module-mall/yudao-module-product-biz/src/main/java/cn/iocoder/yudao/module/product/controller/app/spu/AppProductSpuController.java
| ... | ... | @@ -101,7 +101,7 @@ public class AppProductSpuController { |
| 101 | 101 | throw exception(SPU_NOT_EXISTS); |
| 102 | 102 | } |
| 103 | 103 | if (!ProductSpuStatusEnum.isEnable(spu.getStatus())) { |
| 104 | - throw exception(SPU_NOT_ENABLE); | |
| 104 | + throw exception(SPU_NOT_ENABLE, spu.getName()); | |
| 105 | 105 | } |
| 106 | 106 | // 获得商品 SKU |
| 107 | 107 | List<ProductSkuDO> skus = productSkuService.getSkuListBySpuId(spu.getId()); | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/controller/app/cart/vo/AppCartAddReqVO.java
| 1 | 1 | package cn.iocoder.yudao.module.trade.controller.app.cart.vo; |
| 2 | 2 | |
| 3 | 3 | import io.swagger.v3.oas.annotations.media.Schema; |
| 4 | -import lombok.Data; | |
| 5 | - | |
| 4 | +import jakarta.validation.constraints.Min; | |
| 6 | 5 | import jakarta.validation.constraints.NotNull; |
| 6 | +import lombok.Data; | |
| 7 | 7 | |
| 8 | 8 | @Schema(description = "用户 App - 购物车添加购物项 Request VO") |
| 9 | 9 | @Data |
| ... | ... | @@ -15,6 +15,7 @@ public class AppCartAddReqVO { |
| 15 | 15 | |
| 16 | 16 | @Schema(description = "新增商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") |
| 17 | 17 | @NotNull(message = "数量不能为空") |
| 18 | + @Min(value = 1, message = "商品数量必须大于等于 1") | |
| 18 | 19 | private Integer count; |
| 19 | 20 | |
| 20 | 21 | } | ... | ... |
yudao-module-mall/yudao-module-trade-biz/src/main/java/cn/iocoder/yudao/module/trade/service/order/handler/TradeBrokerageOrderHandler.java
| ... | ... | @@ -83,7 +83,7 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler { |
| 83 | 83 | if (order.getBrokerageUserId() == null) { |
| 84 | 84 | return; |
| 85 | 85 | } |
| 86 | - cancelBrokerage(order.getBrokerageUserId(), orderItem.getOrderId()); | |
| 86 | + cancelBrokerage(order.getBrokerageUserId(), orderItem.getId()); | |
| 87 | 87 | } |
| 88 | 88 | |
| 89 | 89 | /** | ... | ... |