| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374 |
- <?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();
- }
- }
|