'上传接口文档'
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
|
||||
namespace App\Admin\Controllers\Finance;
|
||||
|
||||
use App\Models\AccountRule;
|
||||
use App\Models\ActivityRule;
|
||||
use App\Models\User;
|
||||
use Encore\Admin\Controllers\AdminController;
|
||||
use Encore\Admin\Facades\Admin;
|
||||
@@ -10,11 +12,11 @@ use Encore\Admin\Layout\Content;
|
||||
|
||||
class CensusController extends AdminController
|
||||
{
|
||||
|
||||
protected $today = false;
|
||||
|
||||
/**
|
||||
* Index interface.
|
||||
*
|
||||
* @param Content $content
|
||||
* @return Content
|
||||
*/
|
||||
@@ -34,6 +36,7 @@ class CensusController extends AdminController
|
||||
public function today(Content $content)
|
||||
{
|
||||
$this->today = true;
|
||||
|
||||
return $content
|
||||
->header('核销今日数据')
|
||||
->description('description')
|
||||
@@ -65,22 +68,29 @@ class CensusController extends AdminController
|
||||
$grid->column('渠道')->display(function () {
|
||||
return $this->info->nickname;
|
||||
});
|
||||
|
||||
$today = $this->today;
|
||||
$rules = ActivityRule::get();
|
||||
|
||||
$grid->column('100元减10元优惠券')->display(function () use ($today) {
|
||||
return $this->getCouponCount('YSD-full100-10', $today);
|
||||
});
|
||||
|
||||
$grid->column('100元减25元优惠券')->display(function () use ($today) {
|
||||
return $this->getCouponCount('YSD-full100-25', $today);
|
||||
});
|
||||
$grid->column('100元减50元优惠券')->display(function () use ($today) {
|
||||
return $this->getCouponCount('YSD-full100-50', $today);
|
||||
});
|
||||
|
||||
$grid->column(' 200元减100元优惠券')->display(function () use ($today) {
|
||||
return $this->getCouponCount('YSD-full200-100', $today);
|
||||
foreach ($rules as $rule) {
|
||||
$grid->column($rule->title)->display(function () use ($today, $rule) {
|
||||
return $this->getCouponCount($rule->code, $today);
|
||||
});
|
||||
}
|
||||
// $grid->column('100元减10元优惠券')->display(function () use ($today) {
|
||||
// return $this->getCouponCount('YSD-full100-10', $today);
|
||||
// });
|
||||
//
|
||||
// $grid->column('100元减25元优惠券')->display(function () use ($today) {
|
||||
// return $this->getCouponCount('YSD-full100-25', $today);
|
||||
// });
|
||||
// $grid->column('100元减50元优惠券')->display(function () use ($today) {
|
||||
// return $this->getCouponCount('YSD-full100-50', $today);
|
||||
// });
|
||||
//
|
||||
// $grid->column(' 200元减100元优惠券')->display(function () use ($today) {
|
||||
// return $this->getCouponCount('YSD-full200-100', $today);
|
||||
// });
|
||||
|
||||
return $grid;
|
||||
}
|
||||
|
||||
BIN
docs/亿时代平安券码渠道接口说明文档.docx
Normal file
BIN
docs/亿时代平安券码渠道接口说明文档.docx
Normal file
Binary file not shown.
BIN
docs/亿时代自有券码接口说明文档.docx
Normal file
BIN
docs/亿时代自有券码接口说明文档.docx
Normal file
Binary file not shown.
Reference in New Issue
Block a user