Browse Source

update

tmp
DengBiao 9 months ago
parent
commit
795a7f110a
1 changed files with 6 additions and 6 deletions
  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 View File

@@ -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)
}
}
}


Loading…
Cancel
Save