排序规则调整
This commit is contained in:
@@ -12,6 +12,7 @@ use app\common\model\User;
|
||||
use app\common\service\OssService;
|
||||
use app\common\traits\crud\CrudControllerTrait;
|
||||
use app\common\service\FinReceiptService;
|
||||
use support\Request;
|
||||
|
||||
class FinReceiptController extends BaseController
|
||||
{
|
||||
@@ -23,7 +24,18 @@ class FinReceiptController extends BaseController
|
||||
{
|
||||
$this->service = new FinReceiptService();
|
||||
}
|
||||
|
||||
public function show(Request $request)
|
||||
{
|
||||
try {
|
||||
$raw = $this->service->serviceShow($request);
|
||||
$data = $this->transformData($raw, method_exists($this, 'showFormat')
|
||||
? [$this, 'showFormat']
|
||||
: null);
|
||||
return $this->success($data);
|
||||
} catch (\Throwable $e) {
|
||||
return $this->error($e->getMessage());
|
||||
}
|
||||
}
|
||||
/**
|
||||
* 列表页数据格式化
|
||||
*
|
||||
@@ -91,6 +103,8 @@ class FinReceiptController extends BaseController
|
||||
if(!$paymentApply)
|
||||
return $data;
|
||||
$paymentApply = $paymentApply->toArray();
|
||||
$paymentApply['created_at'] = strtotime($paymentApply['created_at']);
|
||||
$paymentApply['updated_at'] = strtotime($paymentApply['updated_at']);
|
||||
$paymentApply = (new FinPaymentApplyController())->showFormat($paymentApply);
|
||||
$data['payment_apply'] = $paymentApply;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user