This commit is contained in:
邹宗楠
2023-05-22 14:42:26 +08:00
parent d936e5fc54
commit 784d60912c
3 changed files with 20 additions and 24 deletions

View File

@@ -128,18 +128,18 @@ func NotifyPickOrder(order *model.GoodsOrder) (err error) {
order.NotifyType = int(store.SMSNotify)
partner.CurOrderManager.UpdateOrderFields(order, []string{"NotifyType"})
//品牌余额, 一条5分
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, "")
//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)