新增桌码换取台桌信息接口

This commit is contained in:
张松
2025-04-27 15:09:58 +08:00
parent d103ff8f88
commit 247da29c67

View File

@@ -3,10 +3,13 @@ package com.czg.controller.user;
import com.czg.account.dto.shopinfo.ShopInfoByCodeDTO;
import com.czg.account.dto.shopinfo.ShopInfoDetailDTO;
import com.czg.account.dto.shopinfo.ShopInfoSubVO;
import com.czg.account.entity.ShopTable;
import com.czg.account.service.ShopInfoService;
import com.czg.account.service.ShopTableService;
import com.czg.resp.CzgResult;
import com.czg.sa.StpKit;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.core.query.QueryWrapper;
import jakarta.annotation.Resource;
import jakarta.validation.constraints.NotEmpty;
import org.springframework.web.bind.annotation.GetMapping;
@@ -23,6 +26,8 @@ import org.springframework.web.bind.annotation.RestController;
public class UShopInfoController {
@Resource
private ShopInfoService shopInfoService;
@Resource
private ShopTableService shopTableService;
/**
* 桌码换取详细店铺信息
@@ -33,6 +38,15 @@ public class UShopInfoController {
return CzgResult.success(shopInfoService.getByCode(tableCode, lat, lng, true));
}
/**
* 桌码获取详细台桌信息
* @return 台桌信息
*/
@GetMapping("/tableInfo")
public CzgResult<ShopTable> getTableInfo(@RequestParam String tableCode) {
return CzgResult.success(shopTableService.getOne(new QueryWrapper().eq(ShopTable::getTableCode, tableCode)));
}
/**
* 获取店铺详细信息
* @return 店铺信息