1.库存查询接口,sku上下架字段返回
This commit is contained in:
parent
f6c8a0c067
commit
89733cdd95
|
|
@ -106,7 +106,8 @@ public interface TbProductSkuRepository extends JpaRepository<TbProductSku, Inte
|
|||
|
||||
|
||||
@Query("SELECT new cn.ysk.cashier.vo.StockV2Vo(" +
|
||||
"sku.id,pro.id,pro.coverImg,pro.name,unit.name,pro.typeEnum,sku.specSnap,pro.isStock,sku.stockNumber, 1, sku.isPauseSale, false, 0, sku.salePrice" +
|
||||
"sku.id,pro.id,pro.coverImg,pro.name," +
|
||||
"unit.name,pro.typeEnum,sku.specSnap,pro.isStock,sku.stockNumber, 1, sku.isPauseSale, false, 0, sku.salePrice, CASE WHEN sku.isGrounding=1 THEN true ELSE false END" +
|
||||
") " +
|
||||
"from " +
|
||||
"TbProductSku sku " +
|
||||
|
|
|
|||
|
|
@ -104,15 +104,17 @@ public class StockV2Vo {
|
|||
this.salePrice = sellPrice;
|
||||
}
|
||||
|
||||
|
||||
|
||||
public StockV2Vo(Integer id, Integer proId,String img,String name,String unitName, String type, String specSnap,
|
||||
Object isStock, Object number, Integer isDistribute, Integer isPauseSale, boolean isPro, Integer warnLine, BigDecimal sellPrice, boolean isGrounding) {
|
||||
this.skuId = id;
|
||||
this.id = id.toString() + "-" + proId.toString();
|
||||
if (isPro) {
|
||||
this.id += proId;
|
||||
} else {
|
||||
this.id += id;
|
||||
}
|
||||
this.skuId = id;
|
||||
this.proId = proId;
|
||||
this.img = img;
|
||||
this.name = name;
|
||||
|
|
|
|||
Loading…
Reference in New Issue