| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273 |
- <?php
- namespace app\admin\controller\coupon;
- use app\admin\model\SystemAdmin;
- use app\common\model\CouponAreaModel;
- use app\common\model\CouponPlanLogModel;
- use app\common\model\CouponPlanModel;
- use app\common\model\ShopCategory;
- use app\admin\traits\Curd;
- use app\common\controller\AdminController;
- use app\common\model\ThirddataLogModel;
- use app\common\model\ThirddataModel;
- use EasyAdmin\annotation\ControllerAnnotation;
- use EasyAdmin\annotation\NodeAnotation;
- use think\App;
- use think\facade\Db;
- use think\Model;
- /**
- * Class Admin
- * @package app\admin\controller\system
- * @ControllerAnnotation(title="消费券购买列表")
- */
- class Couponplanbuylog extends AdminController
- {
- use Curd;
- public function __construct(App $app)
- {
- parent::__construct($app);
- $this->model = new CouponPlanLogModel();
- }
- public function index ()
- {
- if ($this->request->isAjax()) {
- if (input('selectFields')) {
- return $this->selectList();
- }
- list($page, $limit, $where) = $this->buildTableParames();
- $count = $this->model
- ->withJoin(['area', 'plan', 'user'], 'LEFT')
- ->where($where)
- ->count();
- $list = $this->model
- ->withJoin(['area', 'plan', 'user'], 'LEFT')
- ->where($where)
- ->page($page, $limit)
- ->order($this->sort)
- ->select();
- $data = [
- 'code' => 0,
- 'msg' => '',
- 'count' => $count,
- 'data' => $list,
- ];
- return json($data);
- }
- return $this->fetch();
- }
- }
|