1
This commit is contained in:
@@ -1089,20 +1089,8 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
|
||||
// 判断是否改价
|
||||
nowPrice, _ := payload["price"].(json.Number).Int64()
|
||||
if skuName.Price != int(nowPrice) && nowPrice != 0 {
|
||||
i := payload["skus"].([]struct {
|
||||
Id int `json:"id"`
|
||||
SpecQuality int `json:"specQuality"`
|
||||
SpecUnit string `json:"specUnit"`
|
||||
Weight int `json:"weight"`
|
||||
Status string `json:"status"`
|
||||
Comment string `json:"comment"`
|
||||
MinOrderCount int `json:"minOrderCount"`
|
||||
LadderBoxNum int `json:"ladderBoxNum"`
|
||||
LadderBoxPrice int `json:"ladderBoxPrice"`
|
||||
EclpID string `json:"eclpID"`
|
||||
CategoryID []interface{} `json:"categoryID"`
|
||||
ExdSkuID string `json:"exdSkuID"`
|
||||
})
|
||||
|
||||
i := payload["skus"].([]aa)
|
||||
for _, v := range i {
|
||||
var skuPrice int64 = 0
|
||||
if payload["unit"] == "份" { // 商品规格等于份的时候,标准重量保持为500g
|
||||
@@ -1145,6 +1133,21 @@ func UpdateSkuName(ctx *jxcontext.Context, nameID int, payload map[string]interf
|
||||
return num, err
|
||||
}
|
||||
|
||||
type aa struct {
|
||||
Id int `json:"id"`
|
||||
SpecQuality int `json:"specQuality"`
|
||||
SpecUnit string `json:"specUnit"`
|
||||
Weight int `json:"weight"`
|
||||
Status string `json:"status"`
|
||||
Comment string `json:"comment"`
|
||||
MinOrderCount int `json:"minOrderCount"`
|
||||
LadderBoxNum int `json:"ladderBoxNum"`
|
||||
LadderBoxPrice int `json:"ladderBoxPrice"`
|
||||
EclpID string `json:"eclpID"`
|
||||
CategoryID []interface{} `json:"categoryID"`
|
||||
ExdSkuID string `json:"exdSkuID"`
|
||||
}
|
||||
|
||||
func updateOrCreateSkuVendorCategoryMap(db *dao.DaoDB, ctx *jxcontext.Context, nameID int, payload map[string]interface{}, skuNameExt *model.SkuNameExt, isDelete bool) (flag bool) {
|
||||
if isDelete {
|
||||
skuVendorCatMaps, _ := dao.GetSkuVendorCategoryMaps(db, []int{nameID}, nil, nil)
|
||||
|
||||
Reference in New Issue
Block a user