提交其他文件
This commit is contained in:
319
app/api/controller/TeamasterController.php
Normal file
319
app/api/controller/TeamasterController.php
Normal file
@ -0,0 +1,319 @@
|
||||
<?php
|
||||
|
||||
namespace app\api\controller;
|
||||
use app\api\logic\TeamasterLogic;
|
||||
use app\api\validate\TeamasterValidate;
|
||||
|
||||
class TeamasterController extends BaseApiController
|
||||
{
|
||||
/**
|
||||
* 茶艺师公众号
|
||||
* Class TeaUser
|
||||
* @package app\common\model\teamaster
|
||||
*/
|
||||
public array $notNeedLogin = ['teamasterList', 'LeafList'];
|
||||
|
||||
/**
|
||||
* @notes 首页茶艺师等级
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function teamasterLevel(){
|
||||
$result = TeamasterLogic::getTeaLevel();
|
||||
return $this->success('查询成功', $result, 1, 1);
|
||||
}
|
||||
/**
|
||||
* @notes 首页茶艺师列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
* @data page size level_id
|
||||
*/
|
||||
public function teamasterList(){
|
||||
$data = $this->request->post();
|
||||
$result = TeamasterLogic::getTeamasterList($data);
|
||||
return $this->success('查询成功', $result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师详情
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/02 11:39
|
||||
* @data id
|
||||
*/
|
||||
public function teamasterDetails(){
|
||||
$data = $this->request->post();
|
||||
// $params = (new TeamasterValidate())->goCheck();
|
||||
$result = TeamasterLogic::getTeamasterDetails($data);
|
||||
$d['teamaster'] = $result;
|
||||
return $this->success('', $d, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶叶列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
* @data page size level_id
|
||||
*/
|
||||
public function LeafList(){
|
||||
$result = TeamasterLogic::LeafList();
|
||||
return $this->success('', $result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 创建茶艺师订单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function addTeamOrder(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::addTeamOrder($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 费用明细
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function countTeamPrice(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::countTeamPrice($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 我的茶艺师优惠券列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function userCoupon(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::userCoupon($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 茶艺师订单列表
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function teamOrderList(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::teamOrderList($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师订单详情
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function teamOrderDetails(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::teamOrderDetails($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 创建茶艺师续订
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function addTeamRenwOrder(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::addTeamRenwOrder($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 取消订单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function cancelOrder(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::cancelOrder($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 删除订单
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function delOrder(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::delOrder($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师退款
|
||||
* @return \think\response\Json
|
||||
* @author Yzt
|
||||
* @date 2026/1/2 16:59
|
||||
*/
|
||||
public function TeamRefund(){
|
||||
$data = $this->request->post();
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::TeamRefund($data);
|
||||
if ($result === false) {
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
return $this->success('',$result, 1, 1);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @notes 茶艺师收藏/取消收藏
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/10/16 14:55
|
||||
* @data id,status(1收藏 0取消收藏),user_id
|
||||
*/
|
||||
public function teamasterCollect(){
|
||||
$data = (new TeamasterValidate())->post()->goCheck('teamasterCollect');
|
||||
$data['user_id'] = $this->userId;
|
||||
$result = TeamasterLogic::teamasterCollect($data);
|
||||
if($result){
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
/**
|
||||
* @notes 茶艺师收藏列表
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/10/16 14:55
|
||||
* @data id
|
||||
*/
|
||||
public function teamasterCollectList(){
|
||||
$data = (new TeamasterValidate())->post()->goCheck('teamasterCollectList');
|
||||
$userId = $this->userId;
|
||||
$result = TeamasterLogic::teamasterCollectList($data,$userId);
|
||||
return $this->success('', $result, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 打赏金额列表
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/10/20 15:14
|
||||
*/
|
||||
public function teamasterTipAmount(){
|
||||
$result = TeamasterLogic::getTipAmount();
|
||||
return $this->success('', $result, 1, 1);
|
||||
}
|
||||
|
||||
/**
|
||||
* @notes 打赏
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/10/20 15:14
|
||||
* @ @data teamaster_id tip_price pay_type(1余额 2微信)
|
||||
*/
|
||||
public function giveTeamasterTipAmount(){
|
||||
$data = $this->request->post();
|
||||
$user_id = $this->userId;
|
||||
$result = TeamasterLogic::giveTeamasterTipAmount($data,$user_id);
|
||||
if($result){
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
return $this->fail(TeamasterLogic::getError());
|
||||
}
|
||||
/**
|
||||
* @notes 茶叶类型查询
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/10/21 14:23
|
||||
*/
|
||||
public function teaType(){
|
||||
$result = TeamasterLogic::teaType();
|
||||
return $this->success('查询成功', $result, 1, 1);
|
||||
}
|
||||
/**
|
||||
* @notes 立即邀约
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/10/30 15:20
|
||||
*/
|
||||
public function invitation(){
|
||||
$data = $this->request->post();
|
||||
$user_id = $this->userId;
|
||||
$result = TeamasterLogic::invitation($data,$user_id);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
/**
|
||||
* @notes 团体预约
|
||||
* @return \think\response\Json
|
||||
* @author 胥聪
|
||||
* @date 2025/11/3 14:11
|
||||
*/
|
||||
public function groupReservation(){
|
||||
$data = $this->request->post();
|
||||
$user_id = $this->userId;
|
||||
$result = TeamasterLogic::groupReservation($data,$user_id);
|
||||
return $this->success('操作成功', [], 1, 1);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user