Commit 357b9734 authored by jianghaiming's avatar jianghaiming

update:set

parent 91c7b16c
...@@ -34,5 +34,6 @@ class DistributorException extends BaseException ...@@ -34,5 +34,6 @@ class DistributorException extends BaseException
15 => '活动id不能能为空', 15 => '活动id不能能为空',
16 => '商品id不能能为空', 16 => '商品id不能能为空',
17 => '验证码不正确或过期', 17 => '验证码不正确或过期',
18 => '自己不能成为自己的下线',
]; ];
} }
\ No newline at end of file
...@@ -222,6 +222,10 @@ class DistributorService ...@@ -222,6 +222,10 @@ class DistributorService
throw new DistributorException(['cus'=>7]); throw new DistributorException(['cus'=>7]);
} }
if ($jwUserId == $shareUserId) {
throw new DistributorException(['cus' => 18]);
}
$info = Distributor::getRecord(['user_id' => $jwUserId]); $info = Distributor::getRecord(['user_id' => $jwUserId]);
if (!empty($info) && $info['parent_user_id'] > 0) { if (!empty($info) && $info['parent_user_id'] > 0) {
throw new DistributorException(['cus'=>8]); throw new DistributorException(['cus'=>8]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment