@@ -198,6 +198,7 @@ type CentralKitchenForSchoolOrdListResp struct { | |||||
type CentralKitchenForSchoolOrdListReq struct { | type CentralKitchenForSchoolOrdListReq struct { | ||||
EnterpriseId int `json:"enterprise_id" label:"企业id"` | EnterpriseId int `json:"enterprise_id" label:"企业id"` | ||||
IsTeacher int `json:"is_teacher" label:"是否教师"` | |||||
Limit int `json:"limit" binding:"required"` | Limit int `json:"limit" binding:"required"` | ||||
Page int `json:"page" binding:"required"` | Page int `json:"page" binding:"required"` | ||||
Name string `json:"name" label:"姓名"` | Name string `json:"name" label:"姓名"` | ||||
@@ -435,6 +436,7 @@ type SelfSupportForSchoolArrearsOrdListReq struct { | |||||
ClassId int `json:"class_id" label:"班级id"` | ClassId int `json:"class_id" label:"班级id"` | ||||
StartDate string `json:"start_date" label:"刷脸-开始时间"` | StartDate string `json:"start_date" label:"刷脸-开始时间"` | ||||
EndDate string `json:"end_date" label:"刷脸-截止时间"` | EndDate string `json:"end_date" label:"刷脸-截止时间"` | ||||
IsTeacher int `json:"is_teacher" label:"是否教师"` | |||||
} | } | ||||
type SelfSupportForSchoolArrearsOrdDebtRepayReq struct { | type SelfSupportForSchoolArrearsOrdDebtRepayReq struct { | ||||
@@ -410,6 +410,14 @@ func CentralKitchenForSchoolOrdList(req md.CentralKitchenForSchoolOrdListReq) (r | |||||
if req.EnterpriseId != 0 { | if req.EnterpriseId != 0 { | ||||
sess.And("central_kitchen_for_school_package_ord.enterprise_id =?", req.EnterpriseId) | 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 != "" { | if req.StartDate != "" { | ||||
sess.And("central_kitchen_for_school_package_ord.create_at >= ?", req.StartDate) | sess.And("central_kitchen_for_school_package_ord.create_at >= ?", req.StartDate) | ||||
} | } | ||||
@@ -674,6 +674,14 @@ func SelfSupportForSchoolArrearsOrdList(req md.SelfSupportForSchoolArrearsOrdLis | |||||
if req.EnterpriseId != 0 { | if req.EnterpriseId != 0 { | ||||
sess.And("self_support_for_school_ord.enterprise_id =?", req.EnterpriseId) | 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 != "" { | if req.StartDate != "" { | ||||
sess.And("self_support_for_school_ord.face_time >= ?", req.StartDate) | sess.And("self_support_for_school_ord.face_time >= ?", req.StartDate) | ||||
} | } | ||||
@@ -134,6 +134,7 @@ func UserInfo(c *gin.Context) { | |||||
"user_info": userInfo, | "user_info": userInfo, | ||||
"user_identity": identityList, | "user_identity": identityList, | ||||
})) | })) | ||||
e.OutSuc(c, map[string]interface{}{ | e.OutSuc(c, map[string]interface{}{ | ||||
"user_info": userInfo, | "user_info": userInfo, | ||||
"user_identity": identityList, | "user_identity": identityList, | ||||