|
@@ -5,7 +5,7 @@ class Employ < ActiveRecord::Base
|
|
|
validate :employ_validation
|
|
validate :employ_validation
|
|
|
def employ_validation
|
|
def employ_validation
|
|
|
usr = User.where("tel = ?", self.mobile).first
|
|
usr = User.where("tel = ?", self.mobile).first
|
|
|
- if usr.blank?
|
|
|
|
|
|
|
+ if !usr.blank?
|
|
|
wu = WxUser.where("user_id = ?", usr.id).first
|
|
wu = WxUser.where("user_id = ?", usr.id).first
|
|
|
if !wu.blank?
|
|
if !wu.blank?
|
|
|
self.wx_user_id = wu.id
|
|
self.wx_user_id = wu.id
|