ソースを参照

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

# Conflicts:
#	routers/commentsRouter.go
gmy 1 ヶ月 前
コミット
9123b1bddc

+ 375 - 0
controllers/base_from_ly.go

@@ -138,3 +138,378 @@ func (this *BaseFromLyController) Refresh() {
 	br.Success = true
 	br.Msg = "获取成功"
 }
+
+// GetLyClassifyByName
+// @Title 获取分类
+// @Description 获取分类
+// @Success 200 {object} models.BaseFromLyClassify
+// @router /get/ly/classify/by/name [get]
+func (this *BaseFromLyController) GetLyClassifyByName() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	categoryName := this.GetString("CategoryName")
+
+	if categoryName == "" {
+		br.Msg = "请输入分类!"
+		br.ErrMsg = "请输入分类"
+		return
+	}
+
+	lyClassify, err := models.GetLyClassifyByName(categoryName)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Data = lyClassify
+	br.Msg = "获取成功"
+}
+
+// GetLyIndexRecordByUrl
+// @Title 根据url获取指标已读取记录
+// @Description 根据url获取指标已读取记录
+// @Success 200 {object} models.BaseFromLyIndexRecord
+// @router /get/ly/index/record/by/url [get]
+func (this *BaseFromLyController) GetLyIndexRecordByUrl() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	url := this.GetString("Url")
+
+	if url == "" {
+		br.Msg = "请输入地址链接!"
+		br.ErrMsg = "请输入地址链接"
+		return
+	}
+
+	lyIndexRecord, err := models.GetLyIndexRecordByUrl(url)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Data = lyIndexRecord
+	br.Msg = "获取成功"
+}
+
+// AddLyIndexRecord
+// @Title 维护指标数据读取进度到数据库
+// @Description 维护指标数据读取进度到数据库
+// @Success 200 string "处理成功"
+// @router /add/ly/index/record [post]
+func (this *BaseFromLyController) AddLyIndexRecord() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	var req models.BaseFromLyIndexRecord
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	_, err = models.AddLyIndexRecord(&req)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "处理成功"
+}
+
+// AddLyDataList
+// @Title 新增指标数据
+// @Description 新增指标数据列表
+// @Success 200 string "处理成功"
+// @router /add/ly/data/list [post]
+func (this *BaseFromLyController) AddLyDataList() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	var req []models.BaseFromLyData
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	err = models.AddLyDataList(req)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "处理成功"
+}
+
+// AddLyIndex
+// @Title 新增指标
+// @Description 新增指标
+// @Success 200 string "处理成功"
+// @router /add/ly/index [post]
+func (this *BaseFromLyController) AddLyIndex() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+	var req models.BaseFromLyIndex
+	err := json.Unmarshal(this.Ctx.Input.RequestBody, &req)
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	indexId, err := models.AddLyIndex(&req)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Data = indexId
+	br.Msg = "处理成功"
+}
+
+// GetLyDataByIndexIdAndDataTime
+// @Title 根据指标id和时间获取指标数据
+// @Description 根据指标id和时间获取指标数据
+// @Success 200 {object} models.BaseFromLyData
+// @router /get/ly/data/by/index/id/and/data/time [get]
+func (this *BaseFromLyController) GetLyDataByIndexIdAndDataTime() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	indexId, err := this.GetInt("IndexId")
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	if indexId == 0 {
+		br.Msg = "请输入指标id!"
+		br.ErrMsg = "请输入指标id"
+		return
+	}
+
+	dataTime := this.GetString("DataTime")
+
+	if dataTime == "" {
+		br.Msg = "请输入时间!"
+		br.ErrMsg = "请输入时间"
+		return
+	}
+
+	lyData, err := models.GetLyDataByIndexIdAndDataTime(indexId, dataTime)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Data = lyData
+	br.Msg = "获取成功"
+}
+
+// GetLyDataByIndexIdAndDataTimeYM
+// @Title 根据指标id和年月时间获取指标数据
+// @Description 根据指标id和年月时间获取指标数据
+// @Success 200 {object} models.BaseFromLyData
+// @router /get/ly/data/by/index/id/and/data/time/ym [get]
+func (this *BaseFromLyController) GetLyDataByIndexIdAndDataTimeYM() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	indexId, err := this.GetInt("IndexId")
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	if indexId == 0 {
+		br.Msg = "请输入指标id!"
+		br.ErrMsg = "请输入指标id"
+		return
+	}
+
+	yearMonth := this.GetString("YearMonth")
+
+	if yearMonth == "" {
+		br.Msg = "请输入时间!"
+		br.ErrMsg = "请输入时间"
+		return
+	}
+
+	lyData, err := models.GetLyDataByIndexIdAndDataTimeYM(indexId, yearMonth)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Data = lyData
+	br.Msg = "获取成功"
+}
+
+// UpdateLyDataById
+// @Title 更新数据源指标数据
+// @Description 更新数据源指标数据
+// @Success 200 string "处理成功"
+// @router /update/ly/data/by/id [get]
+func (this *BaseFromLyController) UpdateLyDataById() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	id, err := this.GetInt("Id")
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	if id == 0 {
+		br.Msg = "请输入id!"
+		br.ErrMsg = "请输入id"
+		return
+	}
+
+	value, err := this.GetFloat("Value")
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	if value == 0 {
+		br.Msg = "请输入值!"
+		br.ErrMsg = "请输入值"
+		return
+	}
+
+	err = models.UpdateLyDataById(id, value)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "处理成功"
+}
+
+// UpdateLyEdbDataById
+// @Title 更新指标库指标数据
+// @Description 更新数据源指标数据
+// @Success 200 string "处理成功"
+// @router /update/ly/edb/data/by/id [get]
+func (this *BaseFromLyController) UpdateLyEdbDataById() {
+	br := new(models.BaseResponse).Init()
+	var cacheKey string
+	defer func() {
+		if br.ErrMsg == "" {
+			br.IsSendEmail = false
+		}
+		_ = utils.Rc.Delete(cacheKey)
+		this.Data["json"] = br
+		this.ServeJSON()
+	}()
+
+	id, err := this.GetInt("Id")
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+	if id == 0 {
+		br.Msg = "请输入id!"
+		br.ErrMsg = "请输入id"
+		return
+	}
+
+	value, err := this.GetFloat("Value")
+	if err != nil {
+		br.Msg = "参数解析异常!"
+		br.ErrMsg = "参数解析失败,Err:" + err.Error()
+		return
+	}
+
+	if value == 0 {
+		br.Msg = "请输入值!"
+		br.ErrMsg = "请输入值"
+		return
+	}
+
+	err = models.UpdateLyDataById(id, value)
+	if err != nil {
+		return
+	}
+
+	br.Ret = 200
+	br.Success = true
+	br.Msg = "处理成功"
+}

+ 26 - 0
models/base_from_ly_classify.go

@@ -0,0 +1,26 @@
+// @Author gmy 2024/8/7 9:26:00
+package models
+
+import "github.com/beego/beego/v2/client/orm"
+
+type BaseFromLyClassify struct {
+	BaseFromLyClassifyId int    `orm:"column(base_from_ly_classify_id);pk"` // 分类ID
+	CreateTime           string `orm:"column(create_time)"`                 // 创建时间
+	ModifyTime           string `orm:"column(modify_time)"`                 // 修改时间
+	ClassifyName         string `orm:"column(classify_name)"`               // 分类名称
+	ParentId             int    `orm:"column(parent_id)"`                   // 上级id
+	Sort                 int    `orm:"column(sort)"`                        // 排序字段,越小越靠前
+	ClassifyNameEn       string `orm:"column(classify_name_en)"`            // 英文分类名称
+}
+
+func init() {
+	orm.RegisterModel(new(BaseFromLyClassify))
+}
+
+// GetLyClassifyByName 根据分类名称查询
+func GetLyClassifyByName(classifyName string) (item *BaseFromLyClassify, err error) {
+	o := orm.NewOrmUsingDB("data")
+	sql := `SELECT * FROM base_from_ly_classify WHERE classify_name=?`
+	err = o.Raw(sql, classifyName).QueryRow(&item)
+	return
+}

+ 60 - 0
models/base_from_ly_data.go

@@ -0,0 +1,60 @@
+// @Author gmy 2024/8/7 9:50:00
+package models
+
+import "github.com/beego/beego/v2/client/orm"
+
+type BaseFromLyData struct {
+	BaseFromLyDataId  int     `orm:"column(base_from_ly_data_id);pk"` // 数据ID
+	CreateTime        string  `orm:"column(create_time)"`             // 创建时间
+	ModifyTime        string  `orm:"column(modify_time)"`             // 修改时间
+	BaseFromLyIndexId int     `orm:"column(base_from_ly_index_id)"`   // 指标id
+	IndexCode         string  `orm:"column(index_code)"`              // 指标编码
+	DataTime          string  `orm:"column(data_time)"`               // 数据日期
+	Value             float64 `orm:"column(value)"`                   // 数据值
+}
+
+func init() {
+	orm.RegisterModel(new(BaseFromLyData))
+}
+
+// AddLyDataList 批量插入数据记录列表
+func AddLyDataList(items []BaseFromLyData) (err error) {
+	o := orm.NewOrmUsingDB("data")
+	_, err = o.InsertMulti(len(items), items)
+	return
+}
+
+// GetLyDataByIndexIdAndDataTime 根据指标id和数据日期查询数据
+func GetLyDataByIndexIdAndDataTime(indexId int, dataTime string) (items []BaseFromLyData, err error) {
+	o := orm.NewOrmUsingDB("data")
+	sql := `SELECT * FROM base_from_ly_data WHERE base_from_ly_index_id=? AND data_time=?`
+	_, err = o.Raw(sql, indexId, dataTime).QueryRows(&items)
+	return
+}
+
+// GetLyDataByIndexIdAndDataTimeYM 根据指标id和数据日期的年月查询数据
+func GetLyDataByIndexIdAndDataTimeYM(indexId int, dataTime string) (items []BaseFromLyData, err error) {
+	o := orm.NewOrmUsingDB("data")
+	sql := `SELECT * FROM base_from_ly_data WHERE base_from_ly_index_id=? AND data_time like ?`
+	_, err = o.Raw(sql, indexId, dataTime+"%").QueryRows(&items)
+	return
+}
+
+// UpdateLyDataById 根据主键id更新数据
+func UpdateLyDataById(dataId int, value float64) (err error) {
+	o := orm.NewOrmUsingDB("data")
+	sql := `UPDATE base_from_ly_data SET value=? WHERE base_from_ly_data_id=?`
+	_, err = o.Raw(sql, value, dataId).Exec()
+	return
+}
+
+// GetBaseFromLyDataByIndexCode 根据指标编码查询
+func GetBaseFromLyDataByIndexCode(condition string, pars []interface{}) (items []BaseFromLyData, err error) {
+	sql := `SELECT * FROM base_from_ly_data WHERE 1=1 `
+	o := orm.NewOrm()
+	if condition != "" {
+		sql += condition
+	}
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
+	return
+}

+ 57 - 0
models/base_from_ly_index.go

@@ -0,0 +1,57 @@
+// Package models
+// @Author gmy 2024/8/7 9:38:00
+package models
+
+import (
+	"errors"
+	"github.com/beego/beego/v2/client/orm"
+	"time"
+)
+
+type BaseFromLyIndex struct {
+	BaseFromLyIndexId    int    `orm:"column(base_from_ly_index_id);pk"` // 指标ID
+	CreateTime           string `orm:"column(create_time)"`              // 创建时间
+	ModifyTime           string `orm:"column(modify_time)"`              // 修改时间
+	BaseFromLyClassifyId int    `orm:"column(base_from_ly_classify_id)"` // 原始数据指标分类id
+	IndexCode            string `orm:"column(index_code)"`               // 指标编码
+	IndexName            string `orm:"column(index_name)"`               // 指标名称
+	Frequency            string `orm:"column(frequency)"`                // 频度
+	Unit                 string `orm:"column(unit)"`                     // 单位
+	EdbExist             int    `orm:"column(edb_exist)"`                // 指标库是否已添加:0-否;1-是
+}
+
+// 在 init 函数中注册模型
+func init() {
+	orm.RegisterModel(new(BaseFromLyIndex))
+}
+
+// AddLyIndexList 批量插入指标记录列表
+func AddLyIndexList(items []*BaseFromLyIndex) (err error) {
+	o := orm.NewOrmUsingDB("data")
+	_, err = o.InsertMulti(len(items), items)
+	return
+}
+
+// AddLyIndex 添加指标
+func AddLyIndex(item *BaseFromLyIndex) (int64, error) {
+	item.CreateTime = time.Now().Format("2006-01-02 15:04:05")
+	o := orm.NewOrmUsingDB("data")
+	id, err := o.Insert(item)
+	if err != nil {
+		return 0, err
+	}
+	return id, nil
+}
+
+// GetLyIndexByCode 查询指标编码是否存在
+func GetLyIndexByCode(indexCode string) (item *BaseFromLyIndex, err error) {
+	o := orm.NewOrmUsingDB("data")
+	sql := `SELECT * FROM base_from_ly_index WHERE index_code=?`
+	err = o.Raw(sql, indexCode).QueryRow(&item)
+
+	if errors.Is(err, orm.ErrNoRows) {
+		return nil, nil
+	}
+
+	return
+}

+ 46 - 0
models/base_from_ly_index_record.go

@@ -0,0 +1,46 @@
+// Package models
+// @Author gmy 2024/8/7 9:38:00
+package models
+
+import (
+	"errors"
+	"github.com/beego/beego/v2/client/orm"
+)
+
+type BaseFromLyIndexRecord struct {
+	BaseFromLyIndexRecordId int    `orm:"column(base_from_ly_index_record_id);pk"` // 指标记录ID
+	CreateTime              string `orm:"column(create_time)"`                     // 创建时间
+	ModifyTime              string `orm:"column(modify_time)"`                     // 修改时间
+	Product                 string `orm:"column(product)"`                         // 产品
+	Category                string `orm:"column(category)"`                        // 分类
+	Url                     string `orm:"column(url)"`                             // 指标页面地址
+	DataTime                string `orm:"column(data_time)"`                       // 数据日期
+}
+
+// 在 init 函数中注册模型
+func init() {
+	orm.RegisterModel(new(BaseFromLyIndexRecord))
+}
+
+// AddLyIndexRecord 添加指标记录
+func AddLyIndexRecord(item *BaseFromLyIndexRecord) (int64, error) {
+	o := orm.NewOrmUsingDB("data")
+	id, err := o.Insert(item)
+	if err != nil {
+		return 0, err
+	}
+	return id, nil
+}
+
+// GetLyIndexRecordByUrl 查询指标记录是否存在
+func GetLyIndexRecordByUrl(url string) (item *BaseFromLyIndexRecord, err error) {
+	o := orm.NewOrmUsingDB("data")
+	sql := `SELECT * FROM base_from_ly_index_record WHERE url=?`
+	err = o.Raw(sql, url).QueryRow(&item)
+
+	if errors.Is(err, orm.ErrNoRows) {
+		return nil, nil
+	}
+
+	return
+}

+ 1 - 35
models/base_from_ly.go → models/ebd_data_ly.go

@@ -1,40 +1,6 @@
-// @Author gmy 2024/8/13 16:10:00
+// @Author gmy 2024/9/14 16:13:00
 package models
 
-import (
-	"eta/eta_index_lib/utils"
-	"fmt"
-	"github.com/beego/beego/v2/client/orm"
-	"strconv"
-	"strings"
-	"time"
-)
-
-type BaseFromLyData struct {
-	BaseFromLyDataId  int     `orm:"column(edb_data_id);pk"`        // 数据ID
-	CreateTime        string  `orm:"column(create_time)"`           // 创建时间
-	ModifyTime        string  `orm:"column(modify_time)"`           // 修改时间
-	BaseFromLyIndexId int     `orm:"column(base_from_ly_index_id)"` // 指标id
-	IndexCode         string  `orm:"column(index_code)"`            // 指标编码
-	DataTime          string  `orm:"column(data_time)"`             // 数据日期
-	Value             float64 `orm:"column(value)"`                 // 数据值
-}
-
-func init() {
-	orm.RegisterModel(new(BaseFromLyData))
-}
-
-// GetBaseFromLyDataByIndexCode 根据指标编码查询
-func GetBaseFromLyDataByIndexCode(condition string, pars []interface{}) (items []BaseFromLyData, err error) {
-	sql := `SELECT * FROM base_from_ly_data WHERE 1=1 `
-	o := orm.NewOrm()
-	if condition != "" {
-		sql += condition
-	}
-	_, err = o.Raw(sql, pars...).QueryRows(&items)
-	return
-}
-
 // AddEdbDataFromLy 新增指标数据
 func AddEdbDataFromLy(edbCode string) (err error) {
 	o := orm.NewOrm()

+ 81 - 0
routers/commentsRouter.go

@@ -106,6 +106,69 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "AddLyDataList",
+            Router: `/add/ly/data/list`,
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "AddLyIndex",
+            Router: `/add/ly/index`,
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "AddLyIndexRecord",
+            Router: `/add/ly/index/record`,
+            AllowHTTPMethods: []string{"post"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "GetLyClassifyByName",
+            Router: `/get/ly/classify/by/name`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "GetLyDataByIndexIdAndDataTime",
+            Router: `/get/ly/data/by/index/id/and/data/time`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "GetLyDataByIndexIdAndDataTimeYM",
+            Router: `/get/ly/data/by/index/id/and/data/time/ym`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "GetLyIndexRecordByUrl",
+            Router: `/get/ly/index/record/by/url`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
         beego.ControllerComments{
             Method: "Refresh",
@@ -115,6 +178,24 @@ func init() {
             Filters: nil,
             Params: nil})
 
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "UpdateLyDataById",
+            Router: `/update/ly/data/by/id`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
+    beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromLyController"],
+        beego.ControllerComments{
+            Method: "UpdateLyEdbDataById",
+            Router: `/update/ly/edb/data/by/id`,
+            AllowHTTPMethods: []string{"get"},
+            MethodParams: param.Make(),
+            Filters: nil,
+            Params: nil})
+
     beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromTradeAnalysisController"] = append(beego.GlobalControllerRouter["eta/eta_index_lib/controllers:BaseFromTradeAnalysisController"],
         beego.ControllerComments{
             Method: "EdbRefresh",