219 lines
5.4 KiB
PHP
Executable File
219 lines
5.4 KiB
PHP
Executable File
<?php
|
|
namespace app\adminapi\controller\coach;
|
|
use app\adminapi\controller\BaseAdminController;
|
|
use app\adminapi\lists\coach\CoachApplyLists;
|
|
use app\adminapi\lists\coach\UpdateCoachLists;
|
|
use app\adminapi\logic\coach\CoachLogic;
|
|
use app\adminapi\validate\coach\AdjustWalletValidate;
|
|
use app\adminapi\validate\coach\CoachAuditValidate;
|
|
use app\adminapi\validate\coach\CoachValidate;
|
|
|
|
/**
|
|
* 技师控制器类
|
|
* Class CoachController
|
|
* @package app\adminapi\controller\coach
|
|
*/
|
|
class CoachController extends BaseAdminController
|
|
{
|
|
|
|
/**
|
|
* @notes 技师端账号列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/20 17:32
|
|
*/
|
|
public function coachUserLists()
|
|
{
|
|
$lists = (new CoachLogic())->coachUserLists();
|
|
return $this->success('',$lists);
|
|
}
|
|
|
|
/**
|
|
* @notes 技能列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/20 17:45
|
|
*/
|
|
public function skillLists()
|
|
{
|
|
$lists = (new CoachLogic())->skillLists();
|
|
return $this->success('',$lists);
|
|
}
|
|
|
|
/**
|
|
* @notes 数据列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/21 18:13
|
|
*/
|
|
public function otherLists()
|
|
{
|
|
$dataLists = (new CoachLogic())->otherLists();
|
|
return $this->success('',$dataLists);
|
|
}
|
|
|
|
/**
|
|
* @notes 技师列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/20 17:33
|
|
*/
|
|
public function lists()
|
|
{
|
|
return $this->dataLists();
|
|
}
|
|
|
|
/**
|
|
* @notes 申请列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/26 17:46
|
|
*/
|
|
public function applyLists()
|
|
{
|
|
return $this->dataLists((new CoachApplyLists()));
|
|
}
|
|
|
|
/**
|
|
* @notes 资料更新列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/28 10:23
|
|
*/
|
|
public function updateCoachLists()
|
|
{
|
|
return $this->dataLists((new UpdateCoachLists()));
|
|
}
|
|
|
|
|
|
|
|
/**
|
|
* @notes 添加技师
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/21 14:20
|
|
*/
|
|
public function add()
|
|
{
|
|
$params = (new CoachValidate())->post()->goCheck('add');
|
|
$result = (new CoachLogic())->add($params);
|
|
if(true === $result){
|
|
return $this->success('添加成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 更新资料详情
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/28 11:04
|
|
*/
|
|
public function updateDetail()
|
|
{
|
|
$params = (new CoachValidate())->goCheck('id');
|
|
$result = (new CoachLogic())->updateDetail($params['id']);
|
|
return $this->success('',$result);
|
|
}
|
|
|
|
/**
|
|
* @notes 详情
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/21 15:29
|
|
*/
|
|
public function detail()
|
|
{
|
|
$params = (new CoachValidate())->goCheck('id');
|
|
$result = (new CoachLogic())->detail($params['id']);
|
|
return $this->success('',$result);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 编辑
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/21 15:48
|
|
*/
|
|
public function edit()
|
|
{
|
|
$params = (new CoachValidate())->post()->goCheck();
|
|
$result = (new CoachLogic())->edit($params);
|
|
if(true === $result){
|
|
return $this->success('编辑成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 调整余额
|
|
* @return \think\response\Json
|
|
* @throws \Exception
|
|
* @author cjhao
|
|
* @date 2024/8/23 13:51
|
|
*/
|
|
public function adjustMoney()
|
|
{
|
|
$params = (new AdjustWalletValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new CoachLogic())->adjustMoney($params);
|
|
if(true === $result){
|
|
return $this->success('调整成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 调整保证金
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/23 15:05
|
|
*/
|
|
public function adjustDeposit()
|
|
{
|
|
$params = (new AdjustWalletValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new CoachLogic())->adjustDeposit($params);
|
|
if(true === $result){
|
|
return $this->success('调整成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 技师审核
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/23 18:43
|
|
*/
|
|
public function coachAudit()
|
|
{
|
|
$params = (new CoachAuditValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new CoachLogic())->coachAudit($params);
|
|
if(true === $result){
|
|
return $this->success('审核成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 技师审核
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/28 11:30
|
|
*/
|
|
public function updateAudit()
|
|
{
|
|
$params = (new CoachAuditValidate())->post()->goCheck();
|
|
$params['admin_id'] = $this->adminId;
|
|
$result = (new CoachLogic())->updateAudit($params);
|
|
if(true === $result){
|
|
return $this->success('审核成功',[],1,1);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
}
|