feat(UserShipLogic): 增加判断逻辑,避免重复设置村长或队长
This commit is contained in:
parent
faf5fab258
commit
380e121726
@ -113,6 +113,9 @@ class UserShipLogic extends BaseLogic
|
||||
if($arr){
|
||||
$find=UserAddress::where('uid','in',$arr)->where('village',$params['village'])->find();
|
||||
if($find){
|
||||
if($params['uid']==$find['uid']){
|
||||
return true;
|
||||
}
|
||||
self::setError('该区域已有村长请重新选择');
|
||||
return false;
|
||||
}
|
||||
@ -126,6 +129,9 @@ class UserShipLogic extends BaseLogic
|
||||
if($arr){
|
||||
$find=UserAddress::where('uid','in',$arr)->where('village',$params['village'])->where('brigade',$params['brigade'])->find();
|
||||
if($find){
|
||||
if($params['uid']==$find['uid']){
|
||||
return true;
|
||||
}
|
||||
self::setError('该区域已有队长请重新选择');
|
||||
return false;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user