初始版本
This commit is contained in:
110
server/app/coachapi/controller/WithdrawController.php
Executable file
110
server/app/coachapi/controller/WithdrawController.php
Executable file
@@ -0,0 +1,110 @@
|
||||
<?php
|
||||
namespace app\coachapi\controller;
|
||||
use app\coachapi\lists\WithdrawalLogLists;
|
||||
use app\coachapi\logic\WithdrawLogic;
|
||||
|
||||
/**
|
||||
* 提现列表
|
||||
* Class WithdrawController
|
||||
* @package app\coachapi\controller
|
||||
*/
|
||||
class WithdrawController extends BaseCoachController
|
||||
{
|
||||
|
||||
public function configLists()
|
||||
{
|
||||
$lists = (new WithdrawLogic())->configLists($this->coachId);
|
||||
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->coachId,$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->coachId,$post);
|
||||
if(true === $result){
|
||||
return $this->success('设置成功',[],1,1);
|
||||
}
|
||||
return $this->fail($result);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 获取提现配置
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 17:21
|
||||
*/
|
||||
public function getWithdrawInfo()
|
||||
{
|
||||
$result = (new WithdrawLogic())->getWithdrawInfo($this->coachId);
|
||||
return $this->success('',$result,1,1);
|
||||
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 提现
|
||||
* @return \think\response\Json
|
||||
* @author cjhao
|
||||
* @date 2024/10/29 18:00
|
||||
*/
|
||||
public function apply(){
|
||||
$params = $this->request->post();
|
||||
$params['coach_id'] = $this->coachId;
|
||||
$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/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->coachId);
|
||||
return $this->success('',$result);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user