共享库存修改

This commit is contained in:
GYJ
2024-06-24 11:42:41 +08:00
parent 1675e5d45b
commit b9b35849c3
15 changed files with 520 additions and 73 deletions

View File

@@ -0,0 +1,14 @@
package cn.ysk.cashier.vo;
import lombok.Data;
/**
* @author GYJ
*/
@Data
public class StockUpdateValueVO {
private String updateValue;
private String updateKey;
private String targetId;
private String shopId;
}

View File

@@ -0,0 +1,83 @@
package cn.ysk.cashier.vo;
import lombok.Data;
import java.util.List;
/**
* @author GYJ
*/
@Data
public class StockV2Vo {
private Integer id;
private Integer proId;
private String img;
private String name;
private String unitName;
private String type;
private String specSnap;
private Object isStock;
private Object stockNumber;
private Integer isDistribute;
private Integer isPauseSale;
private Object number;
public StockV2Vo(Integer proId, Integer skuId, String name, String unitName,String specSnap, Object number,Object stockNumber, Integer isDistribute) {
this.proId = proId;
this.id = skuId;
this.name = name;
this.unitName = unitName;
this.specSnap = specSnap;
this.number = number;
this.stockNumber = stockNumber;
this.isDistribute = isDistribute;
}
public StockV2Vo(Integer id, Integer proId,String img,String name,String unitName, String type, String specSnap,
Object isStock, Object number, Integer isDistribute, Integer isPauseSale) {
this.id = id;
this.proId = proId;
this.img = img;
this.name = name;
this.unitName = unitName;
setType(type);
this.specSnap = specSnap;
this.isStock = isStock;
this.stockNumber = number;
this.isDistribute = isDistribute;
this.isPauseSale = isPauseSale;
}
public void setType(String type) {
switch (type) {
case "normal":
this.type = "单规格";
break;
case "sku":
this.type = "多规格";
break;
case "weight":
this.type = "称重商品";
break;
case "currentPrice":
this.type = "套餐商品/团购卷";
break;
case "group":
this.type = "时价商品";
break;
default:
this.type = type;
break;
}
}
@Override
public String toString() {
return "{" +
"\"name\":\"" + name + "\","+
"\"unitName\":\"" + unitName +"\","+
"\"specSnap\":\"" + specSnap + "\"," +
"\"stockNumber\":\"" + stockNumber + "\"," +
"}";
}
}