aa
This commit is contained in:
@@ -3392,7 +3392,12 @@ func CleanStoreIsBoughtMatter(ctx *jxcontext.Context) (err error) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func InsertStoreCategories(ctx *jxcontext.Context, db *dao.DaoDB, storeID int) (err error) {
|
func InsertStoreCategories(ctx *jxcontext.Context, db *dao.DaoDB, storeID int) (err error) {
|
||||||
err = dao.InsertStoreCategories(db, ctx.GetUserName(), storeID)
|
if db == nil {
|
||||||
|
db = dao.GetDB()
|
||||||
|
}
|
||||||
|
if err = dao.DeleteStoreCategroies2(db, storeID); err == nil {
|
||||||
|
err = dao.InsertStoreCategories(db, ctx.GetUserName(), storeID)
|
||||||
|
}
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -826,6 +826,17 @@ func DeleteStoreCategroies(db *DaoDB, userName string, storeID int) (err error)
|
|||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func DeleteStoreCategroies2(db *DaoDB, storeID int) (err error) {
|
||||||
|
sql := `
|
||||||
|
DELETE FROM store_category_map WHERE store_id = ?
|
||||||
|
`
|
||||||
|
sqlParams := []interface{}{
|
||||||
|
storeID,
|
||||||
|
}
|
||||||
|
_, err = ExecuteSQL(db, sql, sqlParams)
|
||||||
|
return err
|
||||||
|
}
|
||||||
|
|
||||||
func GetStorePushClient(db *DaoDB, storeID int, cID string) (storePushClient []*model.StorePushClient, err error) {
|
func GetStorePushClient(db *DaoDB, storeID int, cID string) (storePushClient []*model.StorePushClient, err error) {
|
||||||
sql := `
|
sql := `
|
||||||
SELECT *
|
SELECT *
|
||||||
|
|||||||
@@ -990,3 +990,17 @@ func (c *StoreController) UpdateBrand() {
|
|||||||
return retVal, "", err
|
return retVal, "", err
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// @Title 修改门店分类为京西分类
|
||||||
|
// @Description 修改门店分类为京西分类
|
||||||
|
// @Param token header string true "认证token"
|
||||||
|
// @Param storeID formData int true "门店ID"
|
||||||
|
// @Success 200 {object} controllers.CallResult
|
||||||
|
// @Failure 200 {object} controllers.CallResult
|
||||||
|
// @router /InsertStoreCategories [post]
|
||||||
|
func (c *StoreController) InsertStoreCategories() {
|
||||||
|
c.callInsertStoreCategories(func(params *tStoreInsertStoreCategoriesParams) (retVal interface{}, errCode string, err error) {
|
||||||
|
err = cms.InsertStoreCategories(params.Ctx, nil, params.StoreID)
|
||||||
|
return retVal, "", err
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|||||||
@@ -2187,6 +2187,15 @@ func init() {
|
|||||||
Filters: nil,
|
Filters: nil,
|
||||||
Params: nil})
|
Params: nil})
|
||||||
|
|
||||||
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||||
|
beego.ControllerComments{
|
||||||
|
Method: "InsertStoreCategories",
|
||||||
|
Router: `/InsertStoreCategories`,
|
||||||
|
AllowHTTPMethods: []string{"post"},
|
||||||
|
MethodParams: param.Make(),
|
||||||
|
Filters: nil,
|
||||||
|
Params: nil})
|
||||||
|
|
||||||
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"] = append(beego.GlobalControllerRouter["git.rosy.net.cn/jx-callback/controllers:StoreController"],
|
||||||
beego.ControllerComments{
|
beego.ControllerComments{
|
||||||
Method: "JdStoreInfoCoordinateRecover",
|
Method: "JdStoreInfoCoordinateRecover",
|
||||||
|
|||||||
Reference in New Issue
Block a user