From d4a0da38138c52eff4ab4a1d4cebb62ba9d489a2 Mon Sep 17 00:00:00 2001 From: huanghai <10402852@qq.com> Date: Wed, 24 Jun 2020 14:06:31 +0800 Subject: [PATCH] 'commit' --- dsBaseRpc/RpcService/BaseClass/BaseClassDao/BaseClassDao.go | 2 +- .../BaseClass/BaseClassService/BaseClassService.go | 4 ++-- .../BaseOrganizationDao/BaseOrganizationDao.go | 2 +- .../BaseOrganizationService/BaseOrganizationService.go | 4 ++-- .../RpcService/BaseParent/BaseParentDao/BaseParentDao.go | 2 +- .../BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go | 1 - .../RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go | 4 ++-- .../BaseStudent/BaseStudentService/BaseStudentService.go | 6 +++--- .../RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go | 4 ++-- .../BaseTeacher/BaseTeacherService/BaseTeacherService.go | 4 ++-- 10 files changed, 16 insertions(+), 17 deletions(-) diff --git a/dsBaseRpc/RpcService/BaseClass/BaseClassDao/BaseClassDao.go b/dsBaseRpc/RpcService/BaseClass/BaseClassDao/BaseClassDao.go index b7658ff9..fe13d0d8 100644 --- a/dsBaseRpc/RpcService/BaseClass/BaseClassDao/BaseClassDao.go +++ b/dsBaseRpc/RpcService/BaseClass/BaseClassDao/BaseClassDao.go @@ -28,7 +28,7 @@ func ActionLog(ms []models.TBaseClass, actionCode string, actionPersonId string, return err } //通过主键集合,查找对应的实体bean集合 -func FindModelsByIds(ids []string) ([]models.TBaseClass, error) { +func GetByIds(ids []string) ([]models.TBaseClass, error) { ms := make([]models.TBaseClass, 0) err := db.In("class_id", ids).Find(&ms) if err != nil { diff --git a/dsBaseRpc/RpcService/BaseClass/BaseClassService/BaseClassService.go b/dsBaseRpc/RpcService/BaseClass/BaseClassService/BaseClassService.go index 7ea59f08..149bb761 100644 --- a/dsBaseRpc/RpcService/BaseClass/BaseClassService/BaseClassService.go +++ b/dsBaseRpc/RpcService/BaseClass/BaseClassService/BaseClassService.go @@ -184,7 +184,7 @@ func (s *Rpc) DeleteBaseClass(ctx context.Context, in *BaseClassProto.DeleteIdsA return &reply, err } //记录日志 - ms, err := BaseClassDao.FindModelsByIds(in.Ids) + ms, err := BaseClassDao.GetByIds(in.Ids) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false @@ -221,7 +221,7 @@ func (s *Rpc) UpdateBaseClass(ctx context.Context, in *BaseClassProto.ModelArg) } //记录日志 - ms, err := BaseClassDao.FindModelsByIds([]string{in.ClassId}) + ms, err := BaseClassDao.GetByIds([]string{in.ClassId}) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false diff --git a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go index dfd8c85f..f5a886bc 100644 --- a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go +++ b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationDao/BaseOrganizationDao.go @@ -35,7 +35,7 @@ func ActionLog(ms []models.TBaseOrganization, actionCode string, actionPersonId } //通过主键集合,查找对应的实体bean集合 -func FindModelsByIds(ids []string) ([]models.TBaseOrganization, error) { +func GetByIds(ids []string) ([]models.TBaseOrganization, error) { ms := make([]models.TBaseOrganization, 0) err := db.In("org_id", ids).Find(&ms) if err != nil { diff --git a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go index 839be63c..7a8637c6 100644 --- a/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go +++ b/dsBaseRpc/RpcService/BaseOrganization/BaseOrganizationService/BaseOrganizationService.go @@ -281,7 +281,7 @@ func (s *Rpc) DeleteBaseOrganization(ctx context.Context, in *BaseOrganizationPr } } //记录日志 - ms, err := BaseOrganizationDao.FindModelsByIds(in.Ids) + ms, err := BaseOrganizationDao.GetByIds(in.Ids) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false @@ -440,7 +440,7 @@ func (s *Rpc) UpdateBaseOrganization(ctx context.Context, in *BaseOrganizationPr } } //记录日志 - ms, err := BaseOrganizationDao.FindModelsByIds([]string{in.OrgId}) + ms, err := BaseOrganizationDao.GetByIds([]string{in.OrgId}) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false diff --git a/dsBaseRpc/RpcService/BaseParent/BaseParentDao/BaseParentDao.go b/dsBaseRpc/RpcService/BaseParent/BaseParentDao/BaseParentDao.go index cbaa52da..92ed6414 100644 --- a/dsBaseRpc/RpcService/BaseParent/BaseParentDao/BaseParentDao.go +++ b/dsBaseRpc/RpcService/BaseParent/BaseParentDao/BaseParentDao.go @@ -28,7 +28,7 @@ func ActionLog(ms []models.TBaseParent, actionCode string, actionPersonId string db.Insert(msLog) } //通过主键集合,查找对应的实体bean集合 -func FindModelsByIds(ids []string) ([]models.TBaseParent, error) { +func GetByIds(ids []string) ([]models.TBaseParent, error) { ms := make([]models.TBaseParent, 0) err := db.In("person_id", ids).Find(&ms) if err != nil { diff --git a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go index 5ebd35f6..e13f44b8 100644 --- a/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go +++ b/dsBaseRpc/RpcService/BaseRolePerson/BaseRolePersonDao/BaseRolePersonDao.go @@ -244,6 +244,5 @@ func ConvertRoleIntIdsToGuidIds(idIntArray []string) ([]string, error) { for i := range list { guidArray = append(guidArray, list[i]["role_id"].(string)) } - return guidArray, nil } diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go index 30095ac8..5166e969 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentDao/BaseStudentDao.go @@ -43,7 +43,7 @@ func ActionLog(ms []models.TBaseStudent, actionCode string, actionPersonId strin } //通过主键集合,查找对应的实体bean集合 -func FindModelsByIds(ids []string) ([]models.TBaseStudent, error) { +func GetByIds(ids []string) ([]models.TBaseStudent, error) { ms := make([]models.TBaseStudent, 0) err := db.In("person_id", ids).Find(&ms) if err != nil { @@ -879,7 +879,7 @@ func updateStudentImport(batchId string, bureauModel models.TBaseOrganization,ac for i := range studentArray { studentIds= append(studentIds, studentArray[i].PersonId) } - ms, err := FindModelsByIds(studentIds) + ms, err := GetByIds(studentIds) ActionLog(ms,Const.ActionUpdate,actionPersonId,actionIp) //删除缓存 diff --git a/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go b/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go index 568d9858..c8df7260 100644 --- a/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go +++ b/dsBaseRpc/RpcService/BaseStudent/BaseStudentService/BaseStudentService.go @@ -189,7 +189,7 @@ func (s *Rpc) DeleteBaseStudent(ctx context.Context, in *BaseStudentProto.Delete return &reply, err } //记录日志 - ms, err := BaseStudentDao.FindModelsByIds(in.Ids) + ms, err := BaseStudentDao.GetByIds(in.Ids) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false @@ -209,7 +209,7 @@ func (s *Rpc) DeleteBaseStudent(ctx context.Context, in *BaseStudentProto.Delete //删除对应的家长 SqlKit.DeleteIds("t_base_parent", parentIds) //记录家长表的数据变更 - ms2, err := BaseParentDao.FindModelsByIds(parentIds) + ms2, err := BaseParentDao.GetByIds(parentIds) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false @@ -315,7 +315,7 @@ func (s *Rpc) UpdateBaseStudent(ctx context.Context, in *BaseStudentProto.ModelA return &reply, err } //记录日志 - ms, err := BaseStudentDao.FindModelsByIds([]string{in.PersonId}) + ms, err := BaseStudentDao.GetByIds([]string{in.PersonId}) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false diff --git a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go index 3080df00..f7b67a8d 100644 --- a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go +++ b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherDao/BaseTeacherDao.go @@ -42,7 +42,7 @@ func ActionLog(ms []models.TBaseTeacher, actionCode string, actionPersonId strin } //通过主键集合,查找对应的实体bean集合 -func FindModelsByIds(ids []string) ([]models.TBaseTeacher, error) { +func GetByIds(ids []string) ([]models.TBaseTeacher, error) { ms := make([]models.TBaseTeacher, 0) err := db.In("person_id", ids).Find(&ms) if err != nil { @@ -1031,7 +1031,7 @@ func updateTeacherImport(batchId string, bureauModel models.TBaseOrganization, a teacherIds = append(teacherIds, teacherArray[i].PersonId) } //记录日志 - ms, _ := FindModelsByIds(teacherIds) + ms, _ := GetByIds(teacherIds) ActionLog(ms, Const.ActionUpdate, actionPersonId, actionIp) return len(teacherArray), "保存成功", nil } diff --git a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go index 81fc54ab..97541e76 100644 --- a/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go +++ b/dsBaseRpc/RpcService/BaseTeacher/BaseTeacherService/BaseTeacherService.go @@ -209,7 +209,7 @@ func (s *Rpc) DeleteBaseTeacher(ctx context.Context, in *BaseTeacherProto.Delete return &reply, err } //记录日志 - ms, err := BaseTeacherDao.FindModelsByIds(in.Ids) + ms, err := BaseTeacherDao.GetByIds(in.Ids) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false @@ -321,7 +321,7 @@ func (s *Rpc) UpdateBaseTeacher(ctx context.Context, in *BaseTeacherProto.ModelA return &reply, err } //记录日志 - ms, err := BaseTeacherDao.FindModelsByIds([]string{in.PersonId}) + ms, err := BaseTeacherDao.GetByIds([]string{in.PersonId}) if err != nil { LogUtil.Error(ErrorConst.SqlUpdateError, "执行FindModelsByIds时发生严重错误:"+err.Error()) reply.Success = false