modify bind open user api message

dev_cxt2
p31729568 5 years ago
parent 088da53e16
commit 99157669c0

@ -17,7 +17,7 @@ class CreateBindUserService < ApplicationService
bind_user = User.try_to_login(params[:username], params[:password]) bind_user = User.try_to_login(params[:username], params[:password])
raise Error, '用户名或者密码错误' if bind_user.blank? raise Error, '用户名或者密码错误' if bind_user.blank?
raise Error, '该账号已被其他微信号绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s) raise Error, '该账号已被绑定,请更换其他账号进行绑定' if bind_user.bind_open_user?(params[:type].to_s)
ActiveRecord::Base.transaction do ActiveRecord::Base.transaction do
open_user.user_id = bind_user.id open_user.user_id = bind_user.id

Loading…
Cancel
Save