CouponData.php 1014 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  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. * Class Admin
  13. * @package app\admin\controller\system
  14. * @ControllerAnnotation(title="商品分类管理")
  15. */
  16. class CouponData extends AdminController
  17. {
  18. use Curd;
  19. public function __construct(App $app)
  20. {
  21. parent::__construct($app);
  22. $this->model = new ShopCategory();
  23. }
  24. public function index(){
  25. $score = Db::name('user')->where('id', 'not in', [7493267, 7493266])->where('user_type', 'not in', [4])->sum('score');
  26. $this->assign('score', $score);
  27. $chizi = Db::name('coupon_plan_log')->where('state', 1)->where('uid', 'not in', [7493267,7493266])->sum('buy_num');
  28. $this->assign('chizi', $chizi);
  29. return $this->fetch();
  30. }
  31. }