aa
This commit is contained in:
@@ -327,3 +327,24 @@ func (c *JxOrderController) AddCoupons() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 修改优惠券
|
||||
// @Description 修改优惠券
|
||||
// @Param token header string true "认证token"
|
||||
// @Param payload formData string true "优惠券类型 payload"
|
||||
// @Param storeIDs formData string false "门店IDs"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /UpdateCoupons [post]
|
||||
func (c *JxOrderController) UpdateCoupons() {
|
||||
c.callUpdateCoupons(func(params *tJxorderUpdateCouponsParams) (retVal interface{}, errCode string, err error) {
|
||||
payload := make(map[string]interface{})
|
||||
var storeIDs []int
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.Payload), &payload); err == nil {
|
||||
if err = jxutils.Strings2Objs(params.StoreIDs, &storeIDs); err == nil {
|
||||
err = localjx.UpdateCoupons(params.Ctx, payload, storeIDs)
|
||||
}
|
||||
}
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user