+ StoreMap.PricePercentagePack
This commit is contained in:
@@ -55,7 +55,10 @@ type tStoreSkuFullInfo struct {
|
||||
EbaiCat2ID int64 `orm:"column(ebai_cat2_id)"`
|
||||
EbaiCat3ID int64 `orm:"column(ebai_cat3_id)"`
|
||||
|
||||
PricePercentage int
|
||||
PricePercentage int
|
||||
PricePercentagePack string `orm:"size(4096)" json:"pricePercentagePack"` //
|
||||
PricePercentagePackObj model.PricePercentagePack `orm:"-" json:"-"`
|
||||
|
||||
CatPricePercentage int
|
||||
}
|
||||
|
||||
@@ -82,7 +85,8 @@ var (
|
||||
|
||||
func (p *PurchaseHandler) getDirtyStoreSkus(db *dao.DaoDB, storeID int, skuIDs []int) (storeSkuInfoList []*tStoreSkuFullInfo, err error) {
|
||||
sql := `
|
||||
SELECT t8.price_percentage, t1.*, t2.spec_quality, t2.spec_unit, t2.weight, t2.status sku_status,
|
||||
SELECT t8.price_percentage, t8.price_percentage_pack,
|
||||
t1.*, t2.spec_quality, t2.spec_unit, t2.weight, t2.status sku_status,
|
||||
t3.id name_id, t3.prefix, t3.name, t2.comment, t3.is_global, t3.unit, IF(t3.img_ebai <> '', t3.img_ebai, t3.img) img, t3.upc, t3.desc_img_ebai,
|
||||
t4.name cat_name, t4.ebai_price_percentage cat_price_percentage,
|
||||
t4.id cat_id, t4.level cat_level, t5.ebai_id cat_ebai_id,
|
||||
@@ -119,6 +123,13 @@ func (p *PurchaseHandler) getDirtyStoreSkus(db *dao.DaoDB, storeID int, skuIDs [
|
||||
}
|
||||
sql += " ORDER BY t1.price DESC"
|
||||
err = dao.GetRows(db, &storeSkuInfoList, sql, sqlParams...)
|
||||
if err == nil {
|
||||
for _, v := range storeSkuInfoList {
|
||||
if v.PricePercentagePack != "" {
|
||||
utils.UnmarshalUseNumber([]byte(v.PricePercentagePack), &v.PricePercentagePackObj)
|
||||
}
|
||||
}
|
||||
}
|
||||
return storeSkuInfoList, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user