From 3879057df11dbba0c0018795b06d68cc08fb7fc5 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Mon, 18 Sep 2023 17:39:23 +0800 Subject: [PATCH] update --- app/customer/hdl/hdl_user.go | 1 + app/db/db_class_with_user.go | 2 ++ 2 files changed, 3 insertions(+) diff --git a/app/customer/hdl/hdl_user.go b/app/customer/hdl/hdl_user.go index 24c207e..dcd6001 100644 --- a/app/customer/hdl/hdl_user.go +++ b/app/customer/hdl/hdl_user.go @@ -43,6 +43,7 @@ func UserInfo(c *gin.Context) { if data != nil { tmp["grade"] = data.Grade tmp["class"] = data.Class + tmp["period"] = data.Period } } diff --git a/app/db/db_class_with_user.go b/app/db/db_class_with_user.go index 0af7ab9..531519e 100644 --- a/app/db/db_class_with_user.go +++ b/app/db/db_class_with_user.go @@ -12,6 +12,7 @@ type ClassWithUser struct { model2.UserIdentity `xorm:"extends"` model2.Class `xorm:"extends"` model2.Grade `xorm:"extends"` + model2.Period `xorm:"extends"` model2.Enterprise `xorm:"extends"` } @@ -33,6 +34,7 @@ func (classWithUserDb *ClassWithUserDb) GetInfoByUserIdentityId(userIdentityId i Join("LEFT", "user_identity", "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", "period", "grade.period_id = period.id"). Join("LEFT", "enterprise", "grade.enterprise_id = enterprise.id"). Get(m) if err != nil {