|
@@ -196,6 +196,8 @@ type Edbinfo struct {
|
|
|
Sort int `orm:"column(sort)" description:"排序"`
|
|
|
ModifyTime string `description:"最近一次更新时间"`
|
|
|
IsJoinEdb int8 `description:"指标库是否已添加:0-否;1-是"`
|
|
|
+ StartDate string `description:"数据开始日期"`
|
|
|
+ EndDate string `description:"数据结束日期"`
|
|
|
}
|
|
|
|
|
|
func DeleteEdbinfoByTraceCodeList(tradeCodeList []string) (err error) {
|
|
@@ -260,6 +262,8 @@ type EdbinfoItem struct {
|
|
|
NoticeTime string `description:"通知时间"`
|
|
|
Mobile string `description:"录入者手机号"`
|
|
|
ModifyTime string `description:"最近一次更新时间"`
|
|
|
+ StartDate string `description:"数据开始日期"`
|
|
|
+ EndDate string `description:"数据结束日期"`
|
|
|
}
|
|
|
|
|
|
func GetEdbinfoItemList(condition string, pars []interface{}, startSize, pageSize int, mobile string, roleType int) (items []*EdbinfoItem, err error) {
|
|
@@ -1734,3 +1738,43 @@ func GetChildManualEdbClassifyByIdList(idList []int) (items []*EdbdataClassify,
|
|
|
|
|
|
return
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+type EdbinfoMaxMinDate struct {
|
|
|
+ MinDate string
|
|
|
+ MaxDate string
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+func GetEdbdataMaxMinDate(tradeCode string) (item EdbinfoMaxMinDate, err error) {
|
|
|
+ o := orm.NewOrmUsingDB("edb")
|
|
|
+
|
|
|
+ sql := ` SELECT MIN(DT) min_date,MAX(DT) max_date FROM edbdata WHERE TRADE_CODE = ? `
|
|
|
+ err = o.Raw(sql, tradeCode).QueryRow(&item)
|
|
|
+
|
|
|
+ return
|
|
|
+}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+func ModifyEdbinfoMaxMinDate(startDate, endDate, tradeCode string) (err error) {
|
|
|
+ o := orm.NewOrmUsingDB("edb")
|
|
|
+
|
|
|
+ sql := ` UPDATE edbinfo SET start_date = ?, end_date = ? WHERE TRADE_CODE = ? `
|
|
|
+ _, err = o.Raw(sql, startDate, endDate, tradeCode).Exec()
|
|
|
+
|
|
|
+ return
|
|
|
+}
|