From 290dc66f8fefba17c7193394a6dc6eae3b0bd01a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=8B=8F=E5=B0=B9=E5=B2=9A?= <770236076@qq.com> Date: Tue, 29 Dec 2020 17:51:37 +0800 Subject: [PATCH] aa --- business/model/api.go | 9 +++++---- business/model/dao/dao_order.go | 3 ++- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/business/model/api.go b/business/model/api.go index da13576cb..3c2c812d9 100644 --- a/business/model/api.go +++ b/business/model/api.go @@ -35,10 +35,11 @@ type GoodsOrderExt struct { WaybillCreatedAt time.Time `orm:"type(datetime);index" json:"waybillCreatedAt"` WaybillFinishedAt time.Time `orm:"type(datetime)" json:"waybillFinishedAt"` - DistrictName string `json:"districtName"` - CityName string `json:"cityName"` - PayPercentage int `json:"payPercentage"` - OldPayPercentage int `json:"oldPayPercentage"` + DistrictName string `json:"districtName"` + CityName string `json:"cityName"` + PayPercentage int `json:"payPercentage"` + VendorPayPercentage int `json:"vendorPayPercentage"` + OldPayPercentage int `json:"oldPayPercentage"` SkuInfo string `json:"skuInfo,omitempty"` SkuInfo2 string `json:"skuInfo2,omitempty"` diff --git a/business/model/dao/dao_order.go b/business/model/dao/dao_order.go index 81e83b85b..06af71ec1 100644 --- a/business/model/dao/dao_order.go +++ b/business/model/dao/dao_order.go @@ -776,7 +776,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat CAST(IF(t1.earning_price <> 0, t1.earning_price, IF(t1.shop_price <> 0 && t1.shop_price < t1.sale_price, t1.shop_price, t1.sale_price) * IF(t5.pay_percentage > 0, t5.pay_percentage, %d) / 100) AS SIGNED) earning_price, t2.status waybill_status, t2.courier_name, t2.courier_mobile, t2.actual_fee, t2.desired_fee, t2.waybill_created_at, t2.waybill_finished_at, - t5.pay_percentage, t5.old_pay_percentage, + t5.pay_percentage, t5.old_pay_percentage, t6.vendor_pay_percentage, city.name city_name, district.name district_name`, model.DefaultEarningPricePercentage) if isIncludeSku { sql += `, @@ -791,6 +791,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat FROM goods_order t1 LEFT JOIN waybill t2 ON t1.vendor_waybill_id = t2.vendor_waybill_id AND t1.waybill_vendor_id = t2.waybill_vendor_id AND t1.vendor_order_id = t2.vendor_order_id LEFT JOIN store t5 ON t5.id = IF(t1.jx_store_id <> 0, t1.jx_store_id, t1.store_id) + LEFT JOIN store_map t6 ON t6.store_id = t5.id AND t6.deleted_at = '1970-01-01 00:00:00' AND t6.vendor_id = t1.vendor_id LEFT JOIN place city ON city.code = t5.city_code LEFT JOIN place district ON district.code = t5.district_code` if isIncludeSku {