From 92c530a42f7cd6e1e6ceebd3b256c139410c4049 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Fri, 17 Jul 2020 16:35:56 +0800 Subject: [PATCH] 'commit' --- .../areaManager_account.json | 48 ++++++------- .../ExportExcelTemplate/student_account.json | 68 +++++++++---------- .../sysLoginperson_account.json | 48 ++++++------- .../ExportExcelTemplate/teacher_account.json | 58 ++++++++-------- .../BaseOrganizationService.go | 2 +- .../BaseStudentDao/BaseStudentDao.go | 2 +- .../BaseStudentService/BaseStudentService.go | 4 +- .../BaseTeacherDao/BaseTeacherDao.go | 2 +- .../BaseTeacherService/BaseTeacherService.go | 2 +- .../SysLoginpersonDao/SysLoginpersonDao.go | 8 +-- .../SysLoginpersonBusinessService.go | 8 +-- .../SysLoginpersonService.go | 4 +- dsBaseRpc/Tools/MockData/MockData.go | 10 +-- .../Tools/SystemAccount/SystemAccount.go | 6 +- dsBaseRpc/main.go | 2 +- 15 files changed, 136 insertions(+), 136 deletions(-) diff --git a/dsBaseRpc/Config/ExportExcelTemplate/areaManager_account.json b/dsBaseRpc/Config/ExportExcelTemplate/areaManager_account.json index 641509f4..54ea6eb6 100644 --- a/dsBaseRpc/Config/ExportExcelTemplate/areaManager_account.json +++ b/dsBaseRpc/Config/ExportExcelTemplate/areaManager_account.json @@ -1,25 +1,25 @@ -{ - "title": "区域管理员帐号", - "cols": [ - { - "col_name": "序号", - "col_field": "number", - "width": 15 - }, - { - "col_name": "区域名称", - "col_field": "person_name", - "width": 40 - }, - { - "col_name": "登录名", - "col_field": "login_name", - "width": 30 - }, - { - "col_name": "原始密码", - "col_field": "original_pwd", - "width": 20 - } - ] +{ + "title": "区域管理员账号", + "cols": [ + { + "col_name": "序号", + "col_field": "number", + "width": 15 + }, + { + "col_name": "区域名称", + "col_field": "person_name", + "width": 40 + }, + { + "col_name": "登录名", + "col_field": "login_name", + "width": 30 + }, + { + "col_name": "初始密码", + "col_field": "original_pwd", + "width": 20 + } + ] } \ No newline at end of file diff --git a/dsBaseRpc/Config/ExportExcelTemplate/student_account.json b/dsBaseRpc/Config/ExportExcelTemplate/student_account.json index 5474b14c..82e14f35 100644 --- a/dsBaseRpc/Config/ExportExcelTemplate/student_account.json +++ b/dsBaseRpc/Config/ExportExcelTemplate/student_account.json @@ -1,35 +1,35 @@ -{ - "title": "学生帐号", - "cols": [ - { - "col_name": "序号", - "col_field": "number", - "width": 15 - }, - { - "col_name": "学部", - "col_field": "stage_name", - "width": 20 - }, - { - "col_name": "班级", - "col_field": "class_name", - "width": 30 - }, - { - "col_name": "姓名", - "col_field": "person_name", - "width": 30 - }, - { - "col_name": "登录名", - "col_field": "login_name", - "width": 30 - }, - { - "col_name": "原始密码", - "col_field": "original_pwd", - "width": 20 - } - ] +{ + "title": "学生账号", + "cols": [ + { + "col_name": "序号", + "col_field": "number", + "width": 15 + }, + { + "col_name": "学部", + "col_field": "stage_name", + "width": 20 + }, + { + "col_name": "班级", + "col_field": "class_name", + "width": 30 + }, + { + "col_name": "姓名", + "col_field": "person_name", + "width": 30 + }, + { + "col_name": "登录名", + "col_field": "login_name", + "width": 30 + }, + { + "col_name": "初始密码", + "col_field": "original_pwd", + "width": 20 + } + ] } \ No newline at end of file diff --git a/dsBaseRpc/Config/ExportExcelTemplate/sysLoginperson_account.json b/dsBaseRpc/Config/ExportExcelTemplate/sysLoginperson_account.json index 6fd545db..7ead0619 100644 --- a/dsBaseRpc/Config/ExportExcelTemplate/sysLoginperson_account.json +++ b/dsBaseRpc/Config/ExportExcelTemplate/sysLoginperson_account.json @@ -1,25 +1,25 @@ -{ - "title": "单位管理员帐号", - "cols": [ - { - "col_name": "序号", - "col_field": "number", - "width": 15 - }, - { - "col_name": "单位名称", - "col_field": "person_name", - "width": 40 - }, - { - "col_name": "登录名", - "col_field": "login_name", - "width": 30 - }, - { - "col_name": "原始密码", - "col_field": "original_pwd", - "width": 20 - } - ] +{ + "title": "单位管理员账号", + "cols": [ + { + "col_name": "序号", + "col_field": "number", + "width": 15 + }, + { + "col_name": "管理员名称", + "col_field": "person_name", + "width": 40 + }, + { + "col_name": "登录名", + "col_field": "login_name", + "width": 30 + }, + { + "col_name": "初始密码", + "col_field": "original_pwd", + "width": 20 + } + ] } \ No newline at end of file diff --git a/dsBaseRpc/Config/ExportExcelTemplate/teacher_account.json b/dsBaseRpc/Config/ExportExcelTemplate/teacher_account.json index e5166482..925ec575 100644 --- a/dsBaseRpc/Config/ExportExcelTemplate/teacher_account.json +++ b/dsBaseRpc/Config/ExportExcelTemplate/teacher_account.json @@ -1,30 +1,30 @@ -{ - "title": "教工帐号", - "cols": [ - { - "col_name": "序号", - "col_field": "number", - "width": 20 - }, - { - "col_name": "部门", - "col_field": "org_name", - "width": 30 - }, - { - "col_name": "姓名", - "col_field": "person_name", - "width": 20 - }, - { - "col_name": "登录名", - "col_field": "login_name", - "width": 30 - }, - { - "col_name": "原始密码", - "col_field": "original_pwd", - "width": 20 - } - ] +{ + "title": "教工账号", + "cols": [ + { + "col_name": "序号", + "col_field": "number", + "width": 20 + }, + { + "col_name": "部门", + "col_field": "org_name", + "width": 30 + }, + { + "col_name": "姓名", + "col_field": "person_name", + "width": 20 + }, + { + "col_name": "登录名", + "col_field": "login_name", + "width": 30 + }, + { + "col_name": "初始密码", + "col_field": "original_pwd", + "width": 20 + } + ] } \ No newline at end of file diff --git a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go index 8bd39671..6b5fe3e1 100644 --- a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go +++ b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go @@ -198,7 +198,7 @@ func (s *Rpc) AddBaseOrganization(ctx context.Context, in *BaseOrganizationProto } // *********************************************************************// // 组织机构类型 1:教育局 2:学校 3:部门 4:院 5:系 6:专业 7:教辅单位,8:大学区 - // 如果是学校,教辅单位,大学区的话,需要生成管理员帐号 + // 如果是学校,教辅单位,大学区的话,需要生成管理员账号 // *********************************************************************// if CommonUtil.IsContainInt32([]int32{2, 7, 8}, model.OrgType) { err = UpdateManager(model.OrgId, 1) diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go index f62e3479..9649e0ab 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go @@ -99,7 +99,7 @@ func PageBaseStudent(in *BaseStudentProto.QueryArg) ([]map[string]interface{}, i return nil, 0, err } list, count, err := SqlKit.QueryForPk(sql) - //对于教师是不是修改过帐号进行判断 + //对于教师是不是修改过账号进行判断 SysLoginpersonService.FillPwdIsChange(&list) //返回结果 return list, count, err diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go index 6886b2e5..4217fc42 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go @@ -134,7 +134,7 @@ func (s *Rpc) AddBaseStudent(ctx context.Context, in *BaseStudentProto.ModelArg) LogUtil.Error(ErrorConst.SqlUpdateError, "执行AddBaseStudent时发生严重错误:"+err.Error()) return &reply, err } - //为学生创建帐号 + //为学生创建账号 _, err = SysLoginpersonService.AddLoginperson(3, model.PersonId, model.Xm) if err != nil { reply.Success = false @@ -165,7 +165,7 @@ func (s *Rpc) AddBaseStudent(ctx context.Context, in *BaseStudentProto.ModelArg) //记录日志 BaseParentDao.ActionLog([]models.TBaseParent{*modelParent}, Const.ActionInsert, in.ActionPersonId, in.ActionIpAddress) - //为家长创建帐号 + //为家长创建账号 _, err = SysLoginpersonService.AddLoginperson(4, modelParent.PersonId, modelParent.Xm) if err != nil { reply.Success = false diff --git a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go index b14df740..39489d99 100644 --- a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go +++ b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go @@ -129,7 +129,7 @@ func PageBaseTeacher(in *BaseTeacherProto.QueryArg) ([]map[string]interface{}, i list, count, err := SqlKit.QueryForPk(sql) //扩展登录信息 FillLoginInfo(&list) - //对于教师是不是修改过帐号进行判断 + //对于教师是不是修改过账号进行判断 SysLoginpersonService.FillPwdIsChange(&list) //返回结果 return list, count, err diff --git a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go index 4fce7713..4ad91ee3 100644 --- a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go +++ b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go @@ -159,7 +159,7 @@ func (s *Rpc) AddBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelArg) LogUtil.Error(ErrorConst.SqlUpdateError, "执行AddBaseTeacher时发生严重错误:"+err.Error()) return &reply, err } - // 生成教师帐号 + // 生成教师账号 _, err = SysLoginpersonService.AddLoginperson(2, model.PersonId, model.Xm) if err != nil { reply.Success = false diff --git a/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonDao/SysLoginpersonDao.go b/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonDao/SysLoginpersonDao.go index 490a439d..50fa07be 100644 --- a/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonDao/SysLoginpersonDao.go +++ b/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonDao/SysLoginpersonDao.go @@ -35,7 +35,7 @@ func UpdateSysLoginPerson(model models.TSysLoginperson) (int64, error) { } /** -功能:计算的最大登录帐号Num +功能:计算的最大登录账号Num 作者:黄海 时间:2020-05-30 */ @@ -130,7 +130,7 @@ func PageSysLoginPerson(in *SysLoginpersonProto.QueryArg) ([]map[string]interfac fmt.Println(err.Error()) } list, count, err := SqlKit.QueryForPk(sql) - //处理一下是不是原始密码的问题 + //处理一下是不是初始密码的问题 FillPwd(&list) return list, count, err } @@ -161,7 +161,7 @@ func PageAreaManager(in *SysLoginpersonProto.AreaManagerArg) ([]map[string]inter And(builder.In("t1.rule_id", areaCodes)).Limit(limit, offset) sql, _ = myBuilder.ToBoundSQL() list, count, err := SqlKit.QueryForPk(sql) - //处理一下是不是原始密码的问题 + //处理一下是不是初始密码的问题 FillPwd(&list) return list, count, err } @@ -206,7 +206,7 @@ func ResetPassWord(ids []string) error { return nil } -//启用/禁用帐号 +//启用/禁用账号 func EnableDisableAccount(personIds []string, bUse int) error { //修改数据库 var myBuilder = builder.Dialect(builder.MYSQL).Update(builder.Eq{"b_use": bUse}).From("t_sys_loginperson"). diff --git a/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonBusinessService.go b/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonBusinessService.go index 2ef2accd..42c1e99b 100644 --- a/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonBusinessService.go +++ b/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonBusinessService.go @@ -9,15 +9,15 @@ import ( ) /** -功能:为指定身份的人员,批量生成帐号 -描述:生成登录帐号 1:管理员,2:教师,3:学生,4: 家长 +功能:为指定身份的人员,批量生成账号 +描述:生成登录账号 1:管理员,2:教师,3:学生,4: 家长 作者:黄海 时间:2020-05-30 */ type LoginAccount struct { LoginName string //登录名 Pwd string //密码,支持ldap - OriginalPwd string //原始密码 + OriginalPwd string //初始密码 } func GenerateLoginAccount(identityId int32, count int) []LoginAccount { @@ -63,7 +63,7 @@ func AddLoginperson(identityId int32, personId string, personName string) (int64 model.Pwd = accountArray[0].Pwd model.OriginalPwd = accountArray[0].OriginalPwd //不管是不是管理员,还是普通教师、学生,都是先有实体数据,即t_base_teacher或t_base_student,t_base_parent三张表中存在了数据, - //有了person_id,然后再来添加登录帐号,所以person_id是肯定有的,不用这里现生成. + //有了person_id,然后再来添加登录账号,所以person_id是肯定有的,不用这里现生成. model.IdentityId = identityId model.PersonId = personId model.PersonName = personName diff --git a/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonService.go b/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonService.go index 3ae0ff87..6b08137d 100644 --- a/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonService.go +++ b/dsBaseRpc/RpcService/SysLoginperson/SysLoginpersonService/SysLoginpersonService.go @@ -141,7 +141,7 @@ func (s *Rpc) ResetPassWord(ctx context.Context, in *SysLoginpersonProto.ResetPa return &reply, nil } -//启用帐号 +//启用账号 func (s *Rpc) EnableAccount(ctx context.Context, in *SysLoginpersonProto.AccountArg) (*SysLoginpersonProto.Reply, error) { //rpc响应 var reply SysLoginpersonProto.Reply @@ -159,7 +159,7 @@ func (s *Rpc) EnableAccount(ctx context.Context, in *SysLoginpersonProto.Account return &reply, nil } -//禁用帐号 +//禁用账号 func (s *Rpc) DisableAccount(ctx context.Context, in *SysLoginpersonProto.AccountArg) (*SysLoginpersonProto.Reply, error) { //rpc响应 var reply SysLoginpersonProto.Reply diff --git a/dsBaseRpc/Tools/MockData/MockData.go b/dsBaseRpc/Tools/MockData/MockData.go index 79caa085..24d14ae1 100644 --- a/dsBaseRpc/Tools/MockData/MockData.go +++ b/dsBaseRpc/Tools/MockData/MockData.go @@ -50,7 +50,7 @@ type schoolStruct struct { type LoginAccount struct { LoginName string //登录名 Pwd string //密码,支持ldap - OriginalPwd string //原始密码 + OriginalPwd string //初始密码 } func GetLoginIdIntMax(count int64) int64 { @@ -58,7 +58,7 @@ func GetLoginIdIntMax(count int64) int64 { } /** -功能:生成登录帐号 +功能:生成登录账号 作者:黄海 时间:2020-06-11 */ @@ -141,7 +141,7 @@ func addBureau(areaCode string, jiaoYuJuId string, areaName string, provinceCode model.SortId = 1 model.BUse = 1 arrayTBaseOrganization = append(arrayTBaseOrganization, *model) - //生成登录帐号 + //生成登录账号 addManager(model.OrgId, model.OrgName, model.OrgType, model.ProvinceCode, model.CityCode, model.DistrictCode, accountArray[i]) fmt.Println("准备教辅单位数据:" + model.OrgName) } @@ -302,7 +302,7 @@ func addTeacher(bureauId string, provinceCode string, cityCode string, districtC model.MainSchoolId = mainSchoolId //调用DAO保存 arrayTBaseTeacher = append(arrayTBaseTeacher, *model) - // 生成教师帐号 + // 生成教师账号 addLoginPerson(2, model.PersonId, model.Xm, accountArray[i]) } } @@ -415,7 +415,7 @@ func addStudent(bureauId string, classId string, provinceCode string, cityCode s model.BureauId = bureauId //添加学生 arrayTBaseStudent = append(arrayTBaseStudent, *model) - //为学生创建帐号 + //为学生创建账号 addLoginPerson(3, model.PersonId, model.Xm, studentAccountArray[i]) //为学生创建对应的家长 diff --git a/dsBaseRpc/Tools/SystemAccount/SystemAccount.go b/dsBaseRpc/Tools/SystemAccount/SystemAccount.go index c36bf6bd..5f9b595a 100644 --- a/dsBaseRpc/Tools/SystemAccount/SystemAccount.go +++ b/dsBaseRpc/Tools/SystemAccount/SystemAccount.go @@ -24,15 +24,15 @@ var arrayTSysLoginperson = make([]models.TSysLoginperson, 0) var arrayTBaseRolePerson = make([]models.TBaseRolePerson, 0) /** -功能:为指定身份的人员,批量生成帐号 -描述:生成登录帐号 1:管理员,2:教师,3:学生,4: 家长 +功能:为指定身份的人员,批量生成账号 +描述:生成登录账号 1:管理员,2:教师,3:学生,4: 家长 作者:黄海 时间:2020-05-30 */ type LoginAccount struct { LoginName string //登录名 Pwd string //密码,支持ldap - OriginalPwd string //原始密码 + OriginalPwd string //初始密码 } func GenerateLoginAccount(identityId int32, count int) []LoginAccount { diff --git a/dsBaseRpc/main.go b/dsBaseRpc/main.go index e95834b7..a4b67cea 100644 --- a/dsBaseRpc/main.go +++ b/dsBaseRpc/main.go @@ -90,7 +90,7 @@ func main() { BaseTeacherProto.RegisterBaseTeacherManageServer(s, &BaseTeacherService.Rpc{}) //学生 BaseStudentProto.RegisterBaseStudentManageServer(s, &BaseStudentService.Rpc{}) - //登录帐号 + //登录账号 SysLoginpersonProto.RegisterSysLoginpersonManageServer(s, &SysLoginpersonService.Rpc{}) //全局变量 BaseGlobalProto.RegisterBaseGlobalManageServer(s, &BaseGlobalService.Rpc{})