初始版本
This commit is contained in:
113
server/app/shopapi/controller/WithdrawController.php
Executable file
113
server/app/shopapi/controller/WithdrawController.php
Executable file
@@ -0,0 +1,113 @@
|
||||
<?php
|
||||
namespace app\shopapi\controller;
|
||||
use app\shopapi\lists\WithdrawalLogLists;
|
||||
use app\shopapi\logic\WithdrawLogic;
|
||||
|
||||
/**
|
||||
* 提现列表
|
||||
* Class WithdrawController
|
||||
* @package app\shopapi\controller
|
||||
*/
|
||||
class WithdrawController extends BaseShopController
|
||||
{
|
||||
|
||||
public function lists()
|
||||
{
|
||||
$lists = (new WithdrawLogic())->lists($this->shopId);
|
||||
return $this->success('',$lists);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/26 00:09
|
||||
*/
|
||||
public function getWithDrawWay()
|
||||
{
|
||||
$type = $this->request->get('type',1);
|
||||
$lists = (new WithdrawLogic())->getWithDrawWay($this->shopId,$type);
|
||||
return $this->success('',$lists);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 设置提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/9/26 00:24
|
||||
*/
|
||||
public function setWithDrawWay()
|
||||
{
|
||||
$post = $this->request->post();
|
||||
$result = (new WithdrawLogic())->setWithDrawWay($this->shopId,$post);
|
||||
if(true === $result){
|
||||
return $this->success('设置成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 提现
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 18:00
|
||||
*/
|
||||
public function apply(){
|
||||
$params = $this->request->post();
|
||||
$params['shop_id'] = $this->shopId;
|
||||
$result = (new WithdrawLogic())->apply($params);
|
||||
if(true === $result){
|
||||
return $this->success('申请提现成功,请等待审核');
|
||||
}
|
||||
return $this->fail(WithdrawLogic::getError());
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 获取提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 17:21
|
||||
*/
|
||||
public function getWithdrawInfo()
|
||||
{
|
||||
$result = (new WithdrawLogic())->getWithdrawInfo($this->shopId);
|
||||
return $this->success('',$result,1,1);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 记录列表
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/30 23:46
|
||||
*/
|
||||
public function logLists()
|
||||
{
|
||||
return $this->dataLists((new WithdrawalLogLists()));
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 提现详情
|
||||
* @return \think\response\Json
|
||||
* @throws \Exception
|
||||
* @author cjhao
|
||||
* @date 2024/10/31 09:07
|
||||
*/
|
||||
public function detail()
|
||||
{
|
||||
$id = $this->request->get('id');
|
||||
$result = (new WithdrawLogic())->detail($id,$this->shopId);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user