فهرست منبع

Merge branch 'refs/heads/eta_2.0.8_ly_0804@guomengyuan' into debug

gmy 7 ماه پیش
والد
کامیت
082554be55

+ 1 - 1
controllers/data_manage/base_from_ly_classify_controller.go

@@ -15,7 +15,7 @@ type BaseFromLyClassifyController struct {
 // LyClassifyList 获取分类列表
 // @Description 包含分类下的指标名称
 // @Param
-// @Success 200 {object} data_manage.BaseFromLyClassifyAndIndexInfo
+// @Success 200 {object} []data_manage.BaseFromLyClassifyAndIndexInfo
 // @router /ly/classify/list [get]
 func (this *BaseFromLyClassifyController) LyClassifyList() {
 	br := new(models.BaseResponse).Init()

+ 7 - 2
models/data_manage/base_from_ly_index.go

@@ -47,8 +47,13 @@ type NameCheckResult struct {
 // GetLyIndexByClassifyIds 通过分类ids查询指标列表
 func GetLyIndexByClassifyIds(classifyIds []int) (items []*BaseFromLyIndex, err error) {
 	o := orm.NewOrmUsingDB("data")
-	sql := `SELECT * FROM base_from_ly_index WHERE base_from_ly_classify_id IN (?)`
-	_, err = o.Raw(sql, classifyIds).QueryRows(&items)
+
+	// 创建查询条件
+	qs := o.QueryTable("base_from_ly_index")
+
+	// 使用 Filter 进行查询
+	_, err = qs.Filter("base_from_ly_classify_id__in", classifyIds).All(&items)
+
 	return
 }
 

+ 6 - 6
routers/commentsRouter.go

@@ -10843,7 +10843,7 @@ func init() {
 			Filters:          nil,
 			Params:           nil})
 
-	beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyClassifyController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyClassifyController"],
+	beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyClassifyController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyClassifyController"],
 		beego.ControllerComments{
 			Method:           "LyClassifyList",
 			Router:           `/ly/classify/list`,
@@ -10852,7 +10852,7 @@ func init() {
 			Filters:          nil,
 			Params:           nil})
 
-	beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"],
+	beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"],
 		beego.ControllerComments{
 			Method:           "LyIndexList",
 			Router:           `/ly/index/list`,
@@ -10861,7 +10861,7 @@ func init() {
 			Filters:          nil,
 			Params:           nil})
 
-	beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"],
+	beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"],
 		beego.ControllerComments{
 			Method:           "LyIndexDataList",
 			Router:           `/ly/index/data/list`,
@@ -10870,7 +10870,7 @@ func init() {
 			Filters:          nil,
 			Params:           nil})
 
-	beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"],
+	beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"],
 		beego.ControllerComments{
 			Method:           "LyIndexAddValidate",
 			Router:           `/ly/index/add/validate`,
@@ -10879,7 +10879,7 @@ func init() {
 			Filters:          nil,
 			Params:           nil})
 
-	beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"],
+	beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"],
 		beego.ControllerComments{
 			Method:           "LyIndexAdd",
 			Router:           `/ly/index/add`,
@@ -10888,7 +10888,7 @@ func init() {
 			Filters:          nil,
 			Params:           nil})
 
-	beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers:BaseFromLyIndexController"],
+	beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"] = append(beego.GlobalControllerRouter["eta/eta_api/controllers/data_manage:BaseFromLyIndexController"],
 		beego.ControllerComments{
 			Method:           "LyIndexDataExport",
 			Router:           `/ly/index/data/export`,