'上传接口文档'
This commit is contained in:
@@ -2,6 +2,8 @@
|
|||||||
|
|
||||||
namespace App\Admin\Controllers\Finance;
|
namespace App\Admin\Controllers\Finance;
|
||||||
|
|
||||||
|
use App\Models\AccountRule;
|
||||||
|
use App\Models\ActivityRule;
|
||||||
use App\Models\User;
|
use App\Models\User;
|
||||||
use Encore\Admin\Controllers\AdminController;
|
use Encore\Admin\Controllers\AdminController;
|
||||||
use Encore\Admin\Facades\Admin;
|
use Encore\Admin\Facades\Admin;
|
||||||
@@ -10,11 +12,11 @@ use Encore\Admin\Layout\Content;
|
|||||||
|
|
||||||
class CensusController extends AdminController
|
class CensusController extends AdminController
|
||||||
{
|
{
|
||||||
|
|
||||||
protected $today = false;
|
protected $today = false;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Index interface.
|
* Index interface.
|
||||||
*
|
|
||||||
* @param Content $content
|
* @param Content $content
|
||||||
* @return Content
|
* @return Content
|
||||||
*/
|
*/
|
||||||
@@ -28,12 +30,13 @@ class CensusController extends AdminController
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 今日核销数据
|
* 今日核销数据
|
||||||
* @param Content $content [description]
|
* @param Content $content [description]
|
||||||
* @return [type] [description]
|
* @return [type] [description]
|
||||||
*/
|
*/
|
||||||
public function today(Content $content)
|
public function today(Content $content)
|
||||||
{
|
{
|
||||||
$this->today = true;
|
$this->today = true;
|
||||||
|
|
||||||
return $content
|
return $content
|
||||||
->header('核销今日数据')
|
->header('核销今日数据')
|
||||||
->description('description')
|
->description('description')
|
||||||
@@ -65,22 +68,29 @@ class CensusController extends AdminController
|
|||||||
$grid->column('渠道')->display(function () {
|
$grid->column('渠道')->display(function () {
|
||||||
return $this->info->nickname;
|
return $this->info->nickname;
|
||||||
});
|
});
|
||||||
|
|
||||||
$today = $this->today;
|
$today = $this->today;
|
||||||
|
$rules = ActivityRule::get();
|
||||||
|
|
||||||
$grid->column('100元减10元优惠券')->display(function () use ($today) {
|
foreach ($rules as $rule) {
|
||||||
return $this->getCouponCount('YSD-full100-10', $today);
|
$grid->column($rule->title)->display(function () use ($today, $rule) {
|
||||||
});
|
return $this->getCouponCount($rule->code, $today);
|
||||||
|
});
|
||||||
$grid->column('100元减25元优惠券')->display(function () use ($today) {
|
}
|
||||||
return $this->getCouponCount('YSD-full100-25', $today);
|
// $grid->column('100元减10元优惠券')->display(function () use ($today) {
|
||||||
});
|
// return $this->getCouponCount('YSD-full100-10', $today);
|
||||||
$grid->column('100元减50元优惠券')->display(function () use ($today) {
|
// });
|
||||||
return $this->getCouponCount('YSD-full100-50', $today);
|
//
|
||||||
});
|
// $grid->column('100元减25元优惠券')->display(function () use ($today) {
|
||||||
|
// return $this->getCouponCount('YSD-full100-25', $today);
|
||||||
$grid->column(' 200元减100元优惠券')->display(function () use ($today) {
|
// });
|
||||||
return $this->getCouponCount('YSD-full200-100', $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;
|
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