master
huanghai 5 years ago
parent 1c07856cbb
commit d4a0da3813

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

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

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

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

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

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

@ -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)
//删除缓存

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

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

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

Loading…
Cancel
Save