- add jxcontext.Context to all public API.
This commit is contained in:
@@ -44,7 +44,7 @@ func (c *PromotionController) CreatePromotion() {
|
||||
}
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.StoreIDs), &promotionParams.StoreIDs); err == nil {
|
||||
if err = utils.UnmarshalUseNumber([]byte(params.SkuPrices), &promotionParams.SkuPrices); err == nil {
|
||||
retVal, err = promotion.CreateJdPromotion(false, params.IsAsync, promotionParams, GetUserNameFromToken(params.Token))
|
||||
retVal, err = promotion.CreateJdPromotion(params.Ctx, false, params.IsAsync, promotionParams, params.Ctx.GetUserName())
|
||||
}
|
||||
}
|
||||
return retVal, "", err
|
||||
@@ -79,7 +79,7 @@ func (c *PromotionController) CreatePromotionByExcel() {
|
||||
c.callCreatePromotionByExcel(func(params *tPromotionCreatePromotionByExcelParams) (retVal interface{}, errCode string, err error) {
|
||||
r := c.Ctx.Request
|
||||
files := r.MultipartForm.File["userfile"]
|
||||
retVal, err = promotion.CreatePromotionByExcel(params.IsAsync, params.Type, files[0], "userName") //GetUserNameFromToken(params.Token))
|
||||
retVal, err = promotion.CreatePromotionByExcel(params.Ctx, params.IsAsync, params.Type, files[0], "userName") //params.Ctx.GetUserName())
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
@@ -96,7 +96,7 @@ func (c *PromotionController) CreatePromotionByExcel() {
|
||||
// @router /SendAdvertingByGoodsOrder [post]
|
||||
func (c *PromotionController) SendAdvertingByGoodsOrder() {
|
||||
c.callSendAdvertingByGoodsOrder(func(params *tPromotionSendAdvertingByGoodsOrderParams) (retVal interface{}, errCode string, err error) {
|
||||
retVal, err = promotion.SendAdvertingByGoodsOrder(params.Advertising, params.Days, params.IsAsync, GetUserNameFromToken(params.Token))
|
||||
retVal, err = promotion.SendAdvertingByGoodsOrder(params.Ctx, params.Advertising, params.Days, params.IsAsync, params.Ctx.GetUserName())
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user