商品模块代码提交

This commit is contained in:
Tankaikai
2025-02-24 17:32:25 +08:00
parent 6b785709f1
commit 9e6e300972
11 changed files with 203 additions and 46 deletions

View File

@@ -55,7 +55,7 @@ public class ConsInfoController {
/**
* 详情
* param id 耗材信息id
* @param id 耗材信息id
*/
@GetMapping("{id}")
@OperationLog("耗材信息-详情")

View File

@@ -1,5 +1,6 @@
package com.czg.controller.admin;
import com.czg.exception.CzgException;
import com.czg.log.annotation.OperationLog;
import com.czg.product.dto.ProdConsBindDTO;
import com.czg.product.dto.ProdSkuDTO;
@@ -135,4 +136,19 @@ public class ProductController {
return CzgResult.success();
}
/**
* 商品-库存预警设置
*/
@PostMapping("stock-warning")
@OperationLog("商品-库存预警设置")
//@SaAdminCheckPermission("product:stockWarning")
public CzgResult<Void> stockWarning(@RequestParam Integer warnLine) {
AssertUtil.isNull(warnLine, "{}不能为空", "warnLine");
if (warnLine < 0) {
throw new CzgException("预警值不能小于0");
}
productService.stockWarning(warnLine);
return CzgResult.success();
}
}