aa
This commit is contained in:
@@ -413,6 +413,8 @@ type Coupons struct {
|
|||||||
ModelIDCULD
|
ModelIDCULD
|
||||||
|
|
||||||
CouponType int `json:"couponType"` //优惠券类型 ,1为总额满减, 2为运费优惠,
|
CouponType int `json:"couponType"` //优惠券类型 ,1为总额满减, 2为运费优惠,
|
||||||
|
Name string `json:"name"` //优惠券名字
|
||||||
|
Desc string `json:"desc"` //优惠券详情描述
|
||||||
BeginAt time.Time `json:"beginAt"` //开始时间
|
BeginAt time.Time `json:"beginAt"` //开始时间
|
||||||
EndAt time.Time `json:"endAt"` //到期时间
|
EndAt time.Time `json:"endAt"` //到期时间
|
||||||
UpperLimit int `json:"upperLimit"` //满多少
|
UpperLimit int `json:"upperLimit"` //满多少
|
||||||
|
|||||||
@@ -2148,3 +2148,11 @@ func GetMyPriceDefendOrders(ctx *jxcontext.Context, fromTime, toTime string) (pr
|
|||||||
priceDefendOrders, err = dao.GetPriceDefendOrder(db, "", nil, nil, nil, 0, -1, -1, -1, userID, utils.Str2Time(fromTime), utils.Str2Time(toTime), true)
|
priceDefendOrders, err = dao.GetPriceDefendOrder(db, "", nil, nil, nil, 0, -1, -1, -1, userID, utils.Str2Time(fromTime), utils.Str2Time(toTime), true)
|
||||||
return priceDefendOrders, err
|
return priceDefendOrders, err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func GetCoupons(ctx *jxcontext.Context, couponType int, keyword string) (coupons []*model.Coupons, err error) {
|
||||||
|
// var (
|
||||||
|
// db = dao.GetDB()
|
||||||
|
// )
|
||||||
|
// coupons, err = dao.GetCoupons(db, couponType, keyword)
|
||||||
|
return coupons, err
|
||||||
|
}
|
||||||
|
|||||||
@@ -284,3 +284,18 @@ func (c *JxOrderController) TestDefend() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 查询优惠券
|
||||||
|
// @Description 查询优惠券
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param couponType query int false "优惠券类型,1为商品总额满减,2为运费优惠"
|
||||||
|
// @Param keyword query string false "关键字"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /GetCoupons [get]
|
||||||
|
func (c *JxOrderController) GetCoupons() {
|
||||||
|
c.callGetCoupons(func(params *tJxorderGetCouponsParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
retVal, err = localjx.GetCoupons(params.Ctx, params.CouponType, params.Keyword)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user