新增小程序扫码建商品
This commit is contained in:
@@ -4,6 +4,8 @@ import (
|
||||
"math"
|
||||
"time"
|
||||
|
||||
"git.rosy.net.cn/baseapi/platformapi/jdapi"
|
||||
|
||||
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
|
||||
"git.rosy.net.cn/jx-callback/business/jxutils"
|
||||
"git.rosy.net.cn/jx-callback/business/model/dao"
|
||||
@@ -775,3 +777,23 @@ func (c *StoreSkuController) CreateSkusAndFocusFromYb() {
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 从微信上扫码标品到京西创建或关注
|
||||
// @Description 从微信上扫码标品到京西创建或关注
|
||||
// @Param token header string true "认证token"
|
||||
// @Param payload formData string true "json数据,ProductInfo对象"
|
||||
// @Param storeID formData int true "门店ID"
|
||||
// @Param price formData int true "商品价格"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /CreateSkusAndFocusFromWx [post]
|
||||
func (c *StoreSkuController) CreateSkusAndFocusFromWx() {
|
||||
var productInfo *jdapi.ProductInfo
|
||||
c.callCreateSkusAndFocusFromWx(func(params *tStoreSkuCreateSkusAndFocusFromWxParams) (retVal interface{}, errCode string, err error) {
|
||||
if err = jxutils.Strings2Objs(params.Payload, &productInfo); err != nil {
|
||||
return retVal, "", err
|
||||
}
|
||||
err = cms.CreateSkusAndFocusFromWx(params.Ctx, productInfo, params.Price, params.StoreID)
|
||||
return retVal, "", err
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user