其余文件
This commit is contained in:
39
app/admin/controller/finance/Finance.php
Normal file
39
app/admin/controller/finance/Finance.php
Normal file
@ -0,0 +1,39 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\controller\finance;
|
||||
|
||||
use app\common\basics\AdminBase;
|
||||
use app\admin\logic\finance\FinanceLogic;
|
||||
use think\facade\View;
|
||||
|
||||
/**
|
||||
* 财务中心
|
||||
* Class Finance
|
||||
* @package app\admin\controller\finance
|
||||
*/
|
||||
class Finance extends AdminBase
|
||||
{
|
||||
public function center()
|
||||
{
|
||||
|
||||
View::assign('shop', FinanceLogic::shop());
|
||||
return view();
|
||||
}
|
||||
}
|
||||
65
app/admin/controller/finance/Integral.php
Normal file
65
app/admin/controller/finance/Integral.php
Normal file
@ -0,0 +1,65 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\controller\finance;
|
||||
|
||||
|
||||
use app\admin\logic\finance\IntegralLogic;
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\server\JsonServer;
|
||||
|
||||
class Integral extends AdminBase
|
||||
{
|
||||
/**
|
||||
* @notes 积分明细
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @author ljj
|
||||
* @date 2022/2/22 6:00 下午
|
||||
*/
|
||||
public function integral()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$data = IntegralLogic::integral($get);
|
||||
return JsonServer::success('', $data, 1);
|
||||
}
|
||||
|
||||
return view();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出积分明细Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function export()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = IntegralLogic::integral($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(IntegralLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
}
|
||||
270
app/admin/controller/finance/Shop.php
Normal file
270
app/admin/controller/finance/Shop.php
Normal file
@ -0,0 +1,270 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\controller\finance;
|
||||
|
||||
use app\admin\logic\finance\ShopSettlementLogic;
|
||||
use app\admin\logic\finance\ShopWithdrawalLogic;
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\server\JsonServer;
|
||||
|
||||
use think\facade\View;
|
||||
|
||||
/**
|
||||
* 财务-商家相关
|
||||
* Class Shop
|
||||
* @package app\admin\controller\finance
|
||||
*/
|
||||
class Shop extends AdminBase
|
||||
{
|
||||
/**
|
||||
* @Notes: 商家提现列表
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function withdrawal()
|
||||
{
|
||||
if($this->request->isAjax()){
|
||||
$get= $this->request->get();
|
||||
$lists = ShopWithdrawalLogic::lists($get);
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
|
||||
View::assign('summary', ShopWithdrawalLogic::summary());
|
||||
View::assign('statistics', ShopWithdrawalLogic::statistics());
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 商家提现详细
|
||||
* @Author: 张无忌
|
||||
* @return \think\response\View
|
||||
*/
|
||||
public function withdrawalDetail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
View::assign('detail', ShopWithdrawalLogic::detail($id));
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 商家提现统计
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function withdrawalStatistics()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$statistics = ShopWithdrawalLogic::statistics();
|
||||
return JsonServer::success('获取成功', $statistics);
|
||||
}
|
||||
|
||||
return JsonServer::error('请求异常');
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 审核商家提现
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function withdrawalExamine()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$res = ShopWithdrawalLogic::examine($post);
|
||||
if ($res === false) {
|
||||
$error = ShopWithdrawalLogic::getError() ?: '审核失败';
|
||||
return JsonServer::error($error);
|
||||
}
|
||||
|
||||
return JsonServer::success('审核成功');
|
||||
}
|
||||
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 商家提现转账
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function withdrawalTransfer()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$res = ShopWithdrawalLogic::transfer($post);
|
||||
if ($res === false) {
|
||||
$error = ShopWithdrawalLogic::getError() ?: '审核失败';
|
||||
return JsonServer::error($error);
|
||||
}
|
||||
|
||||
return JsonServer::success('审核成功');
|
||||
}
|
||||
|
||||
$id = $this->request->get('id');
|
||||
View::assign('detail', ShopWithdrawalLogic::detail($id));
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 在线转账
|
||||
* @return \think\response\Json|void
|
||||
* @author lbzy
|
||||
* @datetime 2023-06-07 09:48:22
|
||||
*/
|
||||
function WithdrawalTransferOnline()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$res = ShopWithdrawalLogic::transfer_online($post);
|
||||
if ($res === false) {
|
||||
$error = ShopWithdrawalLogic::getError() ? : '在线转账失败';
|
||||
return JsonServer::error($error);
|
||||
}
|
||||
|
||||
return JsonServer::success(ShopWithdrawalLogic::getError() ? : '在线转账成功');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Notes: 商家结算列表
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function settlement()
|
||||
{
|
||||
if($this->request->isAjax()){
|
||||
$get= $this->request->get();
|
||||
$lists = ShopSettlementLogic::lists($get);
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
|
||||
$statistics = ShopSettlementLogic::statistics();
|
||||
View::assign('statistics', $statistics);
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 商家结算记录
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function settlementRecord()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$lists = ShopSettlementLogic::record($get);
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
|
||||
$shop_id = $this->request->get('shop_id');
|
||||
$statistics = ShopSettlementLogic::statistics($shop_id);
|
||||
View::assign('shop_id', $shop_id);
|
||||
View::assign('statistics', $statistics);
|
||||
return view();
|
||||
}
|
||||
|
||||
/**
|
||||
* @Notes: 商家结算详细记录
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function settlementDetail()
|
||||
{
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$lists = ShopSettlementLogic::detail($get);
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
|
||||
$settle_id = $this->request->get('settle_id');
|
||||
View::assign('settle_id', $settle_id);
|
||||
return view();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @Notes: 账户明细列表
|
||||
* @Author: 张无忌
|
||||
*/
|
||||
public function account()
|
||||
{
|
||||
if($this->request->isAjax()){
|
||||
$get= $this->request->get();
|
||||
$lists = ShopWithdrawalLogic::account($get);
|
||||
return JsonServer::success('获取成功', $lists);
|
||||
}
|
||||
|
||||
return view();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出商家提现Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function withdrawalExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = ShopWithdrawalLogic::lists($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(ShopWithdrawalLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 导出商家结算Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function settlementExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = ShopSettlementLogic::lists($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(ShopSettlementLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出商家账户明细Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function accountExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = ShopWithdrawalLogic::account($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(ShopWithdrawalLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
}
|
||||
476
app/admin/controller/finance/User.php
Normal file
476
app/admin/controller/finance/User.php
Normal file
@ -0,0 +1,476 @@
|
||||
<?php
|
||||
// +----------------------------------------------------------------------
|
||||
// | likeshop开源商城系统
|
||||
// +----------------------------------------------------------------------
|
||||
// | 欢迎阅读学习系统程序代码,建议反馈是我们前进的动力
|
||||
// | gitee下载:https://gitee.com/likeshop_gitee
|
||||
// | github下载:https://github.com/likeshop-github
|
||||
// | 访问官网:https://www.likeshop.cn
|
||||
// | 访问社区:https://home.likeshop.cn
|
||||
// | 访问手册:http://doc.likeshop.cn
|
||||
// | 微信公众号:likeshop技术社区
|
||||
// | likeshop系列产品在gitee、github等公开渠道开源版本可免费商用,未经许可不能去除前后端官方版权标识
|
||||
// | likeshop系列产品收费版本务必购买商业授权,购买去版权授权后,方可去除前后端官方版权标识
|
||||
// | 禁止对系统程序代码以任何目的,任何形式的再发布
|
||||
// | likeshop团队版权所有并拥有最终解释权
|
||||
// +----------------------------------------------------------------------
|
||||
// | author: likeshop.cn.team
|
||||
// +----------------------------------------------------------------------
|
||||
|
||||
namespace app\admin\controller\finance;
|
||||
|
||||
use app\common\basics\AdminBase;
|
||||
use app\common\model\AccountLog;
|
||||
use app\common\server\JsonServer;
|
||||
use app\admin\logic\finance\WithdrawLogic;
|
||||
use app\common\model\order\Order as OrderModel;
|
||||
use app\common\model\Client_;
|
||||
use app\common\enum\PayEnum;
|
||||
|
||||
/**
|
||||
* 财务-会员相关
|
||||
* Class User
|
||||
* @package app\admin\controller\finance
|
||||
*/
|
||||
class User extends AdminBase
|
||||
{
|
||||
/**
|
||||
* @notes 会员佣金提现列表
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:01 下午
|
||||
*/
|
||||
public function withdrawal()
|
||||
{
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$data = WithdrawLogic::lists($get);
|
||||
return JsonServer::success('', $data, 1);
|
||||
}
|
||||
$today = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399)
|
||||
];
|
||||
|
||||
$yesterday = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399)
|
||||
];
|
||||
|
||||
|
||||
$days_ago7 = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
|
||||
$days_ago30 = [
|
||||
date('Y-m-d 00:00:00', strtotime("-30 day")),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
$summary = WithdrawLogic::summary();
|
||||
return view('', [
|
||||
'today' => $today,
|
||||
'yesterday' => $yesterday,
|
||||
'days_ago7' => $days_ago7,
|
||||
'days_ago30' => $days_ago30,
|
||||
'summary' => $summary
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 会员佣金明细列表
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:01 下午
|
||||
*/
|
||||
public function commission()
|
||||
{
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$data = WithdrawLogic::commission($get);
|
||||
return JsonServer::success('', $data, 1);
|
||||
}
|
||||
$today = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399)
|
||||
];
|
||||
|
||||
$yesterday = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399)
|
||||
];
|
||||
|
||||
|
||||
$days_ago7 = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
|
||||
$days_ago30 = [
|
||||
date('Y-m-d 00:00:00', strtotime("-30 day")),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
return view('', [
|
||||
'today' => $today,
|
||||
'yesterday' => $yesterday,
|
||||
'days_ago7' => $days_ago7,
|
||||
'days_ago30' => $days_ago30,
|
||||
'source_type' => AccountLog::getEarningsChange()
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 充值明细列表
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:01 下午
|
||||
*/
|
||||
public function recharge()
|
||||
{
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$data = WithdrawLogic::recharge($get);
|
||||
return JsonServer::success('', $data, 1);
|
||||
}
|
||||
// 订单状态
|
||||
$order_status = OrderModel::getOrderStatus(true);
|
||||
// 订单类型
|
||||
$order_type = OrderModel::getOrderType(true);
|
||||
// 订单来源
|
||||
$order_source = Client_::getClient(true);
|
||||
unset($order_source[2]);
|
||||
// 支付方式
|
||||
$pay_way = PayEnum::getPayWay(true);
|
||||
unset($pay_way[3], $pay_way[4]);
|
||||
// 配送方式
|
||||
$today = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399)
|
||||
];
|
||||
|
||||
$yesterday = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399)
|
||||
];
|
||||
|
||||
|
||||
$days_ago7 = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
|
||||
$days_ago30 = [
|
||||
date('Y-m-d 00:00:00', strtotime("-30 day")),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
return view('', [
|
||||
'order_status' => $order_status,
|
||||
'order_type' => $order_type,
|
||||
'order_source' => $order_source,
|
||||
'pay_way' => $pay_way,
|
||||
'today' => $today,
|
||||
'yesterday' => $yesterday,
|
||||
'days_ago7' => $days_ago7,
|
||||
'days_ago30' => $days_ago30,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 账户明细列表
|
||||
* @return \think\response\Json|\think\response\View
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function account()
|
||||
{
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$get = $this->request->get();
|
||||
$data = WithdrawLogic::account($get);
|
||||
return JsonServer::success('', $data, 1);
|
||||
}
|
||||
$today = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time()))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", time())) + 86399)
|
||||
];
|
||||
|
||||
$yesterday = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day")))),
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-1 day"))) + 86399)
|
||||
];
|
||||
|
||||
|
||||
$days_ago7 = [
|
||||
date('Y-m-d H:i:s', strtotime(date("Y-m-d", strtotime("-7 day")))),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
|
||||
$days_ago30 = [
|
||||
date('Y-m-d 00:00:00', strtotime("-30 day")),
|
||||
date('Y-m-d 23:59:59', time())
|
||||
];
|
||||
return view('', [
|
||||
'today' => $today,
|
||||
'yesterday' => $yesterday,
|
||||
'days_ago7' => $days_ago7,
|
||||
'days_ago30' => $days_ago30,
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 会员佣金提现详情
|
||||
* @return \think\response\View
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function withdraw_detail()
|
||||
{
|
||||
|
||||
$id = $this->request->get('id', '', 'intval');
|
||||
$detail = WithdrawLogic::detail($id);
|
||||
return view('detail', [
|
||||
'detail' => $detail
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 显示提现审核界面
|
||||
* @return \think\response\View
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function withdraw_review()
|
||||
{
|
||||
|
||||
$id = $this->request->get('id', '', 'intval');
|
||||
return view('review', [
|
||||
'id' => $id
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 审核通过
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function confirm()
|
||||
{
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
$result = WithdrawLogic::confirm($post);
|
||||
if ($result['code']) {
|
||||
return JsonServer::success($result['msg']);
|
||||
} else {
|
||||
return JsonServer::error($result['msg']);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 审核拒绝
|
||||
* @return \think\response\Json
|
||||
* @throws \think\exception\PDOException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function refuse()
|
||||
{
|
||||
|
||||
if ($this->request->isAjax()) {
|
||||
$post = $this->request->post();
|
||||
WithdrawLogic::refuse($post);
|
||||
return JsonServer::success('已拒绝提现');
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 显示提现转账界面
|
||||
* @return \think\response\View
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function transfer()
|
||||
{
|
||||
|
||||
$id = $this->request->get('id', '', 'intval');
|
||||
return view('', [
|
||||
'id' => $id
|
||||
]);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 转账失败
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function transferFail()
|
||||
{
|
||||
|
||||
$post = $this->request->post();
|
||||
$result = WithdrawLogic::transferFail($post);
|
||||
if ($result['code']) {
|
||||
return JsonServer::success($result['msg']);
|
||||
} else {
|
||||
return JsonServer::error($result['msg']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 转账成功
|
||||
* @return \think\response\Json
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function transferSuccess()
|
||||
{
|
||||
|
||||
$post = $this->request->post();
|
||||
$result = WithdrawLogic::transferSuccess($post);
|
||||
if ($result['code']) {
|
||||
return JsonServer::success($result['msg']);
|
||||
} else {
|
||||
return JsonServer::error($result['msg']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 提现结果查询
|
||||
* @return \think\response\Json
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:02 下午
|
||||
*/
|
||||
public function search()
|
||||
{
|
||||
|
||||
$id = $this->request->post('id', '', 'intval');
|
||||
$result = WithdrawLogic::search($id);
|
||||
if ($result['code']) {
|
||||
return JsonServer::success($result['msg']);
|
||||
} else {
|
||||
return JsonServer::error($result['msg']);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 提现失败
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @throws \think\exception\DbException
|
||||
* @author suny
|
||||
* @date 2021/7/13 7:03 下午
|
||||
*/
|
||||
public function withdrawFailed()
|
||||
{
|
||||
|
||||
$id = $this->request->post('id', '', 'intval');
|
||||
WithdrawLogic::withdrawFailed($id);
|
||||
return JsonServer::success('提现失败已回退佣金');
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出充值明细Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function rechargeExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = WithdrawLogic::recharge($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(WithdrawLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出账户明细Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function accountExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = WithdrawLogic::account($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(WithdrawLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出佣金明细Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function commissionExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = WithdrawLogic::commission($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(WithdrawLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 导出佣金提现Excel
|
||||
* @return \think\response\Json
|
||||
* @throws \think\db\exception\DataNotFoundException
|
||||
* @throws \think\db\exception\DbException
|
||||
* @throws \think\db\exception\ModelNotFoundException
|
||||
* @author 段誉
|
||||
* @date 2022/4/24 10:20
|
||||
*/
|
||||
public function withdrawalExport()
|
||||
{
|
||||
$params = $this->request->get();
|
||||
$result = WithdrawLogic::lists($params, true);
|
||||
if(false === $result) {
|
||||
return JsonServer::error(WithdrawLogic::getError() ?: '导出失败');
|
||||
}
|
||||
return JsonServer::success('', $result);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user