CouponData.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. namespace app\admin\controller\informational;
  3. use app\common\model\ShopCategory;
  4. use app\admin\traits\Curd;
  5. use app\common\controller\AdminController;
  6. use EasyAdmin\annotation\ControllerAnnotation;
  7. use EasyAdmin\annotation\NodeAnotation;
  8. use think\App;
  9. use think\facade\Db;
  10. use think\Model;
  11. /**
  12. * (业务已取消)
  13. * Class Admin
  14. * @package app\admin\controller\system
  15. * @ControllerAnnotation(title="商品分类管理")
  16. */
  17. class CouponData extends AdminController
  18. {
  19. use Curd;
  20. public function __construct(App $app)
  21. {
  22. parent::__construct($app);
  23. $this->model = new ShopCategory();
  24. }
  25. public function index(){
  26. $score = Db::name('user')->where('id', 'not in', [7493267, 7493266])->where('user_type', 'not in', [4])->sum('score');
  27. $this->assign('score', $score);
  28. $chizi = Db::name('coupon_plan_log')->where('state', 1)->where('uid', 'not in', [7493267,7493266])->sum('buy_num');
  29. $this->assign('chizi', $chizi);
  30. return $this->fetch();
  31. }
  32. }