updateOrderOtherInfo中不特殊处理VendorIDJX
This commit is contained in:
@@ -101,6 +101,10 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
|
||||
if err = GetRow(db, storeDetail, sql, sqlParams...); err == nil {
|
||||
storeDetail.PricePercentagePackObj = PricePercentagePack2Obj(storeDetail.PricePercentagePackStr)
|
||||
storeDetail.FreightDeductionPackObj = FreightDeductionPack2Obj(storeDetail.FreightDeductionPackStr)
|
||||
if vendorID == model.VendorIDJX {
|
||||
storeDetail.VendorStatus = storeDetail.Status
|
||||
storeDetail.PricePercentage = 100
|
||||
}
|
||||
return storeDetail, nil
|
||||
}
|
||||
return nil, err
|
||||
@@ -114,16 +118,8 @@ func GetStoreDetailByVendorStoreID(db *DaoDB, vendorStoreID string, vendorID int
|
||||
if vendorID != model.VendorIDJX {
|
||||
return getStoreDetail(db, 0, vendorID, vendorStoreID)
|
||||
}
|
||||
store := &model.Store{}
|
||||
store.ID = int(utils.Str2Int64WithDefault(vendorStoreID, 0))
|
||||
if err = GetEntity(db, store); err == nil {
|
||||
// todo 还要补全其它参数
|
||||
storeDetail = &StoreDetail{
|
||||
Store: *store,
|
||||
VendorStoreID: vendorStoreID,
|
||||
VendorStatus: store.Status,
|
||||
PricePercentage: 100,
|
||||
}
|
||||
if storeDetail, err = getStoreDetail(db, int(utils.Str2Int64WithDefault(vendorStoreID, 0)), vendorID, ""); err == nil {
|
||||
storeDetail.VendorStoreID = vendorStoreID
|
||||
}
|
||||
return storeDetail, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user