Просмотр исходного кода

状态不选时,默认选择三种状态

abiao лет назад: 5
Родитель
Сommit
dab702b1ee
1 измененных файлов с 3 добавлено и 0 удалено
  1. 3 0
      go/gopath/src/fohow.com/apps/models/order_model/order_detail.go

+ 3 - 0
go/gopath/src/fohow.com/apps/models/order_model/order_detail.go

@@ -123,6 +123,9 @@ func GetStaticOrderDetails(bDateUnix, eDateUnix int64, state string, isSend bool
 	if len(state) > 0 {
 	if len(state) > 0 {
 		s := fmt.Sprintf("and o.status='%s'", state)
 		s := fmt.Sprintf("and o.status='%s'", state)
 		sql = strings.Join([]string{sql, s}, " ")
 		sql = strings.Join([]string{sql, s}, " ")
+	} else {
+		s := fmt.Sprintf("and o.status in('%s','%s','%s')", "processing", "dispatch", "complete")
+		sql = strings.Join([]string{sql, s}, " ")
 	}
 	}
 	s := "and ot.is_zeng=? group by ot.product_id order by product_id desc"
 	s := "and ot.is_zeng=? group by ot.product_id order by product_id desc"
 	sql = strings.Join([]string{sql, s}, " ")
 	sql = strings.Join([]string{sql, s}, " ")