WithdrawLogService.php 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\extra\service\blue;
  3. use app\extra\basic\Service;
  4. use app\model\blue\BlueWithdrawLog;
  5. class WithdrawLogService extends Service
  6. {
  7. /**
  8. * 列表
  9. * @param array $param
  10. */
  11. public function getList(array $param = [],string $field = "*")
  12. {
  13. $this->mode = new BlueWithdrawLog();
  14. return $this->searchVal($param,$this->searchFilter($param))->with(['bank' => function ($query) {
  15. $query->field("id,bank_code,bank_name")->append(['bank_img'])->withAttr(['bank_img' => function($data,$resp){
  16. return "https://apimg.alipay.com/combo.png?d=cashier&t={$resp['bank_code']}";
  17. }]);
  18. }])->field($field)->paginate([
  19. "list_rows" => $param['pageSize'],
  20. "page" => $param['page']
  21. ]);
  22. }
  23. /**
  24. *
  25. * @param array $param
  26. * @return array
  27. */
  28. public function searchFilter(array $param = []): array
  29. {
  30. $filter = [];
  31. !empty($param['openid']) && $filter[] = ["openid", '=', $param['openid']];
  32. return $filter;
  33. }
  34. }