From 605762489418c18aa8c2c66a2bbcc827cf6e5d93 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Tue, 5 Sep 2023 20:29:26 +0800 Subject: [PATCH] update --- app/admin/md/md_enterprise_manage.go | 2 ++ .../enterprise_manage/svc_central_kitchen_for_school.go | 8 ++++++++ .../svc/enterprise_manage/svc_self_support_for_school.go | 8 ++++++++ app/customer/hdl/hdl_user.go | 1 + 4 files changed, 19 insertions(+) diff --git a/app/admin/md/md_enterprise_manage.go b/app/admin/md/md_enterprise_manage.go index f90b402..aee19d3 100644 --- a/app/admin/md/md_enterprise_manage.go +++ b/app/admin/md/md_enterprise_manage.go @@ -198,6 +198,7 @@ type CentralKitchenForSchoolOrdListResp struct { type CentralKitchenForSchoolOrdListReq struct { EnterpriseId int `json:"enterprise_id" label:"企业id"` + IsTeacher int `json:"is_teacher" label:"是否教师"` Limit int `json:"limit" binding:"required"` Page int `json:"page" binding:"required"` Name string `json:"name" label:"姓名"` @@ -435,6 +436,7 @@ type SelfSupportForSchoolArrearsOrdListReq struct { ClassId int `json:"class_id" label:"班级id"` StartDate string `json:"start_date" label:"刷脸-开始时间"` EndDate string `json:"end_date" label:"刷脸-截止时间"` + IsTeacher int `json:"is_teacher" label:"是否教师"` } type SelfSupportForSchoolArrearsOrdDebtRepayReq struct { diff --git a/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go b/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go index f1de612..3e78baf 100644 --- a/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go +++ b/app/admin/svc/enterprise_manage/svc_central_kitchen_for_school.go @@ -410,6 +410,14 @@ func CentralKitchenForSchoolOrdList(req md.CentralKitchenForSchoolOrdListReq) (r if req.EnterpriseId != 0 { sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId) } + if req.IsTeacher != 0 { + if req.IsTeacher == 1 { + sess.And("user_identity.identity =?", enum2.UserIdentityForCentralKitchenForTeacher) + } + if req.IsTeacher == 2 { + sess.And("user_identity.identity !=?", enum2.UserIdentityForCentralKitchenForTeacher) + } + } if req.StartDate != "" { sess.And("central_kitchen_for_school_package_ord.create_at >= ?", req.StartDate) } diff --git a/app/admin/svc/enterprise_manage/svc_self_support_for_school.go b/app/admin/svc/enterprise_manage/svc_self_support_for_school.go index 3a2cc8e..0c145f8 100644 --- a/app/admin/svc/enterprise_manage/svc_self_support_for_school.go +++ b/app/admin/svc/enterprise_manage/svc_self_support_for_school.go @@ -674,6 +674,14 @@ func SelfSupportForSchoolArrearsOrdList(req md.SelfSupportForSchoolArrearsOrdLis if req.EnterpriseId != 0 { sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) } + if req.IsTeacher != 0 { + if req.IsTeacher == 1 { + sess.And("user_identity.identity =?", enum2.UserIdentityForCentralKitchenForTeacher) + } + if req.IsTeacher == 2 { + sess.And("user_identity.identity !=?", enum2.UserIdentityForCentralKitchenForTeacher) + } + } if req.StartDate != "" { sess.And("self_support_for_school_ord.face_time >= ?", req.StartDate) } diff --git a/app/customer/hdl/hdl_user.go b/app/customer/hdl/hdl_user.go index c757870..24c207e 100644 --- a/app/customer/hdl/hdl_user.go +++ b/app/customer/hdl/hdl_user.go @@ -134,6 +134,7 @@ func UserInfo(c *gin.Context) { "user_info": userInfo, "user_identity": identityList, })) + e.OutSuc(c, map[string]interface{}{ "user_info": userInfo, "user_identity": identityList,