zengyyh 4 months ago
parent ae93f0425f
commit b221de6dd9
  1. 46
      app/common/model/OpenShop.php
  2. 2
      app/common/model/Tipoff.php
  3. 2
      app/store/controller/Store.php

@ -32,13 +32,38 @@ class OpenShop extends BaseModel
$list = $this->where($filter)->order('create_time', 'desc')->paginate($param['pageSize'] ?? 15)->toArray(); $list = $this->where($filter)->order('create_time', 'desc')->paginate($param['pageSize'] ?? 15)->toArray();
foreach ($list['data'] as &$value) { foreach ($list['data'] as &$value) {
$value['card_front_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['id_card_front_id'])->select(); if (isset($value['id_card_front_id']) && $value['id_card_front_id'] !== null) {
$value['card_back_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['id_card_back_id'])->select(); $value['card_front_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['id_card_front_id'])->select();
$value['business_license_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['business_license_id'])->select(); } else {
$value['photo_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['photo_id'])->select(); $value['card_front_url'] = null;
$value['qr_code_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['qr_code_id'])->select(); }
if (isset($value['id_card_back_id']) && $value['id_card_back_id'] !== null) {
$value['card_back_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['id_card_back_id'])->select();
} else {
$value['card_back_url'] = null;
}
if (isset($value['business_license_id']) && $value['business_license_id'] !== null) {
$value['business_license_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['business_license_id'])->select();
} else {
$value['business_license_url'] = null;
}
if (isset($value['photo_id']) && $value['photo_id'] !== null) {
$value['photo_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['photo_id'])->select();
} else {
$value['photo_url'] = null;
}
if (isset($value['qr_code_id']) && $value['qr_code_id'] !== null) {
$value['qr_code_url'] = UploadFile::withoutGlobalScope()->where("file_id", $value['qr_code_id'])->select();
} else {
$value['qr_code_url'] = null;
}
} }
return $list; return $list;
} }
@ -49,6 +74,7 @@ class OpenShop extends BaseModel
$params = $this->setQueryDefaultValue($param, [ $params = $this->setQueryDefaultValue($param, [
'name' =>"", // 查询内容 'name' =>"", // 查询内容
'mobile' => "", // 手机号 'mobile' => "", // 手机号
"type"=> "",
'betweenTime' => [] // 起止时间 'betweenTime' => [] // 起止时间
]); ]);
// 检索查询条件 // 检索查询条件
@ -72,7 +98,13 @@ class OpenShop extends BaseModel
if (!empty($params['mobile'])) { if (!empty($params['mobile'])) {
$filter[] = ['mobile', 'like', "%{$params['mobile']}%"]; $filter[] = ['mobile', 'like', "%{$params['mobile']}%"];
} }
// 类型
if (!empty($params['type'])) {
$filter[] = ['type', '=', $params['type']];
}
return $filter; return $filter;
} }
} }

@ -24,7 +24,7 @@ class Tipoff extends BaseModel
{ {
$filter = $this->getQueryFilter($param); $filter = $this->getQueryFilter($param);
$jd = new Jd(); $jd = new Jd();
$list = $this->where($filter)->order('create_time', 'desc')->paginate($param['pageSize'] ?? 15)->toArray(); $list = $this->where($filter)->order('create_time', 'desc')->paginate($param['pageSize'] ?? 150)->toArray();
foreach ($list['data'] as &$value) { foreach ($list['data'] as &$value) {
if (isset($value['goods_id'])) { if (isset($value['goods_id'])) {

@ -212,7 +212,7 @@ class Store extends Controller
public function getOpenShopList() public function getOpenShopList()
{ {
$model = new OpenShop(); $model = new OpenShop();
$list = $model->getList(); $list = $model->getList($this->request->param());
return $this->renderSuccess(compact('list')); return $this->renderSuccess(compact('list'));
} }

Loading…
Cancel
Save