Merge branch 'refs/heads/share-stock' into dev
This commit is contained in:
@@ -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;
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package cn.ysk.cashier.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author GYJ
|
||||
*/
|
||||
@Data
|
||||
public class StockV2Vo {
|
||||
private String id;
|
||||
private Integer skuId;
|
||||
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.skuId = 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, boolean isPro) {
|
||||
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;
|
||||
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 + "\"," +
|
||||
"}";
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user