Browse Source

修改bug

hongze 6 months ago
parent
commit
15c4744a66
91 changed files with 405 additions and 225 deletions
  1. 5 2
      models/ai_summary/ai_summary.go
  2. 7 5
      models/business_conf.go
  3. 8 5
      models/business_conf_operation_record.go
  4. 2 2
      models/chart_permission.go
  5. 3 1
      models/data_manage/base_from_bloomberg_index.go
  6. 7 1
      models/data_manage/base_from_business_index.go
  7. 3 1
      models/data_manage/base_from_edb_mapping.go
  8. 4 1
      models/data_manage/base_from_oilchem.go
  9. 4 1
      models/data_manage/base_from_smm.go
  10. 8 4
      models/data_manage/base_from_ths_hf.go
  11. 4 1
      models/data_manage/base_from_ths_hf_classify.go
  12. 4 1
      models/data_manage/base_from_ths_hf_data.go
  13. 3 1
      models/data_manage/ccf_stock_classify.go
  14. 4 1
      models/data_manage/ccf_stock_excel.go
  15. 3 1
      models/data_manage/chart_edb_mapping.go
  16. 3 1
      models/data_manage/chart_framework.go
  17. 3 1
      models/data_manage/chart_framework_node.go
  18. 3 2
      models/data_manage/chart_info.go
  19. 3 1
      models/data_manage/com_trade_data.go
  20. 3 1
      models/data_manage/data_manage_permission/message.go
  21. 10 8
      models/data_manage/edb_info.go
  22. 3 1
      models/data_manage/edb_info_relation.go
  23. 3 1
      models/data_manage/edb_info_updates.go
  24. 10 4
      models/data_manage/excel/excel_info.go
  25. 3 1
      models/data_manage/factor_edb_series.go
  26. 3 1
      models/data_manage/factor_edb_series_calculate_data.go
  27. 3 1
      models/data_manage/factor_edb_series_calculate_data_qjjs.go
  28. 3 1
      models/data_manage/factor_edb_series_calculate_func.go
  29. 3 1
      models/data_manage/factor_edb_series_chart_mapping.go
  30. 3 1
      models/data_manage/factor_edb_series_mapping.go
  31. 3 1
      models/data_manage/future_good/future_good_edb_info_data.go
  32. 19 8
      models/data_manage/my_chart.go
  33. 9 4
      models/data_manage/mysteel_chemical_index.go
  34. 4 2
      models/data_manage/smm_data.go
  35. 6 2
      models/data_manage/supply_analysis/variety.go
  36. 7 4
      models/data_stat/edb_info_delete_log.go
  37. 5 2
      models/data_stat/edb_info_update_log.go
  38. 4 2
      models/data_stat/edb_info_update_stat.go
  39. 4 2
      models/data_stat/edb_source_stat.go
  40. 5 2
      models/en_classify_permission.go
  41. 9 6
      models/en_company_permission.go
  42. 4 2
      models/en_permission.go
  43. 4 2
      models/en_video_cover.go
  44. 5 2
      models/english_company.go
  45. 4 2
      models/english_policy_report.go
  46. 8 5
      models/english_report.go
  47. 8 4
      models/english_report_email.go
  48. 5 3
      models/english_report_email_log.go
  49. 16 7
      models/english_report_email_pv.go
  50. 4 2
      models/english_video.go
  51. 1 1
      models/fe_calendar/fe_calendar_matter.go
  52. 2 1
      models/manual_edb.go
  53. 4 2
      models/out_link.go
  54. 4 2
      models/ppt_english/ppt_english.go
  55. 7 5
      models/ppt_v2.go
  56. 1 1
      models/ppt_v2_grant.go
  57. 24 14
      models/report.go
  58. 8 8
      models/report_approve/report_approve.go
  59. 2 2
      models/report_approve/report_approve_flow.go
  60. 2 2
      models/report_approve/report_approve_message.go
  61. 2 2
      models/report_approve/report_approve_node.go
  62. 2 2
      models/report_approve/report_approve_record.go
  63. 8 4
      models/report_author.go
  64. 4 2
      models/report_v2.go
  65. 8 4
      models/sandbox/sandbox.go
  66. 4 2
      models/sandbox/sandbox_version.go
  67. 2 2
      models/semantic_analysis/sa_compare.go
  68. 2 2
      models/semantic_analysis/sa_compare_classify.go
  69. 1 1
      models/semantic_analysis/sa_compare_doc.go
  70. 2 2
      models/semantic_analysis/sa_compare_label.go
  71. 2 2
      models/semantic_analysis/sa_compare_search_keyword.go
  72. 2 2
      models/semantic_analysis/sa_doc.go
  73. 2 2
      models/semantic_analysis/sa_doc_classify.go
  74. 2 2
      models/semantic_analysis/sa_doc_section.go
  75. 2 2
      models/semantic_analysis/sa_label.go
  76. 1 1
      models/smart_report/smart_report.go
  77. 1 1
      models/smart_report/smart_report_save_log.go
  78. 1 1
      models/smart_report/smart_resource.go
  79. 2 2
      models/speech_recognition/speech_recognition.go
  80. 2 2
      models/speech_recognition/speech_recognition_api_log.go
  81. 2 2
      models/speech_recognition/speech_recognition_content.go
  82. 2 2
      models/speech_recognition/speech_recognition_menu.go
  83. 2 2
      models/speech_recognition/speech_recognition_tag.go
  84. 2 2
      models/speech_recognition/speech_recognition_tag_mapping.go
  85. 2 2
      models/speech_recognition/speech_recognition_tag_menu.go
  86. 2 2
      models/system/admin_verify_code_record.go
  87. 5 3
      models/system/sys_admin.go
  88. 4 2
      models/system/sys_role.go
  89. 6 4
      models/system/sys_role_admin.go
  90. 9 7
      models/target.go
  91. 1 1
      services/data/data_manage_permission/data_move.go

+ 5 - 2
models/ai_summary/ai_summary.go

@@ -130,13 +130,16 @@ func GetAiSummaryListByCondition(condition string, pars []interface{}, startSize
 	//	sql += condition
 	//}
 	//sql += " ORDER BY create_time DESC LIMIT ?,? "
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
 	sql := ` SELECT * FROM ai_summary WHERE 1=1 `
 	if condition != "" {
 		sql += condition
 	}
 	sql += " ORDER BY create_time DESC LIMIT ?,? "
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&item).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 7 - 5
models/business_conf.go

@@ -135,7 +135,7 @@ func (m *BusinessConf) GetItemById(id int) (item *BusinessConf, err error) {
 
 func (m *BusinessConf) GetItemByCondition(condition string, pars []interface{}) (item *BusinessConf, err error) {
 	sql := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s LIMIT 1`, m.TableName(), condition)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Find(&item).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&item).Error
 	//o := orm.NewOrm()
 	//sql := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s LIMIT 1`, m.TableName(), condition)
 	//err = o.Raw(sql, pars).QueryRow(&item)
@@ -144,7 +144,7 @@ func (m *BusinessConf) GetItemByCondition(condition string, pars []interface{})
 
 func (m *BusinessConf) GetCountByCondition(condition string, pars []interface{}) (count int, err error) {
 	sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Scan(&count).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Scan(&count).Error
 	//o := orm.NewOrm()
 	//sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
 	//err = o.Raw(sql, pars).QueryRow(&count)
@@ -162,7 +162,7 @@ func (m *BusinessConf) GetItemsByCondition(condition string, pars []interface{},
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s`, fields, m.TableName(), condition, order)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Find(&items).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	//o := orm.NewOrm()
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
 	return
@@ -179,9 +179,11 @@ func (m *BusinessConf) GetPageItemsByCondition(condition string, pars []interfac
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	//o := orm.NewOrm()
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 8 - 5
models/business_conf_operation_record.go

@@ -76,7 +76,7 @@ func (m *BusinessConfOperationRecord) GetItemByCondition(condition string, pars
 	//sql := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s LIMIT 1`, m.TableName(), condition)
 	//err = o.Raw(sql, pars).QueryRow(&item)
 	sql := fmt.Sprintf(`SELECT * FROM %s WHERE 1=1 %s LIMIT 1`, m.TableName(), condition)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).First(&item).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).First(&item).Error
 	return
 }
 
@@ -85,7 +85,7 @@ func (m *BusinessConfOperationRecord) GetCountByCondition(condition string, pars
 	//sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
 	//err = o.Raw(sql, pars).QueryRow(&count)
 	sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Scan(&count).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Scan(&count).Error
 	return
 }
 
@@ -100,7 +100,7 @@ func (m *BusinessConfOperationRecord) GetItemsByCondition(condition string, pars
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s`, fields, m.TableName(), condition, order)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Find(&items).Error
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	//sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s`, fields, m.TableName(), condition, order)
 	//o := orm.NewOrm()
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
@@ -119,7 +119,10 @@ func (m *BusinessConfOperationRecord) GetPageItemsByCondition(condition string,
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
 	//o := orm.NewOrm()
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }

+ 2 - 2
models/chart_permission.go

@@ -180,7 +180,7 @@ func (c *ChartPermission) GetItemsByCondition(condition string, pars []interface
 	//sql := `select * from chart_permission WHERE 1=1 ` + condition + ` order by sort asc, chart_permission_id asc`
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
 	sql := `select * from chart_permission WHERE 1=1 ` + condition + ` order by sort asc, chart_permission_id asc`
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -190,7 +190,7 @@ func (c *ChartPermission) GetItemByCondition(condition string, pars []interface{
 	//sql := `select * from chart_permission WHERE 1=1 ` + condition
 	//err = o.Raw(sql, pars).QueryRow(&item)
 	sql := `select * from chart_permission WHERE 1=1 ` + condition
-	err = global.DmSQL["rddp"].Raw(sql, pars).First(&item).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).First(&item).Error
 	return
 }
 

+ 3 - 1
models/data_manage/base_from_bloomberg_index.go

@@ -172,7 +172,9 @@ func (m *BaseFromBloombergIndex) GetPageItemsByCondition(condition string, pars
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 7 - 1
models/data_manage/base_from_business_index.go

@@ -132,7 +132,10 @@ func (m *BaseFromBusinessIndex) GetList(condition string, pars []interface{}, st
 		sql += condition
 	}
 	sql += ` order by a.base_from_business_index_id desc limit ?,? `
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Scan(&items).Error
 
 	return
 }
@@ -178,6 +181,9 @@ func (m *BaseFromBusinessIndex) GetPageItemsByCondition(condition string, pars [
 		sql += ` order by ` + orderRule
 	}
 	sql += ` limit ?,? `
+
+	//pars = append(pars, startSize)
+	//pars = append(pars, pageSize)
 	err = global.DmSQL["data"].Raw(sql, utils.DATA_SOURCE_BUSINESS, pars, startSize, pageSize).Scan(&items).Error
 
 	return

+ 3 - 1
models/data_manage/base_from_edb_mapping.go

@@ -155,7 +155,9 @@ func (m *BaseFromEdbMapping) GetPageItemsByCondition(condition string, pars []in
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 4 - 1
models/data_manage/base_from_oilchem.go

@@ -229,7 +229,10 @@ func GetOilchemIndexViewList(condition string, pars []interface{}, startSize, pa
 		sql += condition
 	}
 	sql += ` ORDER BY b.modify_time ASC LIMIT ?,? `
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 4 - 1
models/data_manage/base_from_smm.go

@@ -363,7 +363,10 @@ func GetSmmIndexDataList(condition, sortStr string, pars []interface{}, startSiz
 	sql += ` ORDER BY ` + sortStr
 	sql += `  limit ?,? `
 	o := global.DmSQL["data"]
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 8 - 4
models/data_manage/base_from_ths_hf.go

@@ -11,9 +11,9 @@ import (
 
 // TODO:有时间还是放在配置里面吧...
 var (
-	ThsHfPeriodArr = []int{1, 3, 5, 10, 15, 30, 60}                                                                                                                                // 时间周期
-	ThsHfCPSArr    = []string{"no", "forward1", "forward2", "forward3", "forward4", "backward1", "backward2", "backward3", "backward4"}                                            // 复权方式
-	ThsHfFillArr   = []string{"Original", "Previous", "Blank"}                                                                                                                     // 非交易间隔处理
+	ThsHfPeriodArr = []int{1, 3, 5, 10, 15, 30, 60}                                                                                                                                                          // 时间周期
+	ThsHfCPSArr    = []string{"no", "forward1", "forward2", "forward3", "forward4", "backward1", "backward2", "backward3", "backward4"}                                                                      // 复权方式
+	ThsHfFillArr   = []string{"Original", "Previous", "Blank"}                                                                                                                                               // 非交易间隔处理
 	ThsHfEdbCodeCn = map[string]string{"open": "开盘价", "close": "收盘价", "high": "最高价", "low": "最低价", "avgprice": "均价", "volume": "成交价", "amt": "成交额", "pct_chg": "涨跌幅", "oi": "持仓量"} // 可选指标代码对应中文
 )
 
@@ -203,7 +203,11 @@ func (m *BaseFromThsHfIndex) GetPageItemsByCondition(condition string, pars []in
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 4 - 1
models/data_manage/base_from_ths_hf_classify.go

@@ -166,7 +166,10 @@ func (m *BaseFromThsHfClassify) GetPageItemsByCondition(condition string, pars [
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 4 - 1
models/data_manage/base_from_ths_hf_data.go

@@ -155,7 +155,10 @@ func (m *BaseFromThsHfData) GetPageItemsByCondition(condition string, pars []int
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 1
models/data_manage/ccf_stock_classify.go

@@ -134,7 +134,9 @@ func (m *CCFStockClassify) GetPageItemsByCondition(condition string, pars []inte
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 4 - 1
models/data_manage/ccf_stock_excel.go

@@ -146,7 +146,10 @@ func (m *CCFStockExcel) GetPageItemsByCondition(condition string, pars []interfa
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 1
models/data_manage/chart_edb_mapping.go

@@ -141,7 +141,9 @@ func GetRelationEdbInfoListByCondition(condition string, pars []interface{}, sta
 	}
 	//sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	sql += " ORDER BY a.create_time DESC LIMIT ?,? "
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&item).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&item).Error
 
 	return
 }

+ 3 - 1
models/data_manage/chart_framework.go

@@ -137,7 +137,9 @@ func (m *ChartFramework) GetPageItemsByCondition(condition string, pars []interf
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 1
models/data_manage/chart_framework_node.go

@@ -108,7 +108,9 @@ func (m *ChartFrameworkNode) GetPageItemsByCondition(condition string, pars []in
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 2
models/data_manage/chart_info.go

@@ -1745,7 +1745,8 @@ func ChartInfoSearchByEmptyKeyWord(showSysId int, sourceList []int, noPermission
 
 	// 查找列表数据
 	sql := " SELECT *  " + baseSql + ` ORDER BY create_time DESC LIMIT ?,? `
-	basePars = append(basePars, startSize, pageSize)
+	basePars = append(basePars, startSize)
+	basePars = append(basePars, pageSize)
 	err = o.Raw(sql, basePars).Scan(&searchList).Error
 
 	return
@@ -2076,7 +2077,7 @@ func GetChartInfoListByCondition(condition string, pars []interface{}, startSize
 		sql += condition
 	}
 	sql += ` ORDER BY chart_info_id DESC LIMIT ?,? `
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 1
models/data_manage/com_trade_data.go

@@ -78,7 +78,9 @@ func GetComTradeList(condition string, pars []interface{}, startSize, pageSize i
 	}
 	sql += ` ORDER BY ` + orderBy
 	sql += `  limit ?,? `
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Scan(&list).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Scan(&list).Error
 
 	return
 }

+ 3 - 1
models/data_manage/data_manage_permission/message.go

@@ -123,7 +123,9 @@ func (m *DataPermissionMessage) GetPageItemsByCondition(condition string, pars [
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 10 - 8
models/data_manage/edb_info.go

@@ -440,11 +440,11 @@ type EdbInfoList struct {
 	ChartImage       string                  `description:"图表图片"`
 	RuleType         int                     `description:"预测规则,1:最新,2:固定值"`
 	FixedValue       float64                 `description:"固定值"`
-	DataList         []*EdbData              `description:"实际指标数据"`
-	PredictDataList  []*EdbData              `description:"预测指标数据"`
-	Button           EdbClassifyItemsButton  `description:"操作权限"`
+	DataList         []*EdbData              `gorm:"-" description:"实际指标数据"`
+	PredictDataList  []*EdbData              `gorm:"-" description:"预测指标数据"`
+	Button           EdbClassifyItemsButton  `gorm:"-" description:"操作权限"`
 	IsEnEdb          bool                    `description:"是否展示英文标识"`
-	DataInsertConfig EdbDataInsertConfigItem `description:"指标数据插入配置"`
+	DataInsertConfig EdbDataInsertConfigItem `gorm:"-" description:"指标数据插入配置"`
 	DataDateType     string                  `description:"数据日期类型,枚举值:交易日、自然日"`
 	EmptyType        int                     `description:"空值处理类型(0查找前后35天,1不计算,2前值填充,3后值填充,4等于0)"`
 	MaxEmptyType     int                     `description:"MAX、MIN公式空值处理类型(1、等于0;2、跳过空值)"`
@@ -517,7 +517,9 @@ func GetEdbDataListByCondition(condition string, pars []interface{}, source, sub
 	}
 	sql += ` ORDER BY data_time DESC `
 	sql += ` LIMIT ?,? `
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&item).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&item).Error
 
 	return
 }
@@ -1250,7 +1252,7 @@ func GetEdbInfoFilterList(condition string, pars []interface{}, startSize, pageS
 	}
 
 	sql = ` SELECT * FROM edb_info where 1=1 ` + condition + ` ORDER BY edb_info_id DESC  LIMIT ?,? `
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&list).Error
+	err = o.Raw(sql, pars...).Scan(&list).Error
 
 	return
 }
@@ -1329,7 +1331,7 @@ func GetEdbInfoListByCondition(condition string, pars []interface{}, startSize,
 	sql += orderDesc
 	sql += ` LIMIT ?,? `
 
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }
@@ -1618,7 +1620,7 @@ func GetEdbBaseInfoList(condition string, pars []interface{}, orderBy string, st
 		sql += ` ORDER BY edb_info_id ASC `
 	}
 	sql += `  LIMIT ?,? `
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 1
models/data_manage/edb_info_relation.go

@@ -300,7 +300,9 @@ SELECT count(edb_info_id) as relation_num, edb_info_id, max(relation_time) as re
 		sql += ` ORDER BY edb_info_id ASC `
 	}
 	sql += `  LIMIT ?,? `
-	err = o.Raw(sql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = o.Raw(sql, pars...).Scan(&items).Error
 
 	return
 }

+ 3 - 1
models/data_manage/edb_info_updates.go

@@ -95,7 +95,9 @@ func GetUpdatesList(condition string, pars []interface{}, startSize, pageSize in
 			WHERE 1=1 `
 	sql += condition
 	sql += ` LIMIT ?,? `
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Scan(&list).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Scan(&list).Error
 
 	return
 }

+ 10 - 4
models/data_manage/excel/excel_info.go

@@ -342,7 +342,7 @@ func GetNoContentExcelInfoListByCondition(condition string, pars []interface{},
 	//}
 	//
 	//sql += ` AND is_delete=0 ORDER BY excel_info_id DESC LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 
 	sql := `SELECT excel_info_id,excel_classify_id,excel_name AS excel_classify_name,
 	        unique_code,sys_user_id,sys_user_real_name,sort,is_join_permission FROM excel_info WHERE 1=1 `
@@ -351,7 +351,10 @@ func GetNoContentExcelInfoListByCondition(condition string, pars []interface{},
 	}
 
 	sql += ` AND is_delete=0 ORDER BY excel_info_id DESC LIMIT ?,? `
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -553,7 +556,7 @@ func GetNoContentExcelListByCondition(condition string, pars []interface{}, star
 	//	}
 	//	//sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	//	sql += " ORDER BY create_time DESC LIMIT ?,? "
-	//	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
+	//	_, err = o.Raw(sql, pars...).QueryRows(&item)
 
 	sql := ` SELECT excel_info_id,source,excel_type,excel_name,unique_code,excel_classify_id,sys_user_id,sys_user_real_name,excel_image,file_url,sort,create_time,modify_time,is_join_permission,update_user_id,update_user_real_name
 	FROM excel_info WHERE 1=1 AND is_delete=0 `
@@ -562,7 +565,10 @@ func GetNoContentExcelListByCondition(condition string, pars []interface{}, star
 	}
 	//sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	sql += " ORDER BY create_time DESC LIMIT ?,? "
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 3 - 1
models/data_manage/factor_edb_series.go

@@ -155,7 +155,9 @@ func (m *FactorEdbSeries) GetPageItemsByCondition(condition string, pars []inter
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 3 - 1
models/data_manage/factor_edb_series_calculate_data.go

@@ -154,7 +154,9 @@ func (m *FactorEdbSeriesCalculateData) GetPageItemsByCondition(condition string,
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 3 - 1
models/data_manage/factor_edb_series_calculate_data_qjjs.go

@@ -154,7 +154,9 @@ func (m *FactorEdbSeriesCalculateDataQjjs) GetPageItemsByCondition(condition str
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 3 - 1
models/data_manage/factor_edb_series_calculate_func.go

@@ -135,7 +135,9 @@ func (m *FactorEdbSeriesCalculateFunc) GetPageItemsByCondition(condition string,
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 3 - 1
models/data_manage/factor_edb_series_chart_mapping.go

@@ -172,7 +172,9 @@ func (m *FactorEdbSeriesChartMapping) GetPageItemsByCondition(condition string,
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 3 - 1
models/data_manage/factor_edb_series_mapping.go

@@ -145,7 +145,9 @@ func (m *FactorEdbSeriesMapping) GetPageItemsByCondition(condition string, pars
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 3 - 1
models/data_manage/future_good/future_good_edb_info_data.go

@@ -72,7 +72,9 @@ func GetFutureGoodEdbDataList(condition string, pars []interface{}, startSize, p
 		sql += condition
 	}
 	sql += `ORDER BY data_time desc,modify_time DESC LIMIT ?,?`
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Scan(&list).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Scan(&list).Error
 
 	return
 }

+ 19 - 8
models/data_manage/my_chart.go

@@ -21,7 +21,7 @@ func GetChartListByCondition(condition string, pars []interface{}, startSize, pa
 	//}
 	////sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	//sql += " ORDER BY create_time DESC LIMIT ?,? "
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
 
 	sql := ` SELECT * FROM chart_info WHERE 1=1 `
 	if condition != "" {
@@ -29,7 +29,9 @@ func GetChartListByCondition(condition string, pars []interface{}, startSize, pa
 	}
 	//sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	sql += " ORDER BY create_time DESC LIMIT ?,? "
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 
@@ -397,7 +399,7 @@ func GetMyChartListByCondition(condition string, pars []interface{}, startSize,
 	//	sql += condition
 	//}
 	//sql += " GROUP BY a.chart_info_id) AS f ORDER BY sort ASC,c_ctime desc LIMIT ?,? "
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
 
 	field := `a.my_chart_id,c.admin_id,c.sort,c.create_time as c_ctime,b.chart_info_id,b.chart_name,b.chart_name_en,b.chart_classify_id,b.sys_user_id,b.sys_user_real_name,b.unique_code,b.create_time,b.modify_time,b.date_type,b.start_date,b.end_date,b.is_set_name,b.edb_info_ids,b.chart_type,b.calendar,b.season_start_date,b.season_end_date,b.chart_image,b.edb_end_date,b.disabled,b.source,b.is_join_permission `
 	//MyChartClassifyName string `description:"分类名称,多个用英文逗号分割"`
@@ -411,7 +413,10 @@ func GetMyChartListByCondition(condition string, pars []interface{}, startSize,
 		sql += condition
 	}
 	sql += " GROUP BY a.chart_info_id) AS f ORDER BY sort ASC,c_ctime desc LIMIT ?,? "
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 
@@ -537,7 +542,7 @@ func GetRecommendChartListByCondition(condition string, pars []interface{}, star
 	//	sql += condition
 	//}
 	//sql += " ORDER BY a.create_time DESC LIMIT ?,? "
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
 
 	sql := ` SELECT b.* FROM my_chart AS a
 			INNER JOIN chart_info AS b ON a.chart_info_id=b.chart_info_id `
@@ -545,7 +550,10 @@ func GetRecommendChartListByCondition(condition string, pars []interface{}, star
 		sql += condition
 	}
 	sql += " ORDER BY a.create_time DESC LIMIT ?,? "
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 
@@ -1136,7 +1144,7 @@ func GetRelationChartListByCondition(condition string, pars []interface{}, start
 	//}
 	////sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	//sql += " ORDER BY a.create_time DESC LIMIT ?,? "
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
 
 	sql := ` SELECT a.* FROM chart_info AS a
 	WHERE 1=1 `
@@ -1145,7 +1153,10 @@ func GetRelationChartListByCondition(condition string, pars []interface{}, start
 	}
 	//sql += " ORDER BY sort ASC,chart_info_id DESC LIMIT ?,? "
 	sql += " ORDER BY a.create_time DESC LIMIT ?,? "
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 9 - 4
models/data_manage/mysteel_chemical_index.go

@@ -496,7 +496,7 @@ func GetMysteelChemicalIndexList(condition string, pars []interface{}, startSize
 	//sql += ` ORDER BY base_from_mysteel_chemical_index_id `
 	//sql += orderDesc
 	//sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 
 	sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
 
@@ -510,7 +510,10 @@ func GetMysteelChemicalIndexList(condition string, pars []interface{}, startSize
 	sql += ` ORDER BY base_from_mysteel_chemical_index_id `
 	sql += orderDesc
 	sql += ` LIMIT ?,? `
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -700,7 +703,7 @@ func GetMysteelChemicalBaseInfoList(condition string, pars []interface{}, orderB
 	//}
 	//sql += `  LIMIT ?,? `
 	//
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 
 	sql := ` SELECT base_from_mysteel_chemical_index_id as edb_info_id, base_from_mysteel_chemical_classify_id as classify_id,index_code,index_name,end_date,end_value,sys_user_id,sys_user_real_name,frequency,is_stop,terminal_code FROM base_from_mysteel_chemical_index WHERE 1=1  `
 	if condition != "" {
@@ -714,7 +717,9 @@ func GetMysteelChemicalBaseInfoList(condition string, pars []interface{}, orderB
 	}
 	sql += `  LIMIT ?,? `
 
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 4 - 2
models/data_manage/smm_data.go

@@ -329,7 +329,7 @@ func GetSmmBaseInfoList(condition string, pars []interface{}, orderBy string, st
 	//}
 	//sql += `  LIMIT ?,? `
 	//
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 
 	// 数量汇总
 	totalSql := ` SELECT count(1) FROM base_from_smm_index WHERE 1=1 `
@@ -354,7 +354,9 @@ func GetSmmBaseInfoList(condition string, pars []interface{}, orderBy string, st
 	}
 	sql += `  LIMIT ?,? `
 
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 6 - 2
models/data_manage/supply_analysis/variety.go

@@ -154,7 +154,9 @@ func (item Variety) GetListBySuperAdminPage(condition string, pars []interface{}
 	}
 	// 列表页数据
 	listSql := `SELECT * ` + baseSql + ` ORDER BY modify_time DESC,variety_id DESC LIMIT ?,?`
-	err = global.DmSQL["data"].Raw(listSql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(listSql, pars...).Scan(&items).Error
 
 	return
 }
@@ -177,7 +179,9 @@ func (item Variety) GetListByPage(condition string, pars []interface{}, startSiz
 
 	// 列表页数据
 	listSql := `SELECT * ` + baseSql + ` ORDER BY modify_time DESC,variety_id DESC LIMIT ?,?`
-	err = global.DmSQL["data"].Raw(listSql, pars, startSize, pageSize).Scan(&items).Error
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(listSql, pars...).Scan(&items).Error
 
 	return
 }

+ 7 - 4
models/data_stat/edb_info_delete_log.go

@@ -77,8 +77,8 @@ type EdbInfoDeleteLog struct {
 	EdbNameEn          string  `gorm:"column:edb_name_en;type:varchar(255);default:''"`                  // 英文指标名称
 	UnitEn             string  `gorm:"column:unit_en;type:varchar(20);default:''"`                       // 英文单位
 	ChartImage         string  `gorm:"column:chart_image;type:varchar(255);default:''"`                  // 图表图片
-	Calendar           string  `gorm:"column:calendar;type:varchar(16);default:公历"`                      // 公历/农历
-	DataDateType       string  `gorm:"column:data_date_type;type:varchar(32);default:交易日"`               // 数据日期类型,枚举值:交易日、自然日
+	Calendar           string  `gorm:"column:calendar;type:varchar(16);default:公历"`                    // 公历/农历
+	DataDateType       string  `gorm:"column:data_date_type;type:varchar(32);default:交易日"`            // 数据日期类型,枚举值:交易日、自然日
 	ManualSave         int     `gorm:"column:manual_save;type:tinyint(4);not null;default:0"`            // 是否手动保存过上下限:0-否;1-是
 	TerminalCode       string  `gorm:"column:terminal_code;type:varchar(255);default:''"`                // 终端编码,用于配置在机器上
 	CreateTime         string  `gorm:"index:create_time_idx;column:create_time;type:datetime"`           // 创建时间
@@ -141,8 +141,11 @@ func GetEdbDeleteLogByCondition(condition string, pars []interface{}, orderStr s
 	}
 
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 5 - 2
models/data_stat/edb_info_update_log.go

@@ -125,8 +125,11 @@ func GetEdbUpdateLogByCondition(condition string, pars []interface{}, orderStr s
 	}
 
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 4 - 2
models/data_stat/edb_info_update_stat.go

@@ -127,8 +127,10 @@ func GetEdbUpdateStatByCondition(condition string, pars []interface{}, orderStr
 	}
 
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 4 - 2
models/data_stat/edb_source_stat.go

@@ -77,8 +77,10 @@ func GetEdbSourceStatByCondition(condition string, pars []interface{}, orderStr
 	}
 
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 5 - 2
models/en_classify_permission.go

@@ -115,12 +115,15 @@ func (m *EnClassifyPermission) GetPageItemsByCondition(startSize, pageSize int,
 	//	return
 	//}
 	//sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
 	if err = global.DmSQL["rddp"].Raw(totalSql, pars).Scan(&total).Error; err != nil {
 		return
 	}
 	sql += ` LIMIT ?,?`
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 
 	return
 }

+ 9 - 6
models/en_company_permission.go

@@ -72,7 +72,7 @@ func (m *EnCompanyPermission) GetItemByCondition(condition string, pars []interf
 	sql += condition
 	sql += ` LIMIT 1`
 	//err = o.Raw(sql, pars).QueryRow(&item)
-	err = global.DmSQL["rddp"].Raw(sql, pars).First(&item).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).First(&item).Error
 	return
 }
 
@@ -80,7 +80,7 @@ func (m *EnCompanyPermission) GetCountByCondition(condition string, pars []inter
 	//o := orm.NewOrmUsingDB("rddp")
 	sql := fmt.Sprintf(`SELECT COUNT(1) FROM %s WHERE 1=1 %s`, m.TableName(), condition)
 	//err = o.Raw(sql, pars).QueryRow(&count)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
 	return
 }
 
@@ -96,7 +96,7 @@ func (m *EnCompanyPermission) GetItemsByCondition(condition string, pars []inter
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s`, fields, m.TableName(), condition, order)
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -113,12 +113,15 @@ func (m *EnCompanyPermission) GetPageItemsByCondition(startSize, pageSize int, c
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s`, fields, m.TableName(), condition, order)
 	totalSql := `SELECT COUNT(1) total FROM (` + sql + `) z`
 	//if err = o.Raw(totalSql, pars).QueryRow(&total); err != nil {
-	if err = global.DmSQL["rddp"].Raw(totalSql, pars).Scan(&total).Error; err != nil {
+	if err = global.DmSQL["rddp"].Raw(totalSql, pars...).Scan(&total).Error; err != nil {
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 4 - 2
models/en_permission.go

@@ -128,8 +128,10 @@ func (m *EnPermission) GetPageItemsByCondition(startSize, pageSize int, conditio
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 4 - 2
models/en_video_cover.go

@@ -59,8 +59,10 @@ func GetEnglishVideoCoverPageList(condition string, pars []interface{}, orderRul
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 5 - 2
models/english_company.go

@@ -196,8 +196,11 @@ WHERE
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 4 - 2
models/english_policy_report.go

@@ -128,8 +128,10 @@ func GetEnglishPolicyReportList(condition string, pars []interface{}, startSize,
 		sql += condition
 	}
 	sql += `ORDER BY  publish_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 8 - 5
models/english_report.go

@@ -310,7 +310,7 @@ func GetEnglishReportListCount(condition string, pars []interface{}, companyType
 		sql += condition
 	}
 	//err = oRddp.Raw(sql, pars).QueryRow(&count)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
 	return
 }
 
@@ -335,8 +335,11 @@ func GetEnglishReportList(condition string, pars []interface{}, companyType stri
 	}
 	// 排序:1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过
 	sql += ` ORDER BY FIELD(state,3,1,4,5,6,2), modify_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -348,7 +351,7 @@ func GetEnglishReportByCondition(condition string, pars []interface{}) (items []
 		sql += condition
 	}
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -360,7 +363,7 @@ func GetEnglishReportCountByCondition(condition string, pars []interface{}) (cou
 		sql += condition
 	}
 	//err = o.Raw(sql, pars).QueryRow(&count)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
 	return
 }
 

+ 8 - 4
models/english_report_email.go

@@ -138,8 +138,10 @@ WHERE a.is_deleted = 0 `
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 
@@ -222,8 +224,10 @@ func GetEnglishCompanyViewPageList(condition string, pars []interface{}, order s
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 5 - 3
models/english_report_email_log.go

@@ -71,7 +71,7 @@ func GetEnglishReportEmailLogList(condition string, pars []interface{}) (list []
 		sql += condition
 	}
 	//_, err = o.Raw(sql, pars).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&list).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 
@@ -109,8 +109,10 @@ func GetEnglishReportEmailLogPageList(condition string, pars []interface{}, orde
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 16 - 7
models/english_report_email_pv.go

@@ -75,8 +75,10 @@ func GetEnglishReportEmailPvPageList(condition string, pars []interface{}, start
 		return
 	}
 	sql += ` ORDER BY recent_click_time DESC LIMIT ?,?`
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
 	return
 }
 
@@ -102,8 +104,11 @@ func GetEnglishReportEmailUvPageList(condition string, pars []interface{}, start
 		return
 	}
 	sql += ` ORDER BY recent_click_time DESC LIMIT ?,?`
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
 	return
 }
 
@@ -142,14 +147,18 @@ func GetEnglishEmailViewPageList(condition string, pars []interface{}, orderRule
 
 	totalSQl := `SELECT COUNT(1) total FROM (` + sql + `) z`
 	//if err = o.Raw(totalSQl, pars).QueryRow(&total); err != nil {
-	if err = global.DmSQL["rddp"].Raw(totalSQl, pars).Scan(&total).Error; err != nil {
+	if err = global.DmSQL["rddp"].Raw(totalSQl, pars...).Scan(&total).Error; err != nil {
 		return
 	}
 	if orderRule != `` {
 		sql += orderRule
 	}
 	sql += ` LIMIT ?,?`
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
 	return
 }

+ 4 - 2
models/english_video.go

@@ -212,8 +212,10 @@ func GetEnglishVideoList(condition string, pars []interface{}, startSize, pageSi
 		sql += condition
 	}
 	sql += `ORDER BY  modify_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 1 - 1
models/fe_calendar/fe_calendar_matter.go

@@ -199,7 +199,7 @@ func (m *FeCalendarMatter) GetItemsByCondition(condition string, pars []interfac
 //		order = ` ORDER BY ` + orderRule
 //	}
 //	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-//	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+//	_, err = o.Raw(sql, pars...).QueryRows(&items)
 //	return
 //}
 

+ 2 - 1
models/manual_edb.go

@@ -114,7 +114,8 @@ func GetEdbInfoList(condition string, pars []interface{}, startSize, pageSize in
 
 	if pageSize > 0 {
 		sql += ` LIMIT ?,? `
-		pars = append(pars, startSize, pageSize)
+		pars = append(pars, startSize)
+		pars = append(pars, pageSize)
 	}
 
 	//_, err = o.Raw(sql, pars).QueryRows(&items)

+ 4 - 2
models/out_link.go

@@ -117,7 +117,9 @@ func (ol *OutLink) GetPageItemsByCondition(startSize, pageSize int, condition st
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }

+ 4 - 2
models/ppt_english/ppt_english.go

@@ -113,8 +113,10 @@ func GetPptEnglishList(condition string, pars []interface{}, startSize, pageSize
 	//
 	sql += `ORDER BY modify_time DESC LIMIT ?,?`
 	//sql += `ORDER BY create_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 7 - 5
models/ppt_v2.go

@@ -69,8 +69,10 @@ func GetPptV2List(condition string, pars []interface{}, startSize, pageSize int)
 	//
 	sql += `ORDER BY modify_time DESC LIMIT ?,?`
 	//sql += `ORDER BY create_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -84,7 +86,7 @@ func GetPptV2ByCondition(condition string, pars []interface{}) (items []*PptV2,
 	sql += `ORDER BY modify_time DESC`
 	//sql += `ORDER BY create_time DESC LIMIT ?,?`
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -95,7 +97,7 @@ func GetPptV2ListCount(condition string, pars []interface{}) (count int, err err
 		sql += condition
 	}
 	//err = o.Raw(sql, pars).QueryRow(&count)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Scan(&count).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Scan(&count).Error
 	return
 }
 
@@ -306,7 +308,7 @@ func GetAllPptV2List(condition string, pars []interface{}) (items []*PptV2Item,
 	//
 	sql += `ORDER BY modify_time DESC `
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 1 - 1
models/ppt_v2_grant.go

@@ -150,7 +150,7 @@ func GetGrantList(condition string, pars []interface{}) (list []*PptV2InfoGrantI
 
 	sql += ` GROUP BY a.ppt_id ORDER BY a.modify_time DESC `
 	//_, err = o.Raw(sql, pars).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars).Find(&list).Error
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 24 - 14
models/report.go

@@ -196,8 +196,10 @@ func GetReportListV1(condition string, pars []interface{}, startSize, pageSize i
 	}
 	// 排序:1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过
 	sql += `ORDER BY FIELD(state,3,1,4,5,6,2), modify_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -263,8 +265,10 @@ func GetReportListByGrant(condition string, pars []interface{}, startSize, pageS
 	}
 	// 排序:1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过
 	sql += ` GROUP BY a.id ORDER BY FIELD(state,3,1,4,5,6,2), a.modify_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -291,8 +295,10 @@ func GetReportList(condition string, pars []interface{}, startSize, pageSize int
 	}
 	// 排序:1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过
 	sql += `ORDER BY FIELD(state,3,1,4,5,6,2), modify_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -1059,8 +1065,10 @@ WHERE
 		sql += condition
 	}
 	sql += ` ORDER BY  publish_time DESC , title ASC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 
@@ -1092,8 +1100,10 @@ WHERE
 		sql += orderBy
 	}
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 
@@ -1230,8 +1240,8 @@ func GetPageReportList(condition string, pars []interface{}, startSize, pageSize
 		return
 	}
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -1412,8 +1422,8 @@ func GetReportByCondition(condition string, pars []interface{}, fieldArr []strin
 	sql += order
 	if isPage {
 		sql += ` LIMIT ?,?`
-		//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-		err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+		//_, err = o.Raw(sql, pars...).QueryRows(&items)
+		err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	} else {
 		//_, err = o.Raw(sql, pars).QueryRows(&items)
 		err = global.DmSQL["rddp"].Raw(sql, pars).Find(&items).Error

+ 8 - 8
models/report_approve/report_approve.go

@@ -202,8 +202,8 @@ func (m *ReportApprove) GetPageItemsByCondition(condition string, pars []interfa
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -337,8 +337,8 @@ func GetApprovingReportApprovePageList(cond string, pars []interface{}, orderRul
 		JOIN report_approve AS b ON a.report_approve_id = b.report_approve_id AND a.node_id = b.curr_node_id
 		WHERE 1 = 1 %s %s
 		LIMIT ?,?`, cond, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -367,8 +367,8 @@ func GetApprovedReportApprovePageList(cond string, pars []interface{}, orderRule
 		JOIN report_approve AS b ON a.report_approve_id = b.report_approve_id
 		WHERE 1 = 1 %s %s
 		LIMIT ?,?`, cond, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -390,8 +390,8 @@ func GetApplyReportApprovePageList(cond string, pars []interface{}, orderRule st
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT a.* FROM report_approve AS a WHERE 1 = 1 %s %s LIMIT ?,?`, cond, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/report_approve/report_approve_flow.go

@@ -170,8 +170,8 @@ func (m *ReportApproveFlow) GetPageItemsByCondition(condition string, pars []int
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/report_approve/report_approve_message.go

@@ -171,8 +171,8 @@ func (m *ReportApproveMessage) GetPageItemsByCondition(condition string, pars []
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/report_approve/report_approve_node.go

@@ -166,8 +166,8 @@ func (m *ReportApproveNode) GetPageItemsByCondition(condition string, pars []int
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/report_approve/report_approve_record.go

@@ -205,8 +205,8 @@ func (m *ReportApproveRecord) GetPageItemsByCondition(condition string, pars []i
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 8 - 4
models/report_author.go

@@ -26,14 +26,18 @@ func GetReportAuthorList(condition string, pars []interface{}, startSize, pageSi
 
 	totalSql := ` SELECT count(1) total FROM ` + baseSql
 	//err = o.Raw(totalSql, pars).QueryRow(&total)
-	err = global.DmSQL["rddp"].Raw(totalSql, pars).Scan(&total).Error
+	err = global.DmSQL["rddp"].Raw(totalSql, pars...).Scan(&total).Error
 	if err != nil {
 		return
 	}
 
 	sql := ` SELECT * FROM ` + baseSql + ` ORDER BY id desc LIMIT ?,? `
-	//	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//	_, err = o.Raw(sql, pars...).QueryRows(&items)
+
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -46,7 +50,7 @@ func GetReportAuthorCount(condition string, pars []interface{}) (total int, err
 		totalSql += condition
 	}
 	//err = o.Raw(totalSql, pars).QueryRow(&total)
-	err = global.DmSQL["rddp"].Raw(totalSql, pars).Scan(&total).Error
+	err = global.DmSQL["rddp"].Raw(totalSql, pars...).Scan(&total).Error
 	return
 }
 

+ 4 - 2
models/report_v2.go

@@ -390,8 +390,10 @@ func GetReportListByAuthorized(condition string, pars []interface{}, startSize,
 	}
 	// 排序:1:未发布;2:已发布;3-待提交;4-待审批;5-已驳回;6-已通过
 	sql += ` GROUP BY a.id ORDER BY  report_create_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["rddp"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["rddp"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 8 - 4
models/sandbox/sandbox.go

@@ -228,8 +228,10 @@ func GetList(condition string, pars []interface{}, startSize, pageSize int) (tot
 		return
 	}
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 
@@ -306,8 +308,10 @@ func GetSandboxListByCondition(condition string, pars []interface{}, startSize,
 		sql += condition
 	}
 	sql += " ORDER BY create_time DESC LIMIT ?,? "
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&item)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&item).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&item)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&item).Error
 	return
 }
 

+ 4 - 2
models/sandbox/sandbox_version.go

@@ -126,8 +126,10 @@ func GetVersionList(condition string, pars []interface{}, startSize, pageSize in
 		return
 	}
 	sql += ` LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DmSQL["data"].Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["data"].Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_compare.go

@@ -151,8 +151,8 @@ func (m *SaCompare) GetPageItemsByCondition(startSize, pageSize int, condition s
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_compare_classify.go

@@ -134,8 +134,8 @@ func (m *SaCompareClassify) GetPageItemsByCondition(startSize, pageSize int, con
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 1 - 1
models/semantic_analysis/sa_compare_doc.go

@@ -110,7 +110,7 @@ func (m *SaCompareDoc) GetItemsByCondition(condition string, pars []interface{},
 //		return
 //	}
 //	sql += ` LIMIT ?,?`
-//	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+//	_, err = o.Raw(sql, pars...).QueryRows(&items)
 //	return
 //}
 

+ 2 - 2
models/semantic_analysis/sa_compare_label.go

@@ -175,8 +175,8 @@ func (m *SaCompareLabel) GetPageItemsByCondition(startSize, pageSize int, condit
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_compare_search_keyword.go

@@ -127,8 +127,8 @@ func (m *SaCompareSearchKeyword) GetPageItemsByCondition(startSize, pageSize int
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_doc.go

@@ -159,8 +159,8 @@ func (m *SaDoc) GetPageItemsByCondition(startSize, pageSize int, condition strin
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_doc_classify.go

@@ -138,8 +138,8 @@ func (m *SaDocClassify) GetPageItemsByCondition(startSize, pageSize int, conditi
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_doc_section.go

@@ -124,8 +124,8 @@ func (m *SaDocSection) GetPageItemsByCondition(startSize, pageSize int, conditio
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/semantic_analysis/sa_label.go

@@ -134,8 +134,8 @@ func (m *SaLabel) GetPageItemsByCondition(startSize, pageSize int, condition str
 		return
 	}
 	sql += ` LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 1 - 1
models/smart_report/smart_report.go

@@ -165,7 +165,7 @@ func (m *SmartReport) GetPageItemsByCondition(condition string, pars []interface
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 1 - 1
models/smart_report/smart_report_save_log.go

@@ -117,6 +117,6 @@ func (m *SmartReportSaveLog) GetPageItemsByCondition(condition string, pars []in
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }

+ 1 - 1
models/smart_report/smart_resource.go

@@ -79,7 +79,7 @@ func (m *SmartReportResource) GetPageItemsByCondition(condition string, pars []i
 	order := ` ORDER BY create_time DESC`
 
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
+	_, err = o.Raw(sql, pars...).QueryRows(&items)
 	return
 }
 

+ 2 - 2
models/speech_recognition/speech_recognition.go

@@ -204,8 +204,8 @@ func (m *SpeechRecognition) GetPageItemsByCondition(condition string, pars []int
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/speech_recognition/speech_recognition_api_log.go

@@ -173,7 +173,7 @@ func (m *SpeechRecognitionApiLog) GetPageItemsByCondition(condition string, pars
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }

+ 2 - 2
models/speech_recognition/speech_recognition_content.go

@@ -165,8 +165,8 @@ func (m *SpeechRecognitionContent) GetPageItemsByCondition(condition string, par
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/speech_recognition/speech_recognition_menu.go

@@ -170,8 +170,8 @@ func (m *SpeechRecognitionMenu) GetPageItemsByCondition(condition string, pars [
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/speech_recognition/speech_recognition_tag.go

@@ -159,8 +159,8 @@ func (m *SpeechRecognitionTag) GetPageItemsByCondition(condition string, pars []
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/speech_recognition/speech_recognition_tag_mapping.go

@@ -140,8 +140,8 @@ func (m *SpeechRecognitionTagMapping) GetPageItemsByCondition(condition string,
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/speech_recognition/speech_recognition_tag_menu.go

@@ -170,8 +170,8 @@ func (m *SpeechRecognitionTagMenu) GetPageItemsByCondition(condition string, par
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 2 - 2
models/system/admin_verify_code_record.go

@@ -146,7 +146,7 @@ func (m *AdminVerifyCodeRecord) GetPageItemsByCondition(condition string, pars [
 		order = ` ORDER BY ` + orderRule
 	}
 	sql := fmt.Sprintf(`SELECT %s FROM %s WHERE 1=1 %s %s LIMIT ?,?`, fields, m.TableName(), condition, order)
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }

+ 5 - 3
models/system/sys_admin.go

@@ -53,8 +53,9 @@ func GetSysuserList(condition string, pars []interface{}, startSize, pageSize in
 		sql += condition
 	}
 	sql += `ORDER BY enabled DESC, last_updated_time DESC, created_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	pars = append(pars, startSize, pageSize)
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
 	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
@@ -396,7 +397,8 @@ func GetSysAdminList(condition string, pars []interface{}, fieldArr []string, or
 	sql := fmt.Sprintf(`SELECT %s FROM "admin" WHERE 1=1 %s ORDER BY %s`, fields, condition, order)
 	// o := orm.NewOrm()
 	//_, err = o.Raw(sql, pars).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars).Find(&items).Error
+
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 4 - 2
models/system/sys_role.go

@@ -113,8 +113,10 @@ func GetSysRoleList(condition string, pars []interface{}, startSize, pageSize in
 		sql += condition
 	}
 	sql += `ORDER BY modify_time DESC LIMIT ?,?`
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&items).Error
 	return
 }
 

+ 6 - 4
models/system/sys_role_admin.go

@@ -76,8 +76,10 @@ where 1=1`
 		sql += condition
 	}
 	sql += ` ORDER BY s.id DESC limit ?, ?`
-	//_, err = orm.NewOrm().Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = orm.NewOrm().Raw(sql, pars...).QueryRows(&list)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&list).Error
 	return
 }
 
@@ -174,8 +176,8 @@ func GetEnglishAuthRoleAdminList(condition string, pars []interface{}, startSize
 	}
 
 	sql += ` ORDER BY s.create_time DESC,s.admin_id ASC LIMIT ?,? `
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&list)
-	err = global.DEFAULT_DmSQL.Raw(sql, pars, startSize, pageSize).Find(&list).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&list)
+	err = global.DEFAULT_DmSQL.Raw(sql, pars...).Find(&list).Error
 	return
 }
 

+ 9 - 7
models/target.go

@@ -42,8 +42,10 @@ func GetDataList(condition string, pars []interface{}, startSize, pageSize int)
 	}
 	sql += ` order by c.DT desc limit ?,? `
 	//o := orm.NewOrmUsingDB("edb")
-	//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-	err = global.DmSQL["edb"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+	//_, err = o.Raw(sql, pars...).QueryRows(&items)
+	pars = append(pars, startSize)
+	pars = append(pars, pageSize)
+	err = global.DmSQL["edb"].Raw(sql, pars...).Find(&items).Error
 	return
 }
 
@@ -57,7 +59,7 @@ func GetDataListCount(condition string, pars []interface{}) (count int, err erro
 	}
 	//o := orm.NewOrmUsingDB("edb")
 	//err = o.Raw(sql, pars).QueryRow(&count)
-	err = global.DmSQL["edb"].Raw(sql, pars).Scan(&count).Error
+	err = global.DmSQL["edb"].Raw(sql, pars...).Scan(&count).Error
 	return
 }
 
@@ -235,7 +237,7 @@ func GetEdbinfoListCount(condition string, pars []interface{}, mobile string, ro
 			sql += condition
 		}
 		//err = o.Raw(sql, pars).QueryRow(&count)
-		err = global.DmSQL["edb"].Raw(sql, pars).Scan(&count).Error
+		err = global.DmSQL["edb"].Raw(sql, pars...).Scan(&count).Error
 
 	}
 	return
@@ -272,7 +274,7 @@ func GetEdbinfoItemList(condition string, pars []interface{}, startSize, pageSiz
 			sql += condition
 		}
 		sql += ` ORDER BY a.create_date DESC LIMIT ?,? `
-		//_, err = o.Raw(sql, mobile, pars, startSize, pageSize).QueryRows(&items)
+		//_, err = o.Raw(sql, mobile, pars...).QueryRows(&items)
 		err = global.DmSQL["edb"].Raw(sql, mobile, pars, startSize, pageSize).Find(&items).Error
 	} else {
 		sql = `SELECT DISTINCT a.*,b.classify_name FROM edbinfo AS a
@@ -282,8 +284,8 @@ func GetEdbinfoItemList(condition string, pars []interface{}, startSize, pageSiz
 			sql += condition
 		}
 		sql += ` ORDER BY a.create_date DESC LIMIT ?,? `
-		//_, err = o.Raw(sql, pars, startSize, pageSize).QueryRows(&items)
-		err = global.DmSQL["edb"].Raw(sql, pars, startSize, pageSize).Find(&items).Error
+		//_, err = o.Raw(sql, pars...).QueryRows(&items)
+		err = global.DmSQL["edb"].Raw(sql, pars...).Find(&items).Error
 	}
 	return
 }

+ 1 - 1
services/data/data_manage_permission/data_move.go

@@ -230,12 +230,12 @@ func GetMoveEdbChartList(source, subSource, userId int, keyword, classify string
 		if err != nil {
 			return
 		}
+
 		tmpList, tmpErr := models.GetEdbinfoItemList(condition, pars, startSize, pageSize, "", 0)
 		if tmpErr != nil {
 			err = tmpErr
 			return
 		}
-
 		if len(tmpList) > 0 {
 			adminIdList := make([]int, 0)
 			for _, v := range tmpList {