|
@@ -437,6 +437,8 @@ func (this *UsersController) Move() {
|
|
br.Msg = "请选择机构"
|
|
br.Msg = "请选择机构"
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+ req.RealName = strings.TrimSpace(req.RealName)
|
|
|
|
+
|
|
usersOb := new(models.Users)
|
|
usersOb := new(models.Users)
|
|
userItem, e := usersOb.GetItemById(req.UserId)
|
|
userItem, e := usersOb.GetItemById(req.UserId)
|
|
if e != nil {
|
|
if e != nil {
|
|
@@ -466,6 +468,10 @@ func (this *UsersController) Move() {
|
|
userItem.AuthStatus = companyItem.AuthStatus
|
|
userItem.AuthStatus = companyItem.AuthStatus
|
|
userItem.ModifyTime = time.Now().Local()
|
|
userItem.ModifyTime = time.Now().Local()
|
|
updateCols := []string{usersOb.Cols().CompanyId, usersOb.Cols().CompanyName, usersOb.Cols().AuthStatus, usersOb.Cols().ModifyTime}
|
|
updateCols := []string{usersOb.Cols().CompanyId, usersOb.Cols().CompanyName, usersOb.Cols().AuthStatus, usersOb.Cols().ModifyTime}
|
|
|
|
+ if req.RealName != "" {
|
|
|
|
+ userItem.RealName = req.RealName
|
|
|
|
+ updateCols = append(updateCols, usersOb.Cols().RealName)
|
|
|
|
+ }
|
|
if e = userItem.Update(updateCols); e != nil {
|
|
if e = userItem.Update(updateCols); e != nil {
|
|
br.Msg = "操作失败"
|
|
br.Msg = "操作失败"
|
|
br.ErrMsg = fmt.Sprintf("移动用户失败, %v", e)
|
|
br.ErrMsg = fmt.Sprintf("移动用户失败, %v", e)
|