<feat>解决冲突
This commit is contained in:
parent
fa6b385209
commit
6cfc7c0c06
|
@ -60,7 +60,8 @@ func closeOrder() {
|
||||||
PrivateKey: wx.PrivateKey,
|
PrivateKey: wx.PrivateKey,
|
||||||
}
|
}
|
||||||
case common.PAY_CHANNLE_TYPE_ZFB:
|
case common.PAY_CHANNLE_TYPE_ZFB:
|
||||||
ali := backend.AliPayChannel{}
|
var ali backend.AliPayChannel
|
||||||
|
|
||||||
req.PayChannel = payCommon.PAY_CHANNLE_TYPE_ZFB
|
req.PayChannel = payCommon.PAY_CHANNLE_TYPE_ZFB
|
||||||
_ = json.Unmarshal([]byte(orderInfo.ExtJson), &ali)
|
_ = json.Unmarshal([]byte(orderInfo.ExtJson), &ali)
|
||||||
req.Ali = paymentService.AliPay{
|
req.Ali = paymentService.AliPay{
|
||||||
|
@ -183,7 +184,7 @@ func queryOrder() {
|
||||||
// 更新订单状态 todo
|
// 更新订单状态 todo
|
||||||
orderUpdate := ordersmodel.Orders{
|
orderUpdate := ordersmodel.Orders{
|
||||||
Id: orderInfo.Id,
|
Id: orderInfo.Id,
|
||||||
Status: int32(status),
|
Status: status,
|
||||||
}
|
}
|
||||||
|
|
||||||
session := ordersmodel.GetInstance().GetDb().NewSession()
|
session := ordersmodel.GetInstance().GetDb().NewSession()
|
||||||
|
|
|
@ -29,11 +29,11 @@ const (
|
||||||
ORDER_STATUS_FAILED = 4
|
ORDER_STATUS_FAILED = 4
|
||||||
ORDER_STATUS_CLOSE = 5
|
ORDER_STATUS_CLOSE = 5
|
||||||
|
|
||||||
STATUS_ENABLE int32 = 1
|
STATUS_ENABLE = 1
|
||||||
STATUS_DISABLED int32 = 2
|
STATUS_DISABLED = 2
|
||||||
|
|
||||||
ORDER_TYPE_PAY int32 = 1
|
ORDER_TYPE_PAY = 1
|
||||||
ORDER_TYPE_REFUND int32 = 2
|
ORDER_TYPE_REFUND = 2
|
||||||
|
|
||||||
PAY_CHANNLE_TYPE_WECHAT = 1 // 支付类型: 微信
|
PAY_CHANNLE_TYPE_WECHAT = 1 // 支付类型: 微信
|
||||||
PAY_CHANNLE_TYPE_ZFB = 2 // 支付类型:支付宝
|
PAY_CHANNLE_TYPE_ZFB = 2 // 支付类型:支付宝
|
||||||
|
@ -57,7 +57,7 @@ var PayChannelList = map[int]string{
|
||||||
PAY_CHANNEL_ALIPAY_JSAPI: "支付宝JSAPI",
|
PAY_CHANNEL_ALIPAY_JSAPI: "支付宝JSAPI",
|
||||||
}
|
}
|
||||||
|
|
||||||
var OrderTypeList = map[int32]string{
|
var OrderTypeList = map[int]string{
|
||||||
ORDER_TYPE_PAY: "付款",
|
ORDER_TYPE_PAY: "付款",
|
||||||
ORDER_TYPE_REFUND: "退款",
|
ORDER_TYPE_REFUND: "退款",
|
||||||
}
|
}
|
||||||
|
|
|
@ -112,7 +112,7 @@ type OrderRequestLogResponse struct {
|
||||||
MerchantRequest string `json:"merchant_request"`
|
MerchantRequest string `json:"merchant_request"`
|
||||||
MerchantResponse string `json:"merchant_response"`
|
MerchantResponse string `json:"merchant_response"`
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
Status int32 `json:"status"`
|
Status int `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *OrderRequestLogResponse) ResponseFromDb(db orderrequestlogmodel.OrderRequestLog) {
|
func (o *OrderRequestLogResponse) ResponseFromDb(db orderrequestlogmodel.OrderRequestLog) {
|
||||||
|
@ -133,7 +133,7 @@ type OrderThirdLogResponse struct {
|
||||||
CreateTime string `json:"create_time"`
|
CreateTime string `json:"create_time"`
|
||||||
PayCallback string `json:"pay_callback"`
|
PayCallback string `json:"pay_callback"`
|
||||||
Status int `json:"status"`
|
Status int `json:"status"`
|
||||||
MerchantParam string `json:"merchant_param"`
|
PayParam string `json:"pay_param"`
|
||||||
MerchantCallback string `json:"merchant_callback"`
|
MerchantCallback string `json:"merchant_callback"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -142,7 +142,7 @@ func (o *OrderThirdLogResponse) ResponseFromDb(db orderthirdpaylogmodel.OrderThi
|
||||||
o.OrderId = db.OrderId
|
o.OrderId = db.OrderId
|
||||||
o.PayCallback = db.PayCallback
|
o.PayCallback = db.PayCallback
|
||||||
o.Status = db.Status
|
o.Status = db.Status
|
||||||
o.MerchantParam = db.MerchantParam
|
o.PayParam = db.PayParam
|
||||||
o.MerchantCallback = db.MerchantCallback
|
o.MerchantCallback = db.MerchantCallback
|
||||||
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
o.CreateTime = db.CreateTime.Format("2006-01-02 15:04:05")
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ type PayReqs struct {
|
||||||
ApiCommonBody
|
ApiCommonBody
|
||||||
PayChannelId int64 `json:"pay_channel_id" validate:"required" label:"支付渠道"`
|
PayChannelId int64 `json:"pay_channel_id" validate:"required" label:"支付渠道"`
|
||||||
OutTradeNo string `json:"out_trade_no" validate:"required" label:"外侧商户订单号"`
|
OutTradeNo string `json:"out_trade_no" validate:"required" label:"外侧商户订单号"`
|
||||||
OrderType int32 `json:"order_type" validate:"required" label:"订单类型,支付,退款"`
|
OrderType int `json:"order_type" validate:"required" label:"订单类型,支付,退款"`
|
||||||
Amount int `json:"amount" validate:"required" label:"支付金额,单位分"`
|
Amount int `json:"amount" validate:"required" label:"支付金额,单位分"`
|
||||||
ExtJson string `json:"ext_json" label:"扩展参数"`
|
ExtJson string `json:"ext_json" label:"扩展参数"`
|
||||||
Desc string `json:"desc" validate:"max=100" label:"商品描述"`
|
Desc string `json:"desc" validate:"max=100" label:"商品描述"`
|
||||||
|
|
|
@ -20,7 +20,7 @@ type OrderRequestLog struct {
|
||||||
MerchantResponse string `xorm:"'merchant_response' JSON"`
|
MerchantResponse string `xorm:"'merchant_response' JSON"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
||||||
Status int32 `xorm:"'status' TINYINT"`
|
Status int `xorm:"'status' TINYINT"`
|
||||||
}
|
}
|
||||||
|
|
||||||
// 表名
|
// 表名
|
||||||
|
|
|
@ -18,14 +18,14 @@ type Orders struct {
|
||||||
PayChannelId int64 `xorm:"'pay_channel_id' bigint(20)"`
|
PayChannelId int64 `xorm:"'pay_channel_id' bigint(20)"`
|
||||||
AppId int64 `xorm:"'app_id' bigint(20)"`
|
AppId int64 `xorm:"'app_id' bigint(20)"`
|
||||||
OutTreadNo string `xorm:"'out_tread_no' varchar(50)"`
|
OutTreadNo string `xorm:"'out_tread_no' varchar(50)"`
|
||||||
OrderType int32 `xorm:"'order_type' TINYINT"`
|
OrderType int `xorm:"'order_type' TINYINT"`
|
||||||
Amount int `xorm:"'amount' int(11)"`
|
Amount int `xorm:"'amount' int(11)"`
|
||||||
PayerTotal int `xorm:"'payer_total' int(11)"`
|
PayerTotal int `xorm:"'payer_total' int(11)"`
|
||||||
ExtJson string `xorm:"'ext_json' varchar(1024)"`
|
ExtJson string `xorm:"'ext_json' varchar(1024)"`
|
||||||
Desc string `xorm:"'desc' varchar(100)"`
|
Desc string `xorm:"'desc' varchar(100)"`
|
||||||
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
CreateTime time.Time `xorm:"'create_time' datetime created"`
|
||||||
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
UpdateTime time.Time `xorm:"'update_time' timestamp updated"`
|
||||||
Status int32 `xorm:"'status' TINYINT"`
|
Status int `xorm:"'status' TINYINT"`
|
||||||
DeleteTime time.Time `xorm:"'delete_time' timestamp deleted"`
|
DeleteTime time.Time `xorm:"'delete_time' timestamp deleted"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -2,9 +2,9 @@ package types
|
||||||
|
|
||||||
type PayResp struct {
|
type PayResp struct {
|
||||||
OrderNo int64 `json:"order_no"`
|
OrderNo int64 `json:"order_no"`
|
||||||
OrderType int32 `json:"out_trade_no"`
|
OrderType int `json:"out_trade_no"`
|
||||||
Amount int `json:"order_type"`
|
Amount int `json:"order_type"`
|
||||||
Desc string `json:"amount"`
|
Desc string `json:"amount"`
|
||||||
IsNewCreate bool `json:"is_new_create"`
|
IsNewCreate bool `json:"is_new_create"`
|
||||||
Status int32 `json:"status"`
|
Status int `json:"status"`
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue