order_payment.go 975 B

12345678910111213141516171819202122232425262728293031
  1. package order
  2. import (
  3. "github.com/beego/beego/v2/client/orm"
  4. "time"
  5. )
  6. type CygxOrderPayment struct {
  7. OrderPaymentID int `orm:"column(order_payment_id);pk";comment:"订单支付ID"`
  8. OrderCode string `comment:"订单编号"`
  9. OutTradeCode string `comment:"外部交易号退款使用"`
  10. PayBody string `comment:"订单支付简介"`
  11. PayDetail string `comment:"订单支付详情"`
  12. PayMoney float64 `comment:"支付金额"`
  13. PayStatus string `comment:"支付状态"`
  14. CreateTime time.Time `comment:"创建时间"`
  15. PaymentType int `comment:"支付类型。取值范围:1微信支付,2支付宝支付。"`
  16. }
  17. // 微信支付回调返回通知信息
  18. type WechatPayNotifyUrlJson struct {
  19. Code string `json:"code"`
  20. Message string `json:"message"`
  21. }
  22. // 添加
  23. func AddCygxOrderPayment(item *CygxOrderPayment) (err error) {
  24. o := orm.NewOrm()
  25. _, err = o.Insert(item) //回调支付信息
  26. return
  27. }