美团饿百打包费改为统一系统参数
This commit is contained in:
@@ -49,3 +49,13 @@ func ValidateRoles(db *DaoDB, roles ...string) (err error) {
|
||||
}
|
||||
return errList.GetErrListAsOne()
|
||||
}
|
||||
|
||||
func GetSysConfigAsInt64(db *DaoDB, key string) (value int64, err error) {
|
||||
configList, err := QueryConfigs(db, key, model.ConfigTypeSys, "")
|
||||
if err == nil && len(configList) > 0 {
|
||||
value = utils.Str2Int64WithDefault(configList[0].Value, 0)
|
||||
} else if IsNoRowsError(err) {
|
||||
err = nil
|
||||
}
|
||||
return value, err
|
||||
}
|
||||
|
||||
@@ -26,7 +26,6 @@ type StoreDetail struct {
|
||||
|
||||
FreightDeductionPackStr string `orm:"size(4096)" json:"-"` //
|
||||
FreightDeductionPackObj *model.FreightDeductionPack `orm:"-" json:"-"`
|
||||
BoxFee int `orm:"default(1)" json:"boxFee"` // 打包费
|
||||
|
||||
AutoPickup int8 `orm:"default(1)" json:"autoPickup"` // 是否自动拣货
|
||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||
@@ -85,7 +84,7 @@ func getStoreDetail(db *DaoDB, storeID, vendorID int, vendorStoreID string) (sto
|
||||
sql := `
|
||||
SELECT t1.*,
|
||||
t2.vendor_store_id, t2.status vendor_status, t2.delivery_fee, t2.sync_status, t2.vendor_org_code,
|
||||
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, t2.vendor_store_name, t2.box_fee,
|
||||
t2.price_percentage, t2.auto_pickup, t2.delivery_type, t2.delivery_competition, t2.is_sync, t2.vendor_store_name,
|
||||
t3.value price_percentage_pack_str,
|
||||
t4.value freight_deduction_pack_str,
|
||||
district.name district_name,
|
||||
|
||||
@@ -45,6 +45,8 @@ type StoreSkuSyncInfo struct {
|
||||
StoreID int `orm:"column(store_id)"`
|
||||
SkuID int `orm:"column(sku_id)"` // 这个与Sku.ID的区别是SkuID是必然存在的
|
||||
|
||||
BoxFee int64
|
||||
|
||||
Price int64
|
||||
UnitPrice int64
|
||||
|
||||
|
||||
@@ -10,6 +10,9 @@ const (
|
||||
|
||||
const (
|
||||
ConfigSysFakeOrderMobiles = "FakeOrderMobiles" // 假订单手机
|
||||
ConfigSysEbaiBoxFee = "EbaiBoxFee" // 饿百打包费
|
||||
ConfigSysMtwmBoxFee = "MtwmBoxFee" // 美团外卖打包费
|
||||
ConfigSysMtwmSkuBoxFee = "MtwmSkuBoxFee" // 美团外卖单商品打包费
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
@@ -398,8 +398,6 @@ type StoreMap struct {
|
||||
|
||||
FreightDeductionPack string `orm:"size(32)" json:"freightDeductionPack"` //
|
||||
|
||||
BoxFee int `orm:"default(0)" json:"boxFee"` // 打包费
|
||||
|
||||
AutoPickup int8 `orm:"default(1)" json:"autoPickup"` // 是否自动拣货
|
||||
DeliveryType int8 `orm:"default(0)" json:"deliveryType"` // 配送类型
|
||||
DeliveryFee int `json:"deliveryFee"`
|
||||
|
||||
Reference in New Issue
Block a user