diff --git a/business/jxstore/cms/order.go b/business/jxstore/cms/order.go index 210373cc2..1c619609c 100644 --- a/business/jxstore/cms/order.go +++ b/business/jxstore/cms/order.go @@ -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 { diff --git a/business/jxstore/financial/financial.go b/business/jxstore/financial/financial.go index d7db031d4..09c6928cf 100644 --- a/business/jxstore/financial/financial.go +++ b/business/jxstore/financial/financial.go @@ -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{ diff --git a/business/model/order.go b/business/model/order.go index 7cb0ebf81..4c6253611 100644 --- a/business/model/order.go +++ b/business/model/order.go @@ -3,8 +3,9 @@ package model import "time" const ( - PayTypeWX = 1 // 微信支付 - PayTypeTL = 2 // 通联宝支付 + PayTypeWX = 1 // 微信支付 + PayTypeTL = 2 // 通联宝支付 + PayTypeAliPay = 3 // 支付包 PayStatusNo = 0 PayStatusYes = 1 diff --git a/business/q_bida/q_bida_server.go b/business/q_bida/q_bida_server.go index 780f26bd5..30a9e5692 100644 --- a/business/q_bida/q_bida_server.go +++ b/business/q_bida/q_bida_server.go @@ -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 }