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

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

提交 券接口

parent 230187d1
......@@ -48,7 +48,7 @@ public class GoblinCouponController {
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "spuId", value = "spuId"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "storeId", value = "店铺id"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "type", value = "券类型[1-代金券|2-折扣券|3-满减券]"),
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "type", value = "券类型[0-全部|1-代金券|2-折扣券|3-满减券]"),
})
public ResponseDto<ArrayList<GoblinStoreCouponVo>> getSpuByType(@RequestParam("spuId") @Valid String spuId,
@RequestParam("storeId") @Valid String storeId,
......
......@@ -62,7 +62,7 @@ public class GoblinCouponImpl implements GoblinCouponService {
List<GoblinStoreCouponVo> listVo = goblinRedisUtils.getGoodsMarketsForCoupon(spuId, storeId);
LocalDateTime now = LocalDateTime.now();
for (GoblinStoreCouponVo vo : listVo) {
if (vo.getType().equals(type) && "1".equals(vo.getReceiveCurb())
if ((vo.getType().equals(type) || type.equals("0")) && "1".equals(vo.getReceiveCurb())
&& now.isAfter(vo.getStartTime()) && now.isBefore(vo.getEndTime())) {
vo.setStock(null);
returnList.add(vo);
......
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