|
|
@@ -38,8 +38,19 @@ class ProfitShareReceiverEntity extends BaseEntity
|
|
|
|
|
|
public function getReceiverList(array $params, array $pageAndLimit):Paginator
|
|
|
{
|
|
|
- return $this->where('user_id', $params['user_id'])
|
|
|
+ return $this->where($params)
|
|
|
->append(['status_text'])
|
|
|
->paginate($pageAndLimit);
|
|
|
}
|
|
|
+
|
|
|
+ public function getReceiver(array $params):self
|
|
|
+ {
|
|
|
+ $result = $this->where($params)
|
|
|
+ ->append(['status_text'])
|
|
|
+ ->findOrEmpty();
|
|
|
+ if ($result->isEmpty()) {
|
|
|
+ throw_logic_exception('分账接收方申请记录不存在!');
|
|
|
+ }
|
|
|
+ return $result;
|
|
|
+ }
|
|
|
}
|