zwxi 1 жил өмнө
parent
commit
7fcec01b61

+ 3 - 0
controllers/data_manage/smm_api.go

@@ -84,6 +84,9 @@ func (this *EdbInfoController) SmmApiList() {
 		return
 	}
 
+	for _, v := range indexList {
+		v.TypeAll = v.Type1 + "/" + v.Type2 + "/" + v.Type3
+	}
 
 	page := paging.GetPaging(currentIndex, pageSize, total)
 	var ret data_manage.BaseFromSmmIndexListResp

+ 29 - 3
models/data_manage/base_from_smm.go

@@ -73,7 +73,7 @@ type BaseFromSmmIndex struct {
 	Sort               int
 	CreateTime         time.Time
 	ModifyTime         time.Time
-	data_state         string
+	DataState          string
 	ReleaseTime        string
 	StartDate          string
 	EndDate            string
@@ -333,7 +333,7 @@ type SmmSingleDataResp struct {
 	Data               []*SmmIndexData
 }
 
-func GetSmmIndexDataList(condition, sortStr string, pars []interface{}, startSize, pageSize int) (items []*BaseFromSmmIndex, err error) {
+func GetSmmIndexDataList(condition, sortStr string, pars []interface{}, startSize, pageSize int) (items []*BaseFromSmmIndexItem, err error) {
 	sql := `select * FROM base_from_smm_index
                WHERE 1=1 `
 	if condition != "" {
@@ -358,6 +358,32 @@ func GetSmmIndexDataListCount(condition string, pars []interface{}) (total int,
 }
 
 type BaseFromSmmIndexListResp struct {
-	List   []*BaseFromSmmIndex
+	List   []*BaseFromSmmIndexItem
 	Paging *paging.PagingItem `description:"分页数据"`
 }
+
+type BaseFromSmmIndexItem struct {
+	BaseFromSmmIndexId int `orm:"column(base_from_smm_index_id);pk"`
+	ClassifyId         int
+	Interface          string
+	Name               string
+	IndexCode          string
+	IndexName          string
+	Type1              string `orm:"column(type_1)"`
+	Type2              string `orm:"column(type_2)"`
+	Type3              string `orm:"column(type_3)"`
+	Frequency          string
+	Unit               string
+	ApiStartTime       string
+	ApiUpdateTime      string
+	StartTime          string
+	FinishTime         string
+	Sort               int
+	CreateTime         string
+	ModifyTime         string
+	DataState          string
+	ReleaseTime        string
+	StartDate          string
+	EndDate            string
+	TypeAll            string
+}