商品库存流水
This commit is contained in:
@@ -9,10 +9,8 @@ import com.czg.log.annotation.OperationLog;
|
||||
import com.czg.product.dto.ProdConsBindDTO;
|
||||
import com.czg.product.dto.ProdSkuDTO;
|
||||
import com.czg.product.dto.ProductDTO;
|
||||
import com.czg.product.param.ProdRefundToStockParam;
|
||||
import com.czg.product.param.ProductIsSaleParam;
|
||||
import com.czg.product.param.ProductIsSoldOutParam;
|
||||
import com.czg.product.param.ProductReportDamageParam;
|
||||
import com.czg.product.entity.ProductStockFlow;
|
||||
import com.czg.product.param.*;
|
||||
import com.czg.product.service.ProdConsRelationService;
|
||||
import com.czg.product.service.ProductService;
|
||||
import com.czg.resp.CzgResult;
|
||||
@@ -31,7 +29,7 @@ import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
* 商品
|
||||
* 商品管理 - 商品列表
|
||||
*
|
||||
* @author Tankaikai tankaikai@aliyun.com
|
||||
* @since 1.0 2025-02-16
|
||||
@@ -44,6 +42,9 @@ public class ProductController {
|
||||
private final ProdConsRelationService prodConsRelationService;
|
||||
private final RabbitPublisher rabbitPublisher;
|
||||
|
||||
/**
|
||||
* 商品-分页
|
||||
*/
|
||||
@GetMapping("page")
|
||||
@OperationLog("商品-分页")
|
||||
//@SaAdminCheckPermission("product:page")
|
||||
@@ -52,6 +53,9 @@ public class ProductController {
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-列表
|
||||
*/
|
||||
@GetMapping("list")
|
||||
@OperationLog("商品-列表")
|
||||
//@SaAdminCheckPermission("product:list")
|
||||
@@ -60,6 +64,9 @@ public class ProductController {
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-详情
|
||||
*/
|
||||
@GetMapping("{id}")
|
||||
@OperationLog("商品-详情")
|
||||
//@SaAdminCheckPermission("product:info")
|
||||
@@ -69,6 +76,9 @@ public class ProductController {
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-新增
|
||||
*/
|
||||
@PostMapping
|
||||
@OperationLog("商品-新增")
|
||||
//@SaAdminCheckPermission("product:add")
|
||||
@@ -86,6 +96,9 @@ public class ProductController {
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-修改
|
||||
*/
|
||||
@PutMapping
|
||||
@OperationLog("商品-修改")
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
@@ -111,6 +124,10 @@ public class ProductController {
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-删除
|
||||
* @param id 商品ID
|
||||
*/
|
||||
@DeleteMapping("{id}")
|
||||
@OperationLog("商品-删除")
|
||||
@SaStaffCheckPermission("yun_xu_xiu_gai_shang_pin")
|
||||
@@ -209,4 +226,28 @@ public class ProductController {
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-统计
|
||||
*/
|
||||
@GetMapping("statistics")
|
||||
@OperationLog("商品-统计")
|
||||
//@SaAdminCheckPermission("product:statistics")
|
||||
public CzgResult<Void> statistics(@RequestBody ProductInfoParam param) {
|
||||
Long shopId = StpKit.USER.getShopId(0L);
|
||||
param.setShopId(shopId);
|
||||
productService.getProductStatistics(param);
|
||||
return CzgResult.success();
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品-库存变动记录
|
||||
*/
|
||||
@GetMapping("stockFlow")
|
||||
@OperationLog("商品-库存变动记录")
|
||||
//@SaAdminCheckPermission("consStockFlow:flow")
|
||||
public CzgResult<Page<ProductStockFlow>> stockFlow(ProductStockFlowParam param) {
|
||||
Page<ProductStockFlow> data = productService.findProductStockFlowPage(param);
|
||||
return CzgResult.success(data);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user