商品列表 结构
耗材库存 列表接口 耗材 库存预警值推送更新 cons.info.change.queue
This commit is contained in:
@@ -9,6 +9,7 @@ import com.czg.product.param.ConsSubUnitParam;
|
||||
import com.czg.product.service.ConsInfoService;
|
||||
import com.czg.product.service.ShopSyncService;
|
||||
import com.czg.product.vo.ConsStatisticsVo;
|
||||
import com.czg.product.vo.ConsStockRecord;
|
||||
import com.czg.resp.CzgResult;
|
||||
import com.czg.sa.StpKit;
|
||||
import com.czg.utils.AssertUtil;
|
||||
@@ -44,18 +45,25 @@ public class ConsInfoController {
|
||||
* 分页
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@OperationLog("耗材信息-分页")
|
||||
//@SaAdminCheckPermission("consInfo:page")
|
||||
public CzgResult<Page<ConsInfoDTO>> getConsInfoPage(ConsInfoDTO param) {
|
||||
Page<ConsInfoDTO> data = consInfoService.getConsInfoPage(param);
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@GetMapping("consStock")
|
||||
public CzgResult<List<ConsStockRecord>> getConsStockList(Long shopId) {
|
||||
return CzgResult.success(consInfoService.getConsStockList(shopId));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 列表
|
||||
*/
|
||||
@GetMapping("list")
|
||||
@OperationLog("耗材信息-列表")
|
||||
//@SaAdminCheckPermission("consInfo:list")
|
||||
public CzgResult<List<ConsInfoDTO>> getConsInfoList(ConsInfoDTO param) {
|
||||
List<ConsInfoDTO> data = consInfoService.getConsInfoList(param);
|
||||
@@ -68,7 +76,6 @@ public class ConsInfoController {
|
||||
* @param id 耗材信息id
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@OperationLog("耗材信息-详情")
|
||||
//@SaAdminCheckPermission("consInfo:info")
|
||||
public CzgResult<ConsInfoDTO> getConsInfoById(@PathVariable("id") Long id) {
|
||||
AssertUtil.isNull(id, "{}不能为空", "id");
|
||||
@@ -164,21 +171,6 @@ public class ConsInfoController {
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 退款退回开关
|
||||
*
|
||||
* @param id 耗材信息id
|
||||
*/
|
||||
@PostMapping("onOffIsRefundStock")
|
||||
@OperationLog("耗材信息-退款退回开关")
|
||||
//@SaAdminCheckPermission("consInfo:on-off")
|
||||
public CzgResult<Void> onOffIsRefundStock(@RequestParam Long id, @RequestParam Integer isRefundStockConsInfo) {
|
||||
//效验数据
|
||||
AssertUtil.isNull(id, "{}不能为空", "id");
|
||||
AssertUtil.isNull(isRefundStockConsInfo, "退款退回开关值不能为空");
|
||||
consInfoService.isRefundStockConsInfo(id, isRefundStockConsInfo);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑副单位
|
||||
@@ -200,7 +192,6 @@ public class ConsInfoController {
|
||||
* 统计
|
||||
*/
|
||||
@GetMapping("statistics")
|
||||
@OperationLog("耗材信息-统计")
|
||||
//@SaAdminCheckPermission("consInfo:info")
|
||||
public CzgResult<ConsStatisticsVo> getConsInfoById(ConsInfoParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
|
||||
@@ -30,6 +30,7 @@ import jakarta.servlet.http.HttpServletResponse;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
@@ -83,7 +84,7 @@ public class ProductController {
|
||||
*/
|
||||
@GetMapping("list")
|
||||
@OperationLog("商品-列表")
|
||||
public CzgResult<Map<String, Object>> getProductList(@RequestParam(required = false) Long categoryId) {
|
||||
public CzgResult<List<ProductDTO>> getProductList(@RequestParam(required = false) Long categoryId) {
|
||||
return CzgResult.success(productService.getProductCacheList(StpKit.USER.getShopId(), categoryId));
|
||||
}
|
||||
|
||||
@@ -231,7 +232,6 @@ public class ProductController {
|
||||
@PostMapping("reportDamage")
|
||||
@OperationLog("商品-报损")
|
||||
public CzgResult<Void> reportDamage(@RequestBody ProductReportDamageParam param) {
|
||||
//TODO 报损功能
|
||||
ValidatorUtil.validateEntity(param, DefaultGroup.class);
|
||||
productService.reportDamage(param);
|
||||
return CzgResult.success();
|
||||
|
||||
Reference in New Issue
Block a user