暂时存一下
This commit is contained in:
@@ -9,8 +9,9 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
PayTypeWX = 1 // 微信支付
|
||||
PayTypeTL = 2 // 通联宝支付
|
||||
PayTypeWX = 1 // 微信支付
|
||||
PayTypeTL = 2 // 通联宝支付
|
||||
PayTypeTL_DiscountCard = 3 // 通联宝支付(会员折扣卡)
|
||||
|
||||
PayStatusNo = 0
|
||||
PayStatusYes = 1
|
||||
|
||||
@@ -194,3 +194,19 @@ func (*UserOrderSms) TableUnique() [][]string {
|
||||
[]string{"Mobile"},
|
||||
}
|
||||
}
|
||||
|
||||
type UserMember struct {
|
||||
ModelIDCULD
|
||||
|
||||
UserID string `orm:"size(48);column(user_id)" json:"userID"` //内部唯一标识
|
||||
MemberType int `json:"memberType"` //会员类型, 1为折扣卡
|
||||
MemberID int `json:"memberID"` //会员类型ID,折扣卡的话代表几档
|
||||
EndAt time.Time `json:"endAt"` //会员过期时间
|
||||
}
|
||||
|
||||
func (v *UserMember) TableIndex() [][]string {
|
||||
return [][]string{
|
||||
[]string{"UserID"},
|
||||
[]string{"CreateAt"},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -323,6 +323,23 @@ func Pay4Order(ctx *jxcontext.Context, orderID int64, payType int, vendorPayType
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
func Pay4User(ctx *jxcontext.Context, thingID, payType int, vendorPayType string) (orderPay *model.OrderPay, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
)
|
||||
switch payType {
|
||||
case model.PayTypeTL_DiscountCard:
|
||||
dao.QueryConfigs(db, "会员折扣卡", model.ConfigTypeDiscountCard, "")
|
||||
// if orderPay, err = pay4UserByTL(ctx, thingID, vendorPayType); err == nil && orderPay != nil {
|
||||
// dao.WrapAddIDCULDEntity(orderPay, ctx.GetUserName())
|
||||
// err = dao.CreateEntity(dao.GetDB(), orderPay)
|
||||
// }
|
||||
default:
|
||||
err = fmt.Errorf("支付方式:%d当前不支持", payType)
|
||||
}
|
||||
return orderPay, err
|
||||
}
|
||||
|
||||
func time2ShortTimeStr(t time.Time) string {
|
||||
return t.Format("15:04")
|
||||
}
|
||||
|
||||
@@ -48,6 +48,21 @@ func (c *JxOrderController) Pay4Order() {
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 请求支付京西商城相关用户支付项目
|
||||
// @Description 请求支付京西商城相关用户支付项目
|
||||
// @Param token header string true "认证token"
|
||||
// @Param thingID formData int true "项目ID"
|
||||
// @Param payType formData int true "支付类型"
|
||||
// @Param vendorPayType formData string true "平台支付类型"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /Pay4User [post]
|
||||
func (c *JxOrderController) Pay4User() {
|
||||
c.callPay4User(func(params *tJxorderPay4UserParams) (retVal interface{}, errCode string, err error) {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 买家取消(或申请取消)订单
|
||||
// @Description 买家取消(或申请取消)订单
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
Reference in New Issue
Block a user