147 lines
3.4 KiB
PHP
Executable File
147 lines
3.4 KiB
PHP
Executable File
<?php
|
|
namespace app\shopapi\controller;
|
|
|
|
use app\shopapi\lists\ShopCoachLists;
|
|
use app\shopapi\logic\CoachLogic;
|
|
use app\shopapi\lists\CoachApplyLists;
|
|
use app\shopapi\logic\ShopLogic;
|
|
use app\shopapi\validate\ShopApplyValidate;
|
|
|
|
/**
|
|
* 技师控制器类
|
|
* Class CoachController
|
|
* @package app\shopapi\controller
|
|
*/
|
|
class CoachController extends BaseShopController
|
|
{
|
|
|
|
|
|
/**
|
|
* @notes 获取技师信息
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/12/8 22:22
|
|
*/
|
|
public function info()
|
|
{
|
|
$id = $this->request->get('id');
|
|
$result = (new CoachLogic())->info($id,$this->shopId);
|
|
if(false === $result){
|
|
return $this->success(CoachLogic::getError());
|
|
}
|
|
return $this->success('',$result);
|
|
|
|
}
|
|
|
|
/**
|
|
* @notes 门店技师列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/19 10:43
|
|
*/
|
|
public function shopCoachLists()
|
|
{
|
|
return $this->dataLists(new ShopCoachLists());
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 申请列表
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/15 20:35
|
|
*/
|
|
public function applyLists()
|
|
{
|
|
return $this->dataLists((new CoachApplyLists()));
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 申请详情
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/16 02:02
|
|
*/
|
|
public function applyDetail()
|
|
{
|
|
$id = $this->request->get('id',0);
|
|
$result = (new CoachLogic())->applyDetail($id);
|
|
if(false === $result){
|
|
return $this->success(CoachLogic::getError());
|
|
}
|
|
return $this->success('',$result);
|
|
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 技师申请审核
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/10/16 00:06
|
|
*/
|
|
public function applyAudit()
|
|
{
|
|
$params = (new ShopApplyValidate())->post()->goCheck('',['shop_id'=>$this->shopId]);
|
|
$result = (new CoachLogic())->applyAudit($params);
|
|
if(true === $result){
|
|
return $this->success('操作成功');
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
/**
|
|
* @notes 获取师傅服务时间
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/8/29 18:36
|
|
*/
|
|
public function getServerTime()
|
|
{
|
|
$id = $this->request->get('id');
|
|
$result = (new CoachLogic())->getServerTime($id);
|
|
if(is_array($result)){
|
|
return $this->success('',$result);
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 设置技师服务时间
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/9/2 17:28
|
|
*/
|
|
public function setServerTime()
|
|
{
|
|
$params = $this->request->post();
|
|
$params['shop_id'] = $this->shopId;
|
|
$result = (new ShopLogic())->setServerTime($params);
|
|
if(true === $result){
|
|
return $this->success('设置成功');
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
|
|
/**
|
|
* @notes 设置技师服务时间
|
|
* @return \think\response\Json
|
|
* @author cjhao
|
|
* @date 2024/9/2 17:28
|
|
*/
|
|
public function setWorkStatus()
|
|
{
|
|
$params = $this->request->post();
|
|
$params['shop_id'] = $this->shopId;
|
|
$result = (new ShopLogic())->setWorkStatus($params);
|
|
if(true === $result){
|
|
return $this->success('设置成功');
|
|
}
|
|
return $this->fail($result);
|
|
}
|
|
|
|
|
|
} |