记得上下班打卡 | git大法好,push需谨慎

Commit 2a623edf authored by GaoHu's avatar GaoHu

新增查询用户是否预约该sku

parent b31e5831
...@@ -29,4 +29,5 @@ public interface IGoblinGoodsAnticipateService { ...@@ -29,4 +29,5 @@ public interface IGoblinGoodsAnticipateService {
ResponseDto<Object> userAbout(String skuId, String uid, String phone); ResponseDto<Object> userAbout(String skuId, String uid, String phone);
ResponseDto<Boolean> selectAnticipate(String skuId, String uid);
} }
...@@ -36,4 +36,10 @@ public class GoblinGoodsAnticipateController { ...@@ -36,4 +36,10 @@ public class GoblinGoodsAnticipateController {
return goblinGoodsAnticipateService.userAbout(skuId, uid, phone); return goblinGoodsAnticipateService.userAbout(skuId, uid, phone);
} }
@ApiOperation("根据skuid和uid查询")
@GetMapping("/selectAnticipateBySkuIdAndUid")
public ResponseDto<Boolean> selectAnticipate(@RequestParam(name = "skuId") String skuId,@RequestParam(name = "uid") String uid){
return goblinGoodsAnticipateService.selectAnticipate(skuId,uid);
}
} }
...@@ -87,6 +87,11 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -87,6 +87,11 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
return ResponseDto.failure("该预约不存在!"); return ResponseDto.failure("该预约不存在!");
} }
@Override
public ResponseDto<Boolean> selectAnticipate(String skuId, String uid) {
return ResponseDto.success(goblinRedisUtils.getUserAboutAut(skuId, uid) != null) ;
}
private Integer setState(LocalDateTime StartDate, LocalDateTime EndDate) { private Integer setState(LocalDateTime StartDate, LocalDateTime EndDate) {
LocalDateTime now = LocalDateTime.now(); LocalDateTime now = LocalDateTime.now();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment