Explorar o código

默认值处理

WH01243 hai 7 meses
pai
achega
7289769bf2
Modificáronse 1 ficheiros con 3 adicións e 3 borrados
  1. 3 3
      jyBXCore/rpc/service/operator.go

+ 3 - 3
jyBXCore/rpc/service/operator.go

@@ -794,7 +794,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
 	queryStr := ""
 	orderStr := ""
 	mysqlOrderStr := ""
-	if operator.Tag == 1 {
+	if operator.Tag == 0 {
 		if operator.Order == 0 {
 			orderStr = `{"publishtime":{"order":"desc"}}`
 			mysqlOrderStr = ` order by   publishtime desc`
@@ -802,7 +802,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
 			orderStr = `{"publishtime":{"order":"asc"}}`
 			mysqlOrderStr = ` order by   publishtime asc`
 		}
-	} else if operator.Tag == 2 {
+	} else if operator.Tag == 1 {
 		if operator.Order == 0 {
 			orderStr = `{"publishtime":{"order":"desc"}}`
 			mysqlOrderStr = ` order by   publishtime desc`
@@ -810,7 +810,7 @@ func SearchList(operator Operator) (int64, *[]map[string]interface{}, int64) {
 			orderStr = `{"expurasingtime":{"order":"asc"}}`
 			mysqlOrderStr = ` order by   expurasingtime asc`
 		}
-	} else {
+	} else if operator.Tag == 2 {
 		if operator.Order == 0 {
 			orderStr = `{"publishtime":{"order":"desc"}}`
 			mysqlOrderStr = ` order by   publishtime desc`