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

Commit f15d15d4 authored by 胡佳晨's avatar 胡佳晨

修改下单接口

券 使用接口
券 提前下单接口
parent 583fb8ad
...@@ -33,7 +33,7 @@ public interface ICandyCouponService { ...@@ -33,7 +33,7 @@ public interface ICandyCouponService {
Integer preCanUseGoodCoupon(BigDecimal priceTotal, String goodI); Integer preCanUseGoodCoupon(BigDecimal priceTotal, String goodI);
List<CandyCouponVo> myAdvanceCoupon(String performanceId, String timesId, String ticketId); List<CandyCouponVo> myAdvanceCoupon(String performanceId);
Integer stateCoupon(String uCouponId); Integer stateCoupon(String uCouponId);
......
...@@ -130,14 +130,10 @@ public class CandyCouponController { ...@@ -130,14 +130,10 @@ public class CandyCouponController {
@GetMapping("my/advance") @GetMapping("my/advance")
@ApiOperation("提前券列表") @ApiOperation("提前券列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true)
@ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
}) })
public ResponseDto<List<CandyCouponVo>> myAdvanceCoupon(@RequestParam("performanceId") @NotNull @NotBlank String performanceId, public ResponseDto<List<CandyCouponVo>> myAdvanceCoupon(@RequestParam("performanceId") @NotNull @NotBlank String performanceId) {
@RequestParam("timeId") @NotNull @NotBlank String timeId, return ResponseDto.success(candyCouponService.myAdvanceCoupon(performanceId));
@RequestParam("ticketId") @NotNull @NotBlank String ticketId) {
return ResponseDto.success(candyCouponService.myAdvanceCoupon(performanceId, timeId, ticketId));
} }
//判断券是否可用 //判断券是否可用
...@@ -164,7 +160,7 @@ public class CandyCouponController { ...@@ -164,7 +160,7 @@ public class CandyCouponController {
@ApiImplicitParam(type = "form", dataType = "String", name = "content", value = "消费内容", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "content", value = "消费内容", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "totalPrice", value = "消费价格", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "totalPrice", value = "消费价格", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "goodId", value = "商品id(逗号隔开的字符串)", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "goodId", value = "商品id(逗号隔开的字符串) 没有传-1", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "performanceId", value = "演出id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "timeId", value = "场次id", required = true),
@ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true), @ApiImplicitParam(type = "form", dataType = "String", name = "ticketId", value = "票id", required = true),
......
...@@ -198,13 +198,13 @@ public class CandyCouponServiceImpl implements ICandyCouponService { ...@@ -198,13 +198,13 @@ public class CandyCouponServiceImpl implements ICandyCouponService {
} }
@Override @Override
public List<CandyCouponVo> myAdvanceCoupon(String performanceId, String timesId, String ticketId) { public List<CandyCouponVo> myAdvanceCoupon(String performanceId) {
String uid = CurrentUtil.getCurrentUid(); String uid = CurrentUtil.getCurrentUid();
List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid); List<CandyUserCouponBasicDto> dtoList = redisDataUtils.getCouponByUid(uid);
List<CandyCouponVo> advanceCoupon = ObjectUtil.getCandyCouponVoArrayList(); List<CandyCouponVo> advanceCoupon = ObjectUtil.getCandyCouponVoArrayList();
for (CandyUserCouponBasicDto dtoItem : dtoList) { for (CandyUserCouponBasicDto dtoItem : dtoList) {
if (dtoItem.getBusiType().equals(3)) { if (dtoItem.getBusiType().equals(3)) {
CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, BigDecimal.ZERO, performanceId, timesId, ticketId); CandyCouponVo baseVo = CouponBaseUtil.getPerformanceCouponUserVo(dtoItem, BigDecimal.ZERO, performanceId, "-1", "-1");
if (baseVo.getState().equals(1)) { if (baseVo.getState().equals(1)) {
advanceCoupon.add(baseVo); advanceCoupon.add(baseVo);
} else { } else {
......
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