1
This commit is contained in:
@@ -522,6 +522,13 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
|||||||
if bill.Status == model.WaybillStatusNew {
|
if bill.Status == model.WaybillStatusNew {
|
||||||
s.addWaybill2Map(savedOrderInfo, bill)
|
s.addWaybill2Map(savedOrderInfo, bill)
|
||||||
if !isPending {
|
if !isPending {
|
||||||
|
if order.Status >= model.OrderStatusDelivering && order.DeliveryType == model.OrderDeliveryTypeStoreSelf{
|
||||||
|
s.SelfDeliverDelivered(order, "订单在配送中来了新运单,如果是自送则转自送")
|
||||||
|
}
|
||||||
|
if order.Status >= model.OrderStatusDelivering && order.DeliveryType != model.OrderDeliveryTypeStoreSelf{
|
||||||
|
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||||
|
}
|
||||||
|
|
||||||
if order.Status > model.OrderStatusEndBegin {
|
if order.Status > model.OrderStatusEndBegin {
|
||||||
// 订单处于完成状态,来的新运单,取消三方配送,转自送!
|
// 订单处于完成状态,来的新运单,取消三方配送,转自送!
|
||||||
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
s.ProxyCancelWaybill(order, bill, partner.CancelWaybillReasonNotAcceptIntime, partner.CancelWaybillReasonStrNotAcceptIntime)
|
||||||
|
|||||||
@@ -365,11 +365,16 @@ func ReorderCategories(ctx *jxcontext.Context, parentID int, categoryIDs []int,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
dao.Commit(db, txDB)
|
dao.Commit(db, txDB)
|
||||||
SetStoreCategorySyncStatus2(db, nil, categoryIDs, model.SyncFlagModifiedMask)
|
if _, err = SetStoreCategorySyncStatus2(db, nil, categoryIDs, model.SyncFlagModifiedMask); err != nil {
|
||||||
if err == nil {
|
return err
|
||||||
_, err = CurVendorSync.SyncReorderCategories(ctx, db, parentID, false, userName)
|
|
||||||
CurVendorSync.SyncStoresCategory(ctx, db, nil, nil, false, true, true)
|
|
||||||
}
|
}
|
||||||
|
// 同步平台分类排序
|
||||||
|
if _, err := CurVendorSync.SyncReorderCategories(ctx, db, parentID, false, userName) ;err!= nil {
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
|
// 同步门店分类
|
||||||
|
CurVendorSync.SyncStoresCategory(ctx, db, nil, nil, false, true, true)
|
||||||
}
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -41,9 +41,19 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
|||||||
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
||||||
param.SubAppID = subAppID
|
param.SubAppID = subAppID
|
||||||
authInfo, err := ctx.GetV2AuthInfo()
|
authInfo, err := ctx.GetV2AuthInfo()
|
||||||
|
// 微信小程序支付
|
||||||
if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||||
param.Acct = authInfo.GetAuthID()
|
param.Acct = authInfo.GetAuthID()
|
||||||
}
|
}
|
||||||
|
// 抖音小程序,调起微信支付界面
|
||||||
|
//if err == nil && authInfo.GetAuthType() == douyin.AuthTypeTiktokMini {
|
||||||
|
// appID, jsCode := weixin.SplitJsCode(subAppID)
|
||||||
|
// appID = auth2.WeCartAppID
|
||||||
|
// sessionInfo, err := weixin.GetWxApp(appID).SNSCode2Session(jsCode)
|
||||||
|
// if err == nil {
|
||||||
|
// param.Acct = sessionInfo.OpenID
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
if vendorPayType == tonglianpayapi.PayTypeZfbJS || vendorPayType == tonglianpayapi.PayTypeZfbApp {
|
if vendorPayType == tonglianpayapi.PayTypeZfbJS || vendorPayType == tonglianpayapi.PayTypeZfbApp {
|
||||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
|
if authInfo, err := ctx.GetV2AuthInfo(); err == nil {
|
||||||
|
|||||||
@@ -40,11 +40,8 @@ func pay4OrderByWX(ctx *jxcontext.Context, order *model.GoodsOrder, vendorPayTyp
|
|||||||
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini {
|
if authInfo, err := ctx.GetV2AuthInfo(); err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini {
|
||||||
param.OpenID = authInfo.GetAuthID()
|
param.OpenID = authInfo.GetAuthID()
|
||||||
}
|
}
|
||||||
globals.SugarLogger.Debug("err1=====================", err)
|
|
||||||
|
|
||||||
result, err := api.WxpayAPI.CreateUnifiedOrder(param)
|
result, err := api.WxpayAPI.CreateUnifiedOrder(param)
|
||||||
globals.SugarLogger.Debug("err2=====================", err)
|
|
||||||
globals.SugarLogger.Debug("err3=====================", fmt.Sprintf("%+v", result))
|
|
||||||
if err == nil {
|
if err == nil {
|
||||||
orderPay = &model.OrderPay{
|
orderPay = &model.OrderPay{
|
||||||
PayOrderID: param.OutTradeNo,
|
PayOrderID: param.OutTradeNo,
|
||||||
|
|||||||
Reference in New Issue
Block a user