查找退费账单
This commit is contained in:
@@ -2,6 +2,7 @@ package bidding
|
||||
|
||||
import (
|
||||
"git.rosy.net.cn/baseapi/utils"
|
||||
"git.rosy.net.cn/jx-callback/business/jxcallback/orderman"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils/jxcontext"
|
||||
"git.rosy.net.cn/jx-callback/business/model"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
@@ -39,3 +40,45 @@ func GetBiddingMsg(ctx *jxcontext.Context, param map[string]interface{}) (result
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
func GetBrandPayOrder(brandID int, created string) (map[string]interface{}, error) {
|
||||
payOder, err := dao.GetBrandBill2(dao.GetDB(), brandID, "", model.BrandBillTypeExpend, model.BrandBillFeeTypeDelivery, "", created)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
result := make(map[string]interface{}, 0)
|
||||
for _, v := range payOder {
|
||||
// 获取运单记录
|
||||
orderStatusList, err := orderman.GetOrderStatusCancelList(v.OrderId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
isRefund := false
|
||||
for _, v2 := range orderStatusList {
|
||||
if v2.VendorID == model.VendorIDMTPS && v2.VendorStatus == "50" {
|
||||
isRefund = true
|
||||
break
|
||||
}
|
||||
|
||||
if v2.VendorID == model.VendorIDFengNiao && v2.VendorStatus == "3" {
|
||||
isRefund = true
|
||||
break
|
||||
}
|
||||
if v2.VendorID == model.VendorIDDada && v2.VendorStatus == "4" {
|
||||
isRefund = true
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
if isRefund {
|
||||
// 三方配送已经送达了,不退费
|
||||
continue
|
||||
} else {
|
||||
result[v.OrderId] = "ok"
|
||||
}
|
||||
|
||||
}
|
||||
return result, nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user