Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
7fe1720d01
2 changed files with 4 additions and 3 deletions
  1. +1
    -0
      app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go
  2. +3
    -3
      app/admin/svc/svc_data_statisstics.go

+ 1
- 0
app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go View File

@@ -321,6 +321,7 @@ func CentralKitchenForSchoolUserDeleteV2(req md.CentralKitchenForSchoolUserDelet


//2、删除 user_identity //2、删除 user_identity
_, err = db.Db.Where("identity =? or identity =?", enum2.UserIdentityForCentralKitchenForTeacher, enum2.UserIdentityForCentralKitchenForStudent). _, err = db.Db.Where("identity =? or identity =?", enum2.UserIdentityForCentralKitchenForTeacher, enum2.UserIdentityForCentralKitchenForStudent).
In("id", userIdentityIds).
Delete(model.UserIdentity{}) Delete(model.UserIdentity{})
if err != nil { if err != nil {
return return


+ 3
- 3
app/admin/svc/svc_data_statisstics.go View File

@@ -566,7 +566,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
var m []*db.CentralKitchenForSchoolPackageOrdForReserveWithUserIdentity var m []*db.CentralKitchenForSchoolPackageOrdForReserveWithUserIdentity
sess := db.Db.Desc("central_kitchen_for_school_package_ord_for_reserve.id") sess := db.Db.Desc("central_kitchen_for_school_package_ord_for_reserve.id")
if req.EnterpriseId != 0 { if req.EnterpriseId != 0 {
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId)
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId)
} }
if req.StartDate != "" { if req.StartDate != "" {
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate)
@@ -707,7 +707,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
var m []*db.CentralKitchenForSchoolPackageOrdForReserveWithUserIdentity var m []*db.CentralKitchenForSchoolPackageOrdForReserveWithUserIdentity
sess := db.Db.Desc("central_kitchen_for_school_package_ord_for_reserve.id") sess := db.Db.Desc("central_kitchen_for_school_package_ord_for_reserve.id")
if req.EnterpriseId != 0 { if req.EnterpriseId != 0 {
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId)
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId)
} }
if req.StartDate != "" { if req.StartDate != "" {
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate)
@@ -1210,7 +1210,7 @@ func CentralKitchenForSchoolDataStatisticsExport(req md.CentralKitchenForSchoolD
var m []*db.CentralKitchenForSchoolPackageOrdForReserveWithUserIdentity var m []*db.CentralKitchenForSchoolPackageOrdForReserveWithUserIdentity
sess := db.Db.Desc("central_kitchen_for_school_package_ord_for_reserve.id") sess := db.Db.Desc("central_kitchen_for_school_package_ord_for_reserve.id")
if req.EnterpriseId != 0 { if req.EnterpriseId != 0 {
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId)
sess.And("central_kitchen_for_school_package_ord_for_reserve.enterprise_id =?", req.EnterpriseId)
} }
if req.StartDate != "" { if req.StartDate != "" {
sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate) sess.And("central_kitchen_for_school_package_ord_for_reserve.meal_time_start >= ?", req.StartDate)


Loading…
Cancel
Save