tapi/app/controller/admin/xm/ProductGroupController.php
2025-09-11 22:56:50 +08:00

27 lines
685 B
PHP

<?php
namespace app\controller\admin\xm;
use app\BaseController;
use app\service\CurdService;
use think\response\Json;
class ProductGroupController extends BaseController
{
public function page(): Json
{
try{
$model = \app\entity\XmProductGroup::withSearch([], [
'name' => $this->request->get('name/s', ''),
'comments' => $this->request->get('comments/s', ''),
]);
$paginate = CurdService::getPaginate($this->request, $model);
}catch (\Exception $e){
return $this->writeError($e->getMessage());
}
return $this->writeSuccess('success', $paginate);
}
}