mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-26 01:01:52 +08:00
bugfix:同步 master 修改的 bug
This commit is contained in:
parent
907f3a58ba
commit
a80ba48889
@ -20,7 +20,6 @@ import com.mzt.logapi.context.LogRecordContext;
|
|||||||
import com.mzt.logapi.service.impl.DiffParseFunction;
|
import com.mzt.logapi.service.impl.DiffParseFunction;
|
||||||
import com.mzt.logapi.starter.annotation.LogRecord;
|
import com.mzt.logapi.starter.annotation.LogRecord;
|
||||||
import jakarta.annotation.Resource;
|
import jakarta.annotation.Resource;
|
||||||
import org.springframework.context.annotation.Lazy;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
@ -46,9 +45,6 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService {
|
|||||||
@Resource
|
@Resource
|
||||||
private CrmReceivablePlanMapper receivablePlanMapper;
|
private CrmReceivablePlanMapper receivablePlanMapper;
|
||||||
|
|
||||||
@Resource
|
|
||||||
@Lazy // 延迟加载,避免循环依赖
|
|
||||||
private CrmReceivableService receivableService;
|
|
||||||
@Resource
|
@Resource
|
||||||
private CrmContractService contractService;
|
private CrmContractService contractService;
|
||||||
@Resource
|
@Resource
|
||||||
@ -144,7 +140,7 @@ public class CrmReceivablePlanServiceImpl implements CrmReceivablePlanService {
|
|||||||
// 2. 删除
|
// 2. 删除
|
||||||
receivablePlanMapper.deleteById(id);
|
receivablePlanMapper.deleteById(id);
|
||||||
// 3. 删除数据权限
|
// 3. 删除数据权限
|
||||||
permissionService.deletePermission(CrmBizTypeEnum.CRM_CUSTOMER.getType(), id);
|
permissionService.deletePermission(CrmBizTypeEnum.CRM_RECEIVABLE_PLAN.getType(), id);
|
||||||
|
|
||||||
// 4. 记录操作日志上下文
|
// 4. 记录操作日志上下文
|
||||||
LogRecordContext.putVariable("receivablePlan", receivablePlan);
|
LogRecordContext.putVariable("receivablePlan", receivablePlan);
|
||||||
|
@ -61,14 +61,14 @@ public class ErpPurchaseOrderController {
|
|||||||
|
|
||||||
@PostMapping("/create")
|
@PostMapping("/create")
|
||||||
@Operation(summary = "创建采购订单")
|
@Operation(summary = "创建采购订单")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:create')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:create')")
|
||||||
public CommonResult<Long> createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) {
|
public CommonResult<Long> createPurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO createReqVO) {
|
||||||
return success(purchaseOrderService.createPurchaseOrder(createReqVO));
|
return success(purchaseOrderService.createPurchaseOrder(createReqVO));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/update")
|
@PutMapping("/update")
|
||||||
@Operation(summary = "更新采购订单")
|
@Operation(summary = "更新采购订单")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:update')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:update')")
|
||||||
public CommonResult<Boolean> updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) {
|
public CommonResult<Boolean> updatePurchaseOrder(@Valid @RequestBody ErpPurchaseOrderSaveReqVO updateReqVO) {
|
||||||
purchaseOrderService.updatePurchaseOrder(updateReqVO);
|
purchaseOrderService.updatePurchaseOrder(updateReqVO);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -76,7 +76,7 @@ public class ErpPurchaseOrderController {
|
|||||||
|
|
||||||
@PutMapping("/update-status")
|
@PutMapping("/update-status")
|
||||||
@Operation(summary = "更新采购订单的状态")
|
@Operation(summary = "更新采购订单的状态")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:update-status')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:update-status')")
|
||||||
public CommonResult<Boolean> updatePurchaseOrderStatus(@RequestParam("id") Long id,
|
public CommonResult<Boolean> updatePurchaseOrderStatus(@RequestParam("id") Long id,
|
||||||
@RequestParam("status") Integer status) {
|
@RequestParam("status") Integer status) {
|
||||||
purchaseOrderService.updatePurchaseOrderStatus(id, status);
|
purchaseOrderService.updatePurchaseOrderStatus(id, status);
|
||||||
@ -86,7 +86,7 @@ public class ErpPurchaseOrderController {
|
|||||||
@DeleteMapping("/delete")
|
@DeleteMapping("/delete")
|
||||||
@Operation(summary = "删除采购订单")
|
@Operation(summary = "删除采购订单")
|
||||||
@Parameter(name = "ids", description = "编号数组", required = true)
|
@Parameter(name = "ids", description = "编号数组", required = true)
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:delete')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:delete')")
|
||||||
public CommonResult<Boolean> deletePurchaseOrder(@RequestParam("ids") List<Long> ids) {
|
public CommonResult<Boolean> deletePurchaseOrder(@RequestParam("ids") List<Long> ids) {
|
||||||
purchaseOrderService.deletePurchaseOrder(ids);
|
purchaseOrderService.deletePurchaseOrder(ids);
|
||||||
return success(true);
|
return success(true);
|
||||||
@ -95,7 +95,7 @@ public class ErpPurchaseOrderController {
|
|||||||
@GetMapping("/get")
|
@GetMapping("/get")
|
||||||
@Operation(summary = "获得采购订单")
|
@Operation(summary = "获得采购订单")
|
||||||
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:query')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:query')")
|
||||||
public CommonResult<ErpPurchaseOrderRespVO> getPurchaseOrder(@RequestParam("id") Long id) {
|
public CommonResult<ErpPurchaseOrderRespVO> getPurchaseOrder(@RequestParam("id") Long id) {
|
||||||
ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id);
|
ErpPurchaseOrderDO purchaseOrder = purchaseOrderService.getPurchaseOrder(id);
|
||||||
if (purchaseOrder == null) {
|
if (purchaseOrder == null) {
|
||||||
@ -115,7 +115,7 @@ public class ErpPurchaseOrderController {
|
|||||||
|
|
||||||
@GetMapping("/page")
|
@GetMapping("/page")
|
||||||
@Operation(summary = "获得采购订单分页")
|
@Operation(summary = "获得采购订单分页")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:query')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:query')")
|
||||||
public CommonResult<PageResult<ErpPurchaseOrderRespVO>> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) {
|
public CommonResult<PageResult<ErpPurchaseOrderRespVO>> getPurchaseOrderPage(@Valid ErpPurchaseOrderPageReqVO pageReqVO) {
|
||||||
PageResult<ErpPurchaseOrderDO> pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO);
|
PageResult<ErpPurchaseOrderDO> pageResult = purchaseOrderService.getPurchaseOrderPage(pageReqVO);
|
||||||
return success(buildPurchaseOrderVOPageResult(pageResult));
|
return success(buildPurchaseOrderVOPageResult(pageResult));
|
||||||
@ -123,7 +123,7 @@ public class ErpPurchaseOrderController {
|
|||||||
|
|
||||||
@GetMapping("/export-excel")
|
@GetMapping("/export-excel")
|
||||||
@Operation(summary = "导出采购订单 Excel")
|
@Operation(summary = "导出采购订单 Excel")
|
||||||
@PreAuthorize("@ss.hasPermission('erp:purchase-create:export')")
|
@PreAuthorize("@ss.hasPermission('erp:purchase-order:export')")
|
||||||
@OperateLog(type = EXPORT)
|
@OperateLog(type = EXPORT)
|
||||||
public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO,
|
public void exportPurchaseOrderExcel(@Valid ErpPurchaseOrderPageReqVO pageReqVO,
|
||||||
HttpServletResponse response) throws IOException {
|
HttpServletResponse response) throws IOException {
|
||||||
|
@ -101,7 +101,7 @@ public class AppProductSpuController {
|
|||||||
throw exception(SPU_NOT_EXISTS);
|
throw exception(SPU_NOT_EXISTS);
|
||||||
}
|
}
|
||||||
if (!ProductSpuStatusEnum.isEnable(spu.getStatus())) {
|
if (!ProductSpuStatusEnum.isEnable(spu.getStatus())) {
|
||||||
throw exception(SPU_NOT_ENABLE);
|
throw exception(SPU_NOT_ENABLE, spu.getName());
|
||||||
}
|
}
|
||||||
// 获得商品 SKU
|
// 获得商品 SKU
|
||||||
List<ProductSkuDO> skus = productSkuService.getSkuListBySpuId(spu.getId());
|
List<ProductSkuDO> skus = productSkuService.getSkuListBySpuId(spu.getId());
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
package cn.iocoder.yudao.module.trade.controller.app.cart.vo;
|
package cn.iocoder.yudao.module.trade.controller.app.cart.vo;
|
||||||
|
|
||||||
import io.swagger.v3.oas.annotations.media.Schema;
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import jakarta.validation.constraints.Min;
|
||||||
|
|
||||||
import jakarta.validation.constraints.NotNull;
|
import jakarta.validation.constraints.NotNull;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
@Schema(description = "用户 App - 购物车添加购物项 Request VO")
|
@Schema(description = "用户 App - 购物车添加购物项 Request VO")
|
||||||
@Data
|
@Data
|
||||||
@ -15,6 +15,7 @@ public class AppCartAddReqVO {
|
|||||||
|
|
||||||
@Schema(description = "新增商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
@Schema(description = "新增商品数量", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
|
||||||
@NotNull(message = "数量不能为空")
|
@NotNull(message = "数量不能为空")
|
||||||
|
@Min(value = 1, message = "商品数量必须大于等于 1")
|
||||||
private Integer count;
|
private Integer count;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -83,7 +83,7 @@ public class TradeBrokerageOrderHandler implements TradeOrderHandler {
|
|||||||
if (order.getBrokerageUserId() == null) {
|
if (order.getBrokerageUserId() == null) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
cancelBrokerage(order.getBrokerageUserId(), orderItem.getOrderId());
|
cancelBrokerage(order.getBrokerageUserId(), orderItem.getId());
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user