|
@@ -160,7 +160,7 @@ type AddEdbInfoReq struct {
|
|
|
EndDate string `description:"终止日期"`
|
|
|
}
|
|
|
|
|
|
-func DeleteEdbInfoAndData(edbInfoId, source int) (err error) {
|
|
|
+func DeleteEdbInfoAndData(edbInfoId, source, subSource int) (err error) {
|
|
|
o := orm.NewOrmUsingDB("data")
|
|
|
to, err := o.Begin()
|
|
|
if err != nil {
|
|
@@ -181,8 +181,16 @@ func DeleteEdbInfoAndData(edbInfoId, source int) (err error) {
|
|
|
return
|
|
|
}
|
|
|
|
|
|
- // 删除指标数据
|
|
|
- tableName := GetEdbDataTableName(source)
|
|
|
+ var tableName string
|
|
|
+ if subSource == 0 {
|
|
|
+ // 删除指标数据
|
|
|
+ tableName = GetEdbDataTableName(source)
|
|
|
+ } else {
|
|
|
+ if source == utils.DATA_SOURCE_WIND {
|
|
|
+ tableName = "edb_data_wind_wsd"
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
if tableName != "" {
|
|
|
sql = ` DELETE FROM %s WHERE edb_info_id=? `
|
|
|
sql = fmt.Sprintf(sql, tableName)
|