|
@@ -281,15 +281,22 @@ func GetMysteelChemicalIndexCount(condition string, pars []interface{}) (count i
|
|
}
|
|
}
|
|
|
|
|
|
// GetMysteelChemicalIndexList 根据分类id获取钢联化工频度数据列表
|
|
// GetMysteelChemicalIndexList 根据分类id获取钢联化工频度数据列表
|
|
-func GetMysteelChemicalIndexList(condition string, pars []interface{}, startSize, pageSize int) (items []*BaseFromMysteelChemicalIndex, err error) {
|
|
|
|
|
|
+func GetMysteelChemicalIndexList(condition string, pars []interface{}, startSize, pageSize int, orderDesc string) (items []*BaseFromMysteelChemicalIndex, err error) {
|
|
o := orm.NewOrmUsingDB("data")
|
|
o := orm.NewOrmUsingDB("data")
|
|
sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
|
|
sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE 1=1 `
|
|
|
|
|
|
if condition != "" {
|
|
if condition != "" {
|
|
sql += condition
|
|
sql += condition
|
|
}
|
|
}
|
|
- sql += ` ORDER BY base_from_mysteel_chemical_index_id ASC LIMIT ?,? `
|
|
|
|
|
|
+
|
|
|
|
+ if orderDesc == `` {
|
|
|
|
+ orderDesc = ` ASC `
|
|
|
|
+ }
|
|
|
|
+ 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, startSize, pageSize).QueryRows(&items)
|
|
|
|
+
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|
|
@@ -302,7 +309,7 @@ func GetMysteelChemicalIndexListGroupByUserId(edbIdList []string) (items []*Base
|
|
o := orm.NewOrmUsingDB("data")
|
|
o := orm.NewOrmUsingDB("data")
|
|
sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_index_id in (` + utils.GetOrmInReplace(num) + `) GROUP BY sys_user_id `
|
|
sql := ` SELECT * FROM base_from_mysteel_chemical_index WHERE base_from_mysteel_chemical_index_id in (` + utils.GetOrmInReplace(num) + `) GROUP BY sys_user_id `
|
|
_, err = o.Raw(sql, edbIdList).QueryRows(&items)
|
|
_, err = o.Raw(sql, edbIdList).QueryRows(&items)
|
|
-
|
|
|
|
|
|
+
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
|