挂账需求和电话机预约需求

This commit is contained in:
谭凯凯
2024-11-27 11:02:32 +08:00
committed by Tankaikai
parent ed7ef8915b
commit 223703dc48
3 changed files with 8 additions and 13 deletions

View File

@@ -77,10 +77,10 @@ public class TbShopTableBookingController {
return ResponseEntity.ok().build(); return ResponseEntity.ok().build();
} }
@GetMapping("sms/{id}") @GetMapping("sms")
@ApiOperation("获取待发送的短信内容") @ApiOperation("获取待发送的短信内容")
public ResponseEntity sms(@PathVariable("id") Long id) { public ResponseEntity sms(@RequestParam("shopId") Integer shopId) {
String smsContent = tbShopTableBookingService.getBookingSms(id); String smsContent = tbShopTableBookingService.getBookingSms(shopId);
return ResponseEntity.ok().body(smsContent); return ResponseEntity.ok().body(smsContent);
} }

View File

@@ -28,9 +28,9 @@ public interface TbShopTableBookingService extends IService<TbShopTableBooking>
/** /**
* 获取待发送的短信内容 * 获取待发送的短信内容
* @param id 预订id * @param shopId 店铺id
*/ */
String getBookingSms(Long id); String getBookingSms(Integer shopId);
List<TbShopArea> findShopAreaList(Integer shopId); List<TbShopArea> findShopAreaList(Integer shopId);

View File

@@ -201,15 +201,10 @@ public class TbShopTableBookingServiceImpl extends ServiceImpl<TbShopTableBookin
} }
@Override @Override
public String getBookingSms(Long id) { public String getBookingSms(Integer shopId) {
if (id == null) { if (shopId == null) {
throw new BadRequestException("id不能为空"); throw new BadRequestException("shopId不能为空");
} }
TbShopTableBooking entity = super.getById(id);
if (entity == null) {
throw new BadRequestException("预订信息不存在");
}
Integer shopId = entity.getShopId();
TbShopInfo shop = tbShopInfoRepository.getById(shopId); TbShopInfo shop = tbShopInfoRepository.getById(shopId);
if (shop == null) { if (shop == null) {
throw new BadRequestException("店铺信息不存在"); throw new BadRequestException("店铺信息不存在");