DengBiao преди 9 месеца
родител
ревизия
795a7f110a
променени са 1 файла, в които са добавени 6 реда и са изтрити 6 реда
  1. +6
    -6
      app/customer/svc/order/svc_central_kitchen_for_school_order.go

+ 6
- 6
app/customer/svc/order/svc_central_kitchen_for_school_order.go Целия файл

@@ -37,27 +37,27 @@ func OrderList(req md.CentralKitchenForSchoolOrderListReq, platform string) (m [

func OrderStatistic(req md.CentralKitchenForSchoolOrderListReq, platform string) (total float64, err error) {
var sql = fmt.Sprintf("SELECT SUM(total_price) AS sum_total FROM central_kitchen_for_school_package_ord where "+
"user_identity_id = '%d' and ord_state = '%d'", req.UserIdentityId, req.OrdState)
"user_identity_id = '%d' and ord_state = '%d' and state != 2", req.UserIdentityId, req.OrdState)
if req.StartDate != "" && req.EndDate != "" {
sql = fmt.Sprintf("SELECT SUM(total_price) AS sum_total FROM central_kitchen_for_school_package_ord where "+
"user_identity_id = '%d' and create_at >= '%s' And create_at <= '%s' and ord_state = '%d'", req.UserIdentityId, req.StartDate, req.EndDate, req.OrdState)
"user_identity_id = '%d' and create_at >= '%s' And create_at <= '%s' and ord_state = '%d' and state != 2", req.UserIdentityId, req.StartDate, req.EndDate, req.OrdState)
}
if req.OrdState == enum.CentralKitchenForSchoolPackageOrdOrdStateForWait {
if platform == "alipay_applet" {
sql = fmt.Sprintf("SELECT SUM(total_price) AS sum_total FROM central_kitchen_for_school_package_ord where "+
"user_identity_id = '%d' and ord_state = '%d' and pay_way = '%d'", req.UserIdentityId, req.OrdState, enum2.PayWayForAli)
"user_identity_id = '%d' and ord_state = '%d' and pay_way = '%d' and state != 2", req.UserIdentityId, req.OrdState, enum2.PayWayForAli)

if req.StartDate != "" && req.EndDate != "" {
sql = fmt.Sprintf("SELECT SUM(total_price) AS sum_total FROM central_kitchen_for_school_package_ord where "+
"user_identity_id = '%d' and create_at >= '%s' And create_at <= '%s' and ord_state = '%d' and pay_way = '%d'", req.UserIdentityId, req.StartDate, req.EndDate, req.OrdState, enum2.PayWayForAli)
"user_identity_id = '%d' and create_at >= '%s' And create_at <= '%s' and ord_state = '%d' and pay_way = '%d' and state != 2", req.UserIdentityId, req.StartDate, req.EndDate, req.OrdState, enum2.PayWayForAli)
}
}
if platform == "wx_applet" {
sql = fmt.Sprintf("SELECT SUM(total_price) AS sum_total FROM central_kitchen_for_school_package_ord where "+
"user_identity_id = '%d' and ord_state = '%d' and pay_way = '%d'", req.UserIdentityId, req.OrdState, enum2.PayWayForWx)
"user_identity_id = '%d' and ord_state = '%d' and pay_way = '%d' and state != 2", req.UserIdentityId, req.OrdState, enum2.PayWayForWx)
if req.StartDate != "" && req.EndDate != "" {
sql = fmt.Sprintf("SELECT SUM(total_price) AS sum_total FROM central_kitchen_for_school_package_ord where "+
"user_identity_id = '%d' and create_at >= '%s' And create_at <= '%s' and ord_state = '%d' and pay_way = '%d'", req.UserIdentityId, req.StartDate, req.EndDate, req.OrdState, enum2.PayWayForWx)
"user_identity_id = '%d' and create_at >= '%s' And create_at <= '%s' and ord_state = '%d' and pay_way = '%d' and state != 2", req.UserIdentityId, req.StartDate, req.EndDate, req.OrdState, enum2.PayWayForWx)
}
}
}


Зареждане…
Отказ
Запис