|
|
@@ -39,12 +39,14 @@ class Order < ActiveRecord::Base
|
|
|
end
|
|
|
end
|
|
|
end
|
|
|
+ wxUser = WxUser.where("express_company = ?", self.express_company).first
|
|
|
|
|
|
- if !self.wx_user.blank?
|
|
|
+ if wxUser.blank?
|
|
|
self.errors.add("微信ID不存在")
|
|
|
end
|
|
|
- self.depart=self.wx_user.depart
|
|
|
- self.user_id=self.wx_user.user_id
|
|
|
+
|
|
|
+ self.depart=wxUser.depart
|
|
|
+ self.user_id=wxUser.user_id
|
|
|
self.status="processing"
|
|
|
end
|
|
|
|