This commit is contained in:
邹宗楠
2022-07-05 10:39:44 +08:00
parent 030bc04fa5
commit 4b196bf5be
4 changed files with 16 additions and 11 deletions

View File

@@ -70,7 +70,7 @@ func CreateOrder(ctx *jxcontext.Context, type1, orderType int, way string, price
Address: address,
DistrictCode: dCode,
CityCode: cCode,
PayMethod: 3,
PayMethod: 4,
}
dao.WrapAddIDCULEntity(order, ctx.GetUserName())
if err = dao.CreateEntityTx(txDB, order); err != nil {

View File

@@ -177,8 +177,10 @@ func signParam(signType string, params map[string]interface{}) (sig string) {
func (p *PayHandler) CreateRefund() (err error) {
switch p.PayType {
case model.PayTypeTL:
case model.PayTypeWX:
case model.PayTypeTL: // 收费贵,不适用
case model.PayTypeAliPay: // 支付宝支付
case model.PayTypeWX: // 需要保持账号每天有交易流水,不适用
//企业付款(提现)
if p.VendorPayType == model.VendorPayTypeCompanyPay {
param := &wxpayapi.TransfersParam{

View File

@@ -3,8 +3,9 @@ package model
import "time"
const (
PayTypeWX = 1 // 微信支付
PayTypeTL = 2 // 通联宝支付
PayTypeWX = 1 // 微信支付
PayTypeTL = 2 // 通联宝支付
PayTypeAliPay = 3 // 支付包
PayStatusNo = 0
PayStatusYes = 1

View File

@@ -268,14 +268,16 @@ func QueryOrderDetail(typeCode int, orderNo string) (*bida.OrderDetail, error) {
}
// 本地查询获取真是支付快递费用
//sql := `SELECT * FROM user_vendor_order a WHERE a.other_way_bill = ? and a.type = ? `
//data := &model.UserVendorOrder{}
//param := []interface{}{orderNo, typeCode}
//if err := dao.GetRow(dao.GetDB(), data, sql, param); err != nil {
// return nil, err
//}
sql := `SELECT * FROM user_vendor_order a WHERE a.other_way_bill = ? and a.type = ? `
data := &model.UserVendorOrder{}
param := []interface{}{orderNo, typeCode}
if err := dao.GetRow(dao.GetDB(), data, sql, param); err != nil {
return nil, err
}
addFee := int(detail.PayFee*100) + detail.Weight*MarkupAmount
detail.PayFee = utils.Int2Float64(addFee) / float64(100)
detail.Images = data.Img
return detail, nil
}