|
@@ -322,8 +322,8 @@ type EdbDataList struct {
|
|
|
}
|
|
|
|
|
|
// GetEdbDataList 获取指标的数据(日期正序返回)
|
|
|
-func GetEdbDataList(source, endInfoId int, startDate, endDate string) (list []*EdbDataList, err error) {
|
|
|
- tableName := GetEdbDataTableName(source)
|
|
|
+func GetEdbDataList(source, subSource, endInfoId int, startDate, endDate string) (list []*EdbDataList, err error) {
|
|
|
+ tableName := GetEdbDataTableName(source, subSource)
|
|
|
if tableName == "" {
|
|
|
err = errors.New("无效的渠道:" + strconv.Itoa(source))
|
|
|
list = make([]*EdbDataList, 0)
|
|
@@ -355,8 +355,8 @@ type EdbDataListByUniqueCode struct {
|
|
|
Value float64 `description:"数据值"`
|
|
|
}
|
|
|
|
|
|
-func GetEdbDataListByByUniqueCode(source, endInfoId int, startDate, endDate string) (list []*EdbDataListByUniqueCode, err error) {
|
|
|
- tableName := GetEdbDataTableName(source)
|
|
|
+func GetEdbDataListByByUniqueCode(source, subSource, endInfoId int, startDate, endDate string) (list []*EdbDataListByUniqueCode, err error) {
|
|
|
+ tableName := GetEdbDataTableName(source, subSource)
|
|
|
if tableName == "" {
|
|
|
err = errors.New("无效的渠道:" + strconv.Itoa(source))
|
|
|
list = make([]*EdbDataListByUniqueCode, 0)
|
|
@@ -389,8 +389,8 @@ func GetEdbDataLunarList(endInfoId int, startDate, endDate string) (list []*EdbD
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func GetEdbDataListMinAndMax(source, endInfoId int, startDate, endDate string) (min_data, max_data float64, err error) {
|
|
|
- tableName := GetEdbDataTableName(source)
|
|
|
+func GetEdbDataListMinAndMax(source, subSource, endInfoId int, startDate, endDate string) (min_data, max_data float64, err error) {
|
|
|
+ tableName := GetEdbDataTableName(source, subSource)
|
|
|
sql := `SELECT min(value) AS min_data,max(value) AS max_data FROM %s WHERE edb_info_id=? `
|
|
|
var pars []interface{}
|
|
|
var condition string
|
|
@@ -1012,8 +1012,8 @@ func EditChartEnInfoAndEdbEnInfo(req *EditChartEnInfoReq) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
-func ModifyEdbDatadTimestamp(source, edbDataId int, dataTimestamp int64) (err error) {
|
|
|
- tableName := GetEdbDataTableName(source)
|
|
|
+func ModifyEdbDatadTimestamp(source, subSource, edbDataId int, dataTimestamp int64) (err error) {
|
|
|
+ tableName := GetEdbDataTableName(source, subSource)
|
|
|
sql := `UPDATE %s SET data_timestamp=? WHERE edb_data_id=? `
|
|
|
sql = fmt.Sprintf(sql, tableName)
|
|
|
o := orm.NewOrmUsingDB("data")
|