@ -53,7 +53,7 @@ func UpdateBaseMenu(model models.TBaseMenu, ForceUpdateFields []string) (int64,
//分页查询
func PageBaseMenu(in *BaseMenuProto.QueryArg) ([]map[string]interface{}, int32, error) {
//判断这个in.AppId是不是已经在t_base_menu中存在根,如果没有,需要先创建
sql := `select count(1) from t_base_menu where b_use=1 and app_id=? and identity_id=? and parent_id='00000000-0000-0000-0000-000000000000'`
sql := `select count(1) as c from t_base_menu where b_use=1 and app_id=? and identity_id=? and parent_id='00000000-0000-0000-0000-000000000000'`
list, err := db.SQL(sql, in.AppId, in.IdentityId).Query().List()
if err != nil {
return nil, 0, err
@ -11,8 +11,8 @@ import (
func Routers(r *gin.RouterGroup) {
rr := r.Group("/menu")
rr.GET("/PageBaseMenuInfo", PageMenuInfo)
rr.GET("/GetBaseMenuInfo", GetMenuInfo)
rr.GET("/PageMenuInfo", PageMenuInfo)
rr.GET("/GetMenuInfo", GetMenuInfo)
rr.POST("/AddMenuInfo", AddMenuInfo)
rr.POST("/DeleteMenuInfo", DeleteMenuInfo)
rr.POST("/UpdateMenuInfo", UpdateMenuInfo)