Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
9e304b1107
3 changed files with 44 additions and 29 deletions
  1. +18
    -12
      app/admin/md/md_enterprise_manage.go
  2. +20
    -12
      app/admin/svc/enterprise_manage/svc_self_support_for_school.go
  3. +6
    -5
      app/db/db_user_identity.go

+ 18
- 12
app/admin/md/md_enterprise_manage.go View File

@@ -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 {


+ 20
- 12
app/admin/svc/enterprise_manage/svc_self_support_for_school.go View File

@@ -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


+ 6
- 5
app/db/db_user_identity.go View File

@@ -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 {


Loading…
Cancel
Save