소스 검색

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").


불러오는 중...
취소
저장