面包店
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

71 regels
2.3 KiB

  1. package md
  2. const (
  3. CALLBACK_URL = "%s/api/v1/mall/pay/callback?master_id=%s&order_type=%s&pay_method=%s"
  4. BALANCE_PAY = "balance_pay"
  5. ALIPAY = "alipay"
  6. WX_PAY = "wxpay"
  7. SecKillStockLock = "%s:mall_sec:%s:%s" // 秒杀库存锁Redis Key
  8. )
  9. //订单类型:1普通订单 2拼团订单 3秒杀 4超级拼团
  10. const (
  11. ORDINARY_ORDER_TYPE = 1
  12. GROUP_BUY_ORDER_TYPE = 2
  13. SEC_KILL_ORDER_TYPE = 3
  14. SUPER_GROUP_BUY_ORDER_TYPE = 4
  15. )
  16. //团购购买方式 `open_group_buy_type` : 开团购买 , `add_group_buy_type` : `参团购买`
  17. const (
  18. OPEN_GROUP_BUY_TYPE = "open_group_buy_type"
  19. ADD_GROUP_BUY_TYPE = "add_group_buy_type"
  20. )
  21. const MallSecondsKillBuy = "mall_seconds_kill_buy" //秒杀活动
  22. const MallGroupBuyActivity = "mall_group_buy" //团购活动
  23. const MallBargainingBuyActivity = "mall_bargaining_buy" //砍价活动
  24. const SuperGroupActivity = "super_group_buy" // 超级拼团
  25. const MallGoodsActivityVipGift = "mall_goods_activity_vip_gift" // 会员礼包
  26. var CouponSpecialActivity = map[string]int{
  27. MallSecondsKillBuy: 2,
  28. MallGroupBuyActivity: 1,
  29. MallBargainingBuyActivity: 3,
  30. SuperGroupActivity: 4,
  31. MallGoodsActivityVipGift: 5,
  32. }
  33. // PayMethod 支付方式名称
  34. var PayMethod = map[string]string{
  35. BALANCE_PAY: "余额支付",
  36. ALIPAY: "支付宝支付",
  37. WX_PAY: "微信支付",
  38. }
  39. // PayMethodIDs 支付方式ID
  40. var PayMethodIDs = map[string]int{
  41. BALANCE_PAY: 1,
  42. ALIPAY: 2,
  43. WX_PAY: 3,
  44. }
  45. // MallGoods 支付类型
  46. const (
  47. MallGoods = "mall_goods" // 直接提交订单支付(多种商品)
  48. MallGoodsSub = "mall_goods_sub" // 从待支付订单支付(一种商品)
  49. MallGroupBuy = "mall_group_buy" // 从拼团提交订单支付(一种商品)
  50. SuperGroupBuy = "super_group_buy" // 超级拼团提交(一种商品)
  51. MallSecondsKill = "mall_seconds_kill" // 从秒杀提交订单支付(一种商品)
  52. )
  53. // NeedPayPart 支付类型名称
  54. var NeedPayPart = map[string]string{
  55. MallGoods: "自营商城商品",
  56. MallGoodsSub: "自营商城商品",
  57. MallGroupBuy: "拼团购买商品",
  58. SuperGroupBuy: "超级拼团购买商品",
  59. MallSecondsKill: "秒杀购买商品",
  60. ALIPAY: "自营商城商品购物",
  61. }