1
This commit is contained in:
@@ -522,6 +522,13 @@ func (s *DefScheduler) OnWaybillStatusChanged(bill *model.Waybill, isPending boo
|
||||
if bill.Status == model.WaybillStatusNew {
|
||||
s.addWaybill2Map(savedOrderInfo, bill)
|
||||
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 {
|
||||
// 订单处于完成状态,来的新运单,取消三方配送,转自送!
|
||||
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)
|
||||
SetStoreCategorySyncStatus2(db, nil, categoryIDs, model.SyncFlagModifiedMask)
|
||||
if err == nil {
|
||||
_, err = CurVendorSync.SyncReorderCategories(ctx, db, parentID, false, userName)
|
||||
CurVendorSync.SyncStoresCategory(ctx, db, nil, nil, false, true, true)
|
||||
if _, err = SetStoreCategorySyncStatus2(db, nil, categoryIDs, model.SyncFlagModifiedMask); err != nil {
|
||||
return err
|
||||
}
|
||||
// 同步平台分类排序
|
||||
if _, err := CurVendorSync.SyncReorderCategories(ctx, db, parentID, false, userName) ;err!= nil {
|
||||
return err
|
||||
}
|
||||
|
||||
// 同步门店分类
|
||||
CurVendorSync.SyncStoresCategory(ctx, db, nil, nil, false, true, true)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
@@ -41,9 +41,19 @@ func pay4OrderByTL(ctx *jxcontext.Context, order *model.GoodsOrder, payType int,
|
||||
if vendorPayType == tonglianpayapi.PayTypeWxXcx {
|
||||
param.SubAppID = subAppID
|
||||
authInfo, err := ctx.GetV2AuthInfo()
|
||||
// 微信小程序支付
|
||||
if err == nil && authInfo.GetAuthType() == weixin.AuthTypeMini && authInfo.GetAuthTypeID() == subAppID {
|
||||
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 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 {
|
||||
param.OpenID = authInfo.GetAuthID()
|
||||
}
|
||||
globals.SugarLogger.Debug("err1=====================", err)
|
||||
|
||||
result, err := api.WxpayAPI.CreateUnifiedOrder(param)
|
||||
globals.SugarLogger.Debug("err2=====================", err)
|
||||
globals.SugarLogger.Debug("err3=====================", fmt.Sprintf("%+v", result))
|
||||
if err == nil {
|
||||
orderPay = &model.OrderPay{
|
||||
PayOrderID: param.OutTradeNo,
|
||||
|
||||
Reference in New Issue
Block a user