This commit is contained in:
邹宗楠
2023-05-15 09:32:02 +08:00
parent 816b200db7
commit 1c9760b540
13 changed files with 74 additions and 24 deletions

View File

@@ -126,9 +126,20 @@ func NotifyPickOrder(order *model.GoodsOrder) (err error) {
}
updateSth := func(order *model.GoodsOrder, store *dao.StoreDetail, feeType int) (err error) {
order.NotifyType = int(store.SMSNotify)
err = partner.CurOrderManager.UpdateOrderFields(order, []string{"NotifyType"})
partner.CurOrderManager.UpdateOrderFields(order, []string{"NotifyType"})
//品牌余额, 一条5分
err = partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, store.BrandID, 5, model.BrandBillTypeExpend, feeType, order.VendorOrderID, "")
if order.CreateDeliveryType == model.YES { // 门店发单
noticeType := 0
switch feeType {
case model.BrandBillFeeTypeSms:
noticeType = partner.StoreAcctTypeExpendTextMessageNotify
case model.BrandBillFeeTypeVoice:
noticeType = partner.StoreAcctTypeExpendVoiceMessageNotify
}
err = partner.CurStoreAcctManager.InsertStoreAcctExpendAndUpdateStoreAcctBalance(jxcontext.AdminCtx, store.ID, 5, noticeType, order.VendorOrderID, "", 0)
} else if order.CreateDeliveryType == model.NO { // 品牌发单
err = partner.CurStoreAcctManager.InsertBrandBill(jxcontext.AdminCtx, store.BrandID, 5, model.BrandBillTypeExpend, feeType, order.VendorOrderID, "")
}
return err
}
balance, _ := partner.CurStoreAcctManager.GetBrandBalance(store.BrandID)