@@ -240,14 +240,17 @@ type SelfSupportForSchoolStudentListReq struct { | |||
} | |||
type SelfSupportForSchoolStudentListResp struct { | |||
IdNo string `json:"id_no" label:"身份证号"` | |||
ParentPhone string `json:"parent_phone" label:"家长电话"` | |||
Name string `json:"name" label:"姓名"` | |||
Grade string `json:"grade" label:"年级"` | |||
GradeId int `json:"grade_id" label:"年级id"` | |||
Class string `json:"class" label:"班级"` | |||
ClassId int `json:"class_id" label:"班级"` | |||
UserIdentityId int `json:"user_identity_id" label:"用户身份id"` | |||
IdNo string `json:"id_no" label:"身份证号"` | |||
ParentPhone string `json:"parent_phone" label:"家长电话"` | |||
Name string `json:"name" label:"姓名"` | |||
Grade string `json:"grade" label:"年级"` | |||
GradeId int `json:"grade_id" label:"年级id"` | |||
Class string `json:"class" label:"班级"` | |||
ClassId int `json:"class_id" label:"班级"` | |||
UserIdentityId int `json:"user_identity_id" label:"用户身份id"` | |||
CollectFaceType int `json:"collect_face_type" label:"采集人脸方式(1:个采 2:集采) "` | |||
SchoolFacePassStatus string `json:"school_face_pass_status" label:"校园一脸通行开通状态(开通:OPEN 关闭:CLOSE) "` | |||
SchoolFacePaymentStatus string `json:"school_face_payment_status" label:"校园一脸通行刷脸支付开通状态(开通:OPEN 关闭:CLOSE) "` | |||
} | |||
type SelfSupportForSchoolTeacherListReq struct { | |||
@@ -259,10 +262,13 @@ type SelfSupportForSchoolTeacherListReq struct { | |||
} | |||
type SelfSupportForSchoolTeacherListResp struct { | |||
UserIdentityId int `json:"user_identity_id" label:"用户身份id"` | |||
IdNo string `json:"id_no" label:"身份证号"` | |||
Phone string `json:"parent_phone" label:"电话"` | |||
Name string `json:"name" label:"姓名"` | |||
UserIdentityId int `json:"user_identity_id" label:"用户身份id"` | |||
IdNo string `json:"id_no" label:"身份证号"` | |||
Phone string `json:"parent_phone" label:"电话"` | |||
Name string `json:"name" label:"姓名"` | |||
CollectFaceType int `json:"collect_face_type" label:"采集人脸方式(1:个采 2:集采) "` | |||
SchoolFacePassStatus string `json:"school_face_pass_status" label:"校园一脸通行开通状态(开通:OPEN 关闭:CLOSE) "` | |||
SchoolFacePaymentStatus string `json:"school_face_payment_status" label:"校园一脸通行刷脸支付开通状态(开通:OPEN 关闭:CLOSE) "` | |||
} | |||
type SelfSupportForSchoolStudentUpdateReq struct { | |||
@@ -285,6 +285,7 @@ func SelfSupportForSchoolStudentList(req md.SelfSupportForSchoolStudentListReq) | |||
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id"). | |||
Join("LEFT", "class", "class_with_user.class_id = class.id"). | |||
Join("LEFT", "grade", "class.grade_id = grade.id"). | |||
Join("LEFT", "self_support_for_user_face_info", "user_identity.id = self_support_for_user_face_info.user_identity_id"). | |||
Limit(req.Limit, (req.Page-1)*req.Limit).FindAndCount(&m) | |||
if err != nil { | |||
return nil, 0, err | |||
@@ -292,14 +293,17 @@ func SelfSupportForSchoolStudentList(req md.SelfSupportForSchoolStudentListReq) | |||
for _, v := range m { | |||
resp = append(resp, md.SelfSupportForSchoolStudentListResp{ | |||
IdNo: v.UserIdentity.IdNo, | |||
ParentPhone: v.User.Phone, | |||
Name: v.UserIdentity.Name, | |||
Grade: v.Grade.Name, | |||
GradeId: v.Grade.Id, | |||
Class: v.Class.Name, | |||
ClassId: v.Class.Id, | |||
UserIdentityId: v.UserIdentity.Id, | |||
IdNo: v.UserIdentity.IdNo, | |||
ParentPhone: v.User.Phone, | |||
Name: v.UserIdentity.Name, | |||
Grade: v.Grade.Name, | |||
GradeId: v.Grade.Id, | |||
Class: v.Class.Name, | |||
ClassId: v.Class.Id, | |||
UserIdentityId: v.UserIdentity.Id, | |||
CollectFaceType: v.SelfSupportForUserFaceInfo.CollectFaceType, | |||
SchoolFacePassStatus: v.SelfSupportForUserFaceInfo.SchoolFacePassStatus, | |||
SchoolFacePaymentStatus: v.SelfSupportForUserFaceInfo.SchoolFacePaymentStatus, | |||
}) | |||
} | |||
return | |||
@@ -331,6 +335,7 @@ func SelfSupportForSchoolTeacherList(req md.SelfSupportForSchoolTeacherListReq) | |||
Join("LEFT", "class_with_user", "class_with_user.user_identity_id = user_identity.id"). | |||
Join("LEFT", "class", "class_with_user.class_id = class.id"). | |||
Join("LEFT", "grade", "class.grade_id = grade.id"). | |||
Join("LEFT", "self_support_for_user_face_info", "user_identity.id = self_support_for_user_face_info.user_identity_id"). | |||
Limit(req.Limit, (req.Page-1)*req.Limit).FindAndCount(&m) | |||
if err != nil { | |||
return nil, 0, err | |||
@@ -338,10 +343,13 @@ func SelfSupportForSchoolTeacherList(req md.SelfSupportForSchoolTeacherListReq) | |||
for _, v := range m { | |||
resp = append(resp, md.SelfSupportForSchoolTeacherListResp{ | |||
UserIdentityId: v.UserIdentity.Id, | |||
IdNo: v.UserIdentity.IdNo, | |||
Phone: v.User.Phone, | |||
Name: v.UserIdentity.Name, | |||
UserIdentityId: v.UserIdentity.Id, | |||
IdNo: v.UserIdentity.IdNo, | |||
Phone: v.User.Phone, | |||
Name: v.UserIdentity.Name, | |||
CollectFaceType: v.SelfSupportForUserFaceInfo.CollectFaceType, | |||
SchoolFacePassStatus: v.SelfSupportForUserFaceInfo.SchoolFacePassStatus, | |||
SchoolFacePaymentStatus: v.SelfSupportForUserFaceInfo.SchoolFacePaymentStatus, | |||
}) | |||
} | |||
return | |||
@@ -143,11 +143,12 @@ func (userIdentityDb *UserIdentityDb) FindUserIdentityForEnterprise(enterpriseId | |||
} | |||
type UserIdentityWithUser struct { | |||
model.UserIdentity `xorm:"extends"` | |||
model.User `xorm:"extends"` | |||
model.ClassWithUser `xorm:"extends"` | |||
model.Class `xorm:"extends"` | |||
model.Grade `xorm:"extends"` | |||
model.UserIdentity `xorm:"extends"` | |||
model.User `xorm:"extends"` | |||
model.ClassWithUser `xorm:"extends"` | |||
model.Class `xorm:"extends"` | |||
model.Grade `xorm:"extends"` | |||
model.SelfSupportForUserFaceInfo `xorm:"extends"` | |||
} | |||
func (UserIdentityWithUser) TableName() string { | |||