Browse Source

取消lastname同步nickname

pull/313/head
xxq250 3 years ago
parent
commit
29d2ca63ed
3 changed files with 5 additions and 2 deletions
  1. +2
    -1
      app/models/user.rb
  2. +1
    -1
      app/views/users/get_user_info.json.jbuilder
  3. +2
    -0
      db/migrate/20221123023450_update_user_nick_name.rb

+ 2
- 1
app/models/user.rb View File

@@ -193,7 +193,8 @@ class User < Owner
:show_email, :show_location, :show_department, :super_description, :show_super_description,
:technical_title, :province, :city, :custom_department, to: :user_extension, allow_nil: true

before_save :update_hashed_password, :set_lastname
# before_save :update_hashed_password, :set_lastname
before_save :update_hashed_password
after_save :reset_cache_data
after_create do
SyncTrustieJob.perform_later("user", 1) if allow_sync_to_trustie?


+ 1
- 1
app/views/users/get_user_info.json.jbuilder View File

@@ -11,7 +11,7 @@ json.user_identity @user.identity
json.tidding_count 0
json.user_phone_binded @user.phone.present?
json.need_edit_info @user.need_edit_info?
# json.phone @user.phone
json.phone @user.phone
# json.email @user.mail
json.profile_completed @user.profile_is_completed?
json.professional_certification @user.professional_certification


+ 2
- 0
db/migrate/20221123023450_update_user_nick_name.rb View File

@@ -17,5 +17,7 @@ class UpdateUserNickName < ActiveRecord::Migration[5.2]

execute("ALTER TABLE `commit_logs` MODIFY `message` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")

execute("ALTER TABLE `user_extensions` MODIFY `description` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;")

end
end

Loading…
Cancel
Save