Files
chazhi_admin_broker/app/api/controller/TeaStoreController.php
2026-03-11 18:24:59 +08:00

164 lines
4.7 KiB
PHP

<?php
namespace app\api\controller;
use app\api\logic\TeaStoreLogic;
class TeaStoreController extends BaseApiController
{
/**
* 小程序
* Class TeaUser
* @package app\common\model\teamaster
*/
public array $notNeedLogin = ['teaStoreLists','teaStoreCity','teaStoreDetails','teaStoreRoomLists','teaStoreGroupLists'];
/**
* @notes 首页茶室列表
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/5 16:23
*/
public function teaStoreLists(){
$data = $this->request->post();
// $data['user_id'] = $this->userId;
$result = TeaStoreLogic::getTeaStoreLists($data);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶室搜索历史
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/7 11:14
*/
public function teaStoreSearchHistory(){
$userId = $this->userId;
$result = TeaStoreLogic::getTeaStoreSearchHistory($userId);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 一键清空茶室搜索历史
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/11 16:28
*/
public function delTeaStoreSearchHistory(){
$userId = $this->userId;
$result = TeaStoreLogic::delTeaStoreSearchHistory($userId);
return $this->success('操作成功', [], 1, 1);
}
/**
* @notes 茶室开通城市
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/7 17:53
*/
public function teaStoreCity(){
$result = TeaStoreLogic::getTeaStoreCity();
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶室详情页
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/11 10:53
*/
public function teaStoreDetails(){
$data = $this->request->post();
$result = TeaStoreLogic::getTeaStoreDetails($data);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶室包间列表
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/17 14:08
*/
public function teaStoreRoomLists(){
$data = $this->request->post();
$result = TeaStoreLogic::getTeaStoreRoomLists($data);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶室充值套餐列表
* @return \think\response\Json
* @author Yzt
* @date 2025/11/17 14:08
*/
public function rechargeLists(){
$data = $this->request->post();
$result = TeaStoreLogic::rechargeLists($data);
if($result){
return $this->success('', $result, 1, 1);
}
return $this->fail(TeaStoreLogic::getError());
}
/**
* @notes 茶室收藏/取消收藏
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/11 14:33
* @data id,status(1收藏 0取消收藏),user_id
*/
public function teaStoreCollect(){
$data = $this->request->post();
$data['user_id'] = $this->userId;
$result = TeaStoreLogic::teaStoreCollect($data);
if($result){
return $this->success('操作成功', [], 1, 1);
}
return $this->fail(TeaStoreLogic::getError());
}
/**
* @notes 茶室收藏列表
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/11 14:35
* @data id
*/
public function teaStoreCollectList(){
$data = $this->request->post();
$userId = $this->userId;
$result = TeaStoreLogic::teaStoreCollectList($data,$userId);
return $this->success('', $result, 1, 1);
}
/**
* @notes 茶室套餐列表
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/26 16:00
*/
public function teaStoreGroupLists(){
$data = $this->request->post();
$result = TeaStoreLogic::getTeaStoreGroupLists($data);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 茶室套餐详情
* @return \think\response\Json
* @author 胥聪
* @date 2025/11/26 16:00
*/
public function teaStoreGroupDetails(){
$data = $this->request->post();
$result = TeaStoreLogic::getTeaStoreGroupDetails($data);
return $this->success('查询成功', $result, 1, 1);
}
/**
* @notes 资质详情
* @return \think\response\Json
* @author 胥聪
* @date 2026/2/11 15:27
*/
public function qualDetails(){
$data = $this->request->post();
$result = TeaStoreLogic::qualDetails($data);
return $this->success('查询成功', $result, 1, 1);
}
}