Browse Source

Merge remote-tracking branch 'origin/eta/1.0.2' into debug

Roc 1 year ago
parent
commit
b69e527e63
1 changed files with 8 additions and 5 deletions
  1. 8 5
      controllers/data_manage/excel/excel_info.go

+ 8 - 5
controllers/data_manage/excel/excel_info.go

@@ -307,9 +307,6 @@ func (c *ExcelInfoController) List() {
 	keyword := c.GetString("Keyword")
 	adminId, _ := c.GetInt("AdminId")
 	source, _ := c.GetInt("Source")
-	if source <= 0 {
-		source = utils.EXCEL_DEFAULT
-	}
 
 	var total int
 	page := paging.GetPaging(currentIndex, pageSize, total)
@@ -326,8 +323,14 @@ func (c *ExcelInfoController) List() {
 	var condition string
 	var pars []interface{}
 
-	condition += " AND source = ? "
-	pars = append(pars, source)
+	// 如果没有传的话,那就是代表前三种表格
+	if source <= 0 {
+		condition += " AND source in (?,?,?) "
+		pars = append(pars, utils.EXCEL_DEFAULT, utils.TIME_TABLE, utils.MIXED_TABLE)
+	} else {
+		condition += " AND source = ? "
+		pars = append(pars, source)
+	}
 
 	// 筛选分类
 	if excelClassifyId > 0 {