- cms.GetProductInfoByBarCode

This commit is contained in:
gazebo
2018-12-12 19:12:08 +08:00
parent d68706dc71
commit edb93cf25e
4 changed files with 28 additions and 0 deletions

View File

@@ -4,6 +4,7 @@ import (
"git.rosy.net.cn/baseapi/utils"
"git.rosy.net.cn/jx-callback/business/jxstore/cms"
"git.rosy.net.cn/jx-callback/business/jxutils/configindb"
"git.rosy.net.cn/jx-callback/globals/api"
"github.com/astaxie/beego"
)
@@ -134,3 +135,17 @@ func (c *CmsController) SetConfig() {
return retVal, "", err
})
}
// @Title 从条形码得到商品信息
// @Description 从条形码得到商品信息
// @Param token header string true "认证token"
// @Param barCode query string true "条形码"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /GetProductInfoByBarCode [get]
func (c *CmsController) GetProductInfoByBarCode() {
c.callGetProductInfoByBarCode(func(params *tCmsGetProductInfoByBarCodeParams) (retVal interface{}, errCode string, err error) {
retVal, err = api.ShowAPI.GetProductInfoByBarCode(params.BarCode)
return retVal, "", err
})
}