瀏覽代碼

update

tmp
DengBiao 11 月之前
父節點
當前提交
4652e35849
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. +5
    -6
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go

+ 5
- 6
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go 查看文件

@@ -800,10 +800,9 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
if len(classWithUserIdentityIdsTwo) > 0 {
sess.In("user_identity.id", classWithUserIdentityIdsTwo)
}
var sess1, sess2, sess3, sess4, sess5 = sess, sess, sess, sess, sess

var m []*db.CentralKitchenForSchoolPackageOrdWithUserIdentity
personNum, err = sess1.
personNum, err = sess.
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -816,7 +815,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
return 0, 0, 0, 0, 0, err
}

orderCountByTerm, err = sess2.And("central_kitchen_for_school_package_ord.kind = ?", 1).
orderCountByTerm, err = sess.And("central_kitchen_for_school_package_ord.kind = ?", 1).
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -827,7 +826,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
if err != nil {
return 0, 0, 0, 0, 0, err
}
orderCountByMonth, err = sess3.And("central_kitchen_for_school_package_ord.kind = ?", 2).
orderCountByMonth, err = sess.And("central_kitchen_for_school_package_ord.kind = ?", 2).
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -838,7 +837,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
if err != nil {
return 0, 0, 0, 0, 0, err
}
orderCountByDay, err = sess4.And("central_kitchen_for_school_package_ord.kind = ?", 3).
orderCountByDay, err = sess.And("central_kitchen_for_school_package_ord.kind = ?", 3).
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").
@@ -851,7 +850,7 @@ func CentralKitchenForSchoolOrdStatistics(req md.CentralKitchenForSchoolOrdListR
}

var mm db.CentralKitchenForSchoolPackageOrdWithUserIdentity
consumeAmount, err = sess5.
consumeAmount, err = sess.
Join("LEFT", "user_identity", "central_kitchen_for_school_package_ord.user_identity_id = user_identity.id").
Join("LEFT", "enterprise", "enterprise.id = user_identity.enterprise_id").
Join("LEFT", "user", "user.id = user_identity.uid").


Loading…
取消
儲存