|
|
@@ -102,6 +102,11 @@ class PropertyCommissionLogic extends BaseLogic
|
|
|
{
|
|
|
Db::startTrans();
|
|
|
try {
|
|
|
+ //提现状态0无申请中 1有申请中
|
|
|
+ $isId = PropertySurplusLog::where(['in_out' => 2,'status' => 0])->value('id');
|
|
|
+ if($isId){
|
|
|
+ throw new Exception('存在申请中订单,不可重复申请提现');
|
|
|
+ }
|
|
|
$propertyHeadInfo = PropertyHead::where('user_id',$params['user_id'])->lock(true)->findOrEmpty();
|
|
|
if($propertyHeadInfo->isEmpty()){
|
|
|
throw new Exception('物业负责人不存在');
|
|
|
@@ -144,6 +149,12 @@ class PropertyCommissionLogic extends BaseLogic
|
|
|
self::setError('物业负责人不存在');
|
|
|
return [];
|
|
|
}
|
|
|
- return $propertyHeadInfo->toArray();
|
|
|
+ $resData = $propertyHeadInfo->toArray();
|
|
|
+ $resData['surplus_status'] = 0;//提现状态0无申请中 1有申请中
|
|
|
+ $isId = PropertySurplusLog::where(['in_out' => 2,'status' => 0])->value('id');
|
|
|
+ if($isId){
|
|
|
+ $resData['surplus_status'] = 1;
|
|
|
+ }
|
|
|
+ return $resData;
|
|
|
}
|
|
|
}
|