|
@@ -413,6 +413,7 @@ func (this *ProductController) ProductList() {
|
|
|
pageSize, _ := this.GetInt("PageSize")
|
|
|
currentIndex, _ := this.GetInt("CurrentIndex")
|
|
|
sortType := this.GetString("SortType")
|
|
|
+ sortColumn := this.GetString("SortColumn")
|
|
|
KeyWord := this.GetString("KeyWord")
|
|
|
CreatedTime := this.GetString("CreatedTime")
|
|
|
UpdatedTime := this.GetString("UpdatedTime")
|
|
@@ -429,7 +430,13 @@ func (this *ProductController) ProductList() {
|
|
|
if KeyWord != "" {
|
|
|
condition += " AND title like '%" + KeyWord + "%'"
|
|
|
}
|
|
|
- sortCondition := " ORDER BY created_time "
|
|
|
+ var sortCondition string
|
|
|
+ if sortColumn == "" {
|
|
|
+ sortCondition = " ORDER BY created_time "
|
|
|
+ } else {
|
|
|
+ sortCondition = " ORDER BY " + sortColumn + " "
|
|
|
+ }
|
|
|
+
|
|
|
if sortType == "" {
|
|
|
sortType = "DESC"
|
|
|
}
|