문자발송내역 추가
This commit is contained in:
59
app/Controllers/manage/Sms.php
Normal file
59
app/Controllers/manage/Sms.php
Normal file
@@ -0,0 +1,59 @@
|
||||
<?php
|
||||
namespace App\Controllers\manage;
|
||||
|
||||
use App\Controllers\BaseController;
|
||||
use App\Models\manage\SmsModel;
|
||||
|
||||
class Sms extends BaseController
|
||||
{
|
||||
private $smsModel;
|
||||
public function __construct()
|
||||
{
|
||||
$this->smsModel = new SmsModel();
|
||||
}
|
||||
|
||||
public function lists(): string
|
||||
{
|
||||
return view("pages/manage/sms/lists");
|
||||
}
|
||||
|
||||
|
||||
public function getSmsList()
|
||||
{
|
||||
$start = (int) $this->request->getGet('start') ?: 0;
|
||||
$end = (int) $this->request->getGet('length') ?: 10;
|
||||
|
||||
$data = [
|
||||
'start_dt' => $this->request->getGet('start_dt'),
|
||||
'end_dt' => $this->request->getGet('end_dt'),
|
||||
'srchType' => $this->request->getGet('srchType'),
|
||||
'srchTxt' => $this->request->getGet('srchTxt'),
|
||||
];
|
||||
|
||||
$totalCount = $this->smsModel->getTotalCount($data);
|
||||
$datas = $this->smsModel->getSmsList($start, $end, $data);
|
||||
|
||||
return $this->response->setJSON(body: [
|
||||
'recordsTotal' => $totalCount,
|
||||
'recordsFiltered' => $totalCount,
|
||||
'data' => $datas,
|
||||
]);
|
||||
}
|
||||
|
||||
// 엑셀다운로드 - 내역
|
||||
public function excel()
|
||||
{
|
||||
$data = [
|
||||
'start_dt' => $this->request->getGet('start_dt'),
|
||||
'end_dt' => $this->request->getGet('end_dt'),
|
||||
'srchType' => $this->request->getGet('srchType'),
|
||||
'srchTxt' => $this->request->getGet('srchTxt'),
|
||||
];
|
||||
|
||||
$datas = $this->smsModel->getExcelList($data);
|
||||
|
||||
return $this->response->setJSON(body: [
|
||||
'data' => $datas,
|
||||
]);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user