添加美好菜市

This commit is contained in:
邹宗楠
2023-04-13 10:32:39 +08:00
parent 9a193d6b92
commit 17c794ae51
3 changed files with 5 additions and 4 deletions

View File

@@ -68,6 +68,8 @@ type GoodsOrderExt struct {
OperatorPhone3 string `orm:"size(16)" json:"operatorPhone3"` // 饿百运营人电话
OperatorName3 string `orm:"size(32)" json:"operatorName3"` // 饿百运营人组(角色)
VendorPayType string `json:"vendorPayType"` // 支付方式,当订单来源小程序时通过支付方式区分订单来源(w06微信/tt抖音/ks快手/支付宝)
}
type OrderSkuExt struct {

View File

@@ -842,7 +842,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
t5.pay_percentage, t5.comment ,t5.old_pay_percentage, t5.market_man_phone, tu.name market_man_name,
t5.operator_phone, t5.operator_phone2, t5.operator_phone3, tu1.name operator_name, tu2.name operator_name2, tu3.name operator_name3,
t6.vendor_pay_percentage,
city.name city_name, district.name district_name,
city.name city_name, district.name district_name,op.vendor_pay_type,
ROUND(IF(t1.earning_type = 1, t1.total_shop_money-t1.earning_price-IFNULL(t2.desired_fee,0), t1.total_shop_money *(t1.order_pay_percentage/2)/100)) jx_income`, model.DefaultEarningPricePercentage)
if isIncludeSku {
sql += `,
@@ -865,6 +865,7 @@ func GetOrders(db *DaoDB, ids []int64, isIncludeSku, isIncludeFake bool, fromDat
LEFT JOIN user tu1 ON tu1.mobile = t5.operator_phone
LEFT JOIN user tu2 ON tu2.mobile = t5.operator_phone2
LEFT JOIN user tu3 ON tu3.mobile = t5.operator_phone3
LEFT JOIN order_pay op ON op.vendor_order_id = t1.vendor_order_id
-- LEFT JOIN (SELECT MAX(created_at), afs_order_id, vendor_order_id, vendor_id FROM afs_order WHERE status = 180 GROUP BY 2, 3, 4) t7 ON t7.vendor_order_id = t1.vendor_order_id AND t7.vendor_id = t1.vendor_id
-- LEFT JOIN afs_order t8 ON t8.afs_order_id = t7.afs_order_id
`

View File

@@ -3,7 +3,6 @@ package localjx
import (
"errors"
"fmt"
"git.rosy.net.cn/jx-callback/globals"
"math"
"regexp"
"strings"
@@ -314,7 +313,6 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
db = dao.GetDB()
)
order, err := partner.CurOrderManager.LoadOrder(utils.Int64ToStr(orderID), model.VendorIDJX)
globals.SugarLogger.Debugf("goodsorder := %s", utils.Format4Output(order, false))
if err == nil {
switch payType {
case model.PayTypeWX:
@@ -843,7 +841,7 @@ func generateOrder(ctx *jxcontext.Context, jxOrder *JxOrderInfo, addressID int64
if jxOrder.OrderType != model.OrderTypeMatter || (jxOrder.OrderType == model.OrderTypeMatter && fromStoreID == -1) {
outJxOrder.Skus = append(outJxOrder.Skus, jxSku)
outJxOrder.OrderPrice += int64(jxSku.Count) * jxSku.SalePrice
} else { //以下else为物料订单袋子金额和数量处理
} else { //以下else为物料订单袋子金额和数量处理
if !result.Flag { //只要flag是false就按原价申请是true再按订单量
outJxOrder.Skus = append(outJxOrder.Skus, jxSku)
outJxOrder.OrderPrice += int64(jxSku.Count) * jxSku.SalePrice