From 8e10febeb6e9dddb51d6bc7436f15a5e1d2ca86e Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Wed, 19 Aug 2020 09:51:33 +0800 Subject: [PATCH] 'commit' --- .../Config/ExportExcelTemplate/student_account.json | 10 ++++++++++ .../BaseStudent/BaseStudentDao/BaseStudentDao.go | 9 +++++++-- 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/dsBaseRpc/Config/ExportExcelTemplate/student_account.json b/dsBaseRpc/Config/ExportExcelTemplate/student_account.json index e8404e10..ffd9d6a8 100644 --- a/dsBaseRpc/Config/ExportExcelTemplate/student_account.json +++ b/dsBaseRpc/Config/ExportExcelTemplate/student_account.json @@ -30,6 +30,16 @@ "col_name": "初始密码", "col_field": "original_pwd", "width": 20 + }, + { + "col_name": "家长账号", + "col_field": "parent_login_name", + "width": 20 + }, + { + "col_name": "家长初始密码", + "col_field": "parent_original_pwd", + "width": 20 } ] } \ No newline at end of file diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go index 838dae88..fb7dea1d 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go @@ -134,11 +134,16 @@ func ReviseTeacherOrg(Ids []string, ClassId string) error { //导出学生账号信息到EXCEL func ExportStudentAccountInfoExcel(in *BaseStudentProto.ModelArg) ([]map[string]interface{}, int32, error) { - var myBuilder = builder.Dialect(builder.MYSQL).Select("t1.*,t4.stage_name,t3.class_name"). + var myBuilder = builder.Dialect(builder.MYSQL).Select( + `t1.*,t4.stage_name,t3.class_name, + (select login_name from t_sys_loginperson where person_id=t5.person_id) as parent_login_name, + (select original_pwd from t_sys_loginperson where person_id=t5.person_id) as parent_original_pwd`). From("t_sys_loginperson as t1"). InnerJoin("t_base_student as t2", "t1.person_id=t2.person_id"). InnerJoin("t_base_class as t3", "t2.class_id=t3.class_id"). - InnerJoin("t_dm_stage as t4", "t3.stage_id=t4.stage_id") + InnerJoin("t_dm_stage as t4", "t3.stage_id=t4.stage_id"). + InnerJoin("t_base_parent as t5","t2.person_id=t5.student_id") + myBuilder.Where(builder.Eq{"t1.b_use": 1}). And(builder.Eq{"t2.b_use": 1}). And(builder.Eq{"t3.b_use": 1}).