添加前端小接口
This commit is contained in:
@@ -3475,6 +3475,18 @@ func GetStoreCategoryMap(ctx *jxcontext.Context, parentID, level int, storeID in
|
||||
return storeCatMaps, err
|
||||
}
|
||||
|
||||
func GetStoreCategoryMapNoDefault(ctx *jxcontext.Context, parentID, level int, storeID int) (storeCatMaps []*model.StoreCategoryMap, err error) {
|
||||
db := dao.GetDB()
|
||||
storeCatMaps, err = dao.GetStoreCategoryMap(db, parentID, level, storeID, 0)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
if ctx.GetLoginType() != weixin.AuthTypeMP && ctx.GetLoginType() != weixin.AuthTypeMini && ctx.GetLoginType() != weixin.AuthTypeWxApp && ctx.GetLoginType() != auth2.AuthTypeMobile {
|
||||
return storeCatMaps, err
|
||||
}
|
||||
return storeCatMaps, err
|
||||
}
|
||||
|
||||
func AddStoreCategoryMap(ctx *jxcontext.Context, storeCategoryMap *model.StoreCategoryMap) (result *model.StoreCategoryMap, err error) {
|
||||
var (
|
||||
db = dao.GetDB()
|
||||
|
||||
@@ -766,6 +766,24 @@ func (c *StoreController) GetStoreCategoryMap() {
|
||||
})
|
||||
}
|
||||
|
||||
// GetStoreCategoryNoDefault 得到门店分类,该功能属于手机客户端!与上功能相同!只是不再返回默认门店分类。
|
||||
// @Title 得到门店类别
|
||||
// @Description 得到门店分类,该功能属于手机客户端!与上功能相同!只是不再返回默认门店分类。
|
||||
// @Param token header string true "认证token"
|
||||
// @Param parentID query int false "父ID"
|
||||
// @Param level query int false "分类等级"
|
||||
// @Param storeID query int true "门店ID"
|
||||
// @Success 200 {object} controllers.CallResult
|
||||
// @Failure 200 {object} controllers.CallResult
|
||||
// @router /GetStoreCategoryNoDefault [get]
|
||||
func (c *StoreController) GetStoreCategoryNoDefault() {
|
||||
c.callGetStoreCategoryNoDefault(func(params *tStoreGetStoreCategoryNoDefaultParams) (interface{}, string, error) {
|
||||
// 获取门店分类
|
||||
categoryList, err := cms.GetStoreCategoryMapNoDefault(params.Ctx, params.ParentID, params.Level, params.StoreID)
|
||||
return categoryList, "", err
|
||||
})
|
||||
}
|
||||
|
||||
// @Title 新增门店类别
|
||||
// @Description 新增门店类别
|
||||
// @Param token header string true "认证token"
|
||||
|
||||
@@ -2502,6 +2502,16 @@ func init() {
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
// 得到门店分类,该功能属于手机客户端!与上功能相同!只是不再返回默认门店分类。
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||
web.ControllerComments{
|
||||
Method: "GetStoreCategoryNoDefault",
|
||||
Router: `/GetStoreCategoryNoDefault`,
|
||||
AllowHTTPMethods: []string{"get"},
|
||||
MethodParams: param.Make(),
|
||||
Filters: nil,
|
||||
Params: nil})
|
||||
|
||||
web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(web.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||
web.ControllerComments{
|
||||
Method: "GetBrandCategoryMap",
|
||||
|
||||
Reference in New Issue
Block a user