shiyunteng
2026-08-24 9c49ede494a10d7e7a322eb2e793afa412ea07e1
platformx-business-finance-biz/src/main/java/com/by4cloud/platformx/business/controller/ProductController.java
@@ -146,7 +146,7 @@
    @PostMapping
    @PreAuthorize("@pms.hasPermission('business_product_add')" )
    public R save(@RequestBody Product product) {
      if (ArrayUtil.isNotEmpty(productService.listByScope(Wrappers.lambdaQuery(product).eq(Product::getErpCode,product.getErpCode())).toArray())){
      if (CollUtil.isNotEmpty(productService.listByScope(Wrappers.lambdaQuery(product).eq(Product::getErpCode,product.getErpCode())))){
         return R.failed("产品Erp编码已存在");
      }
        return R.ok(productService.save(product));