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

Commit 6f8f512f authored by GaoHu's avatar GaoHu

BUG:组合购详情新增用户预约标识

parent 976193ea
......@@ -52,10 +52,12 @@ public class GoblinMixAppDetailsVo implements Serializable, Cloneable {
private BigDecimal price;
@ApiModelProperty(position = 22, value = "上架时间")
private String shelvesTime;
@ApiModelProperty(position = 23, value = "预约开启标识[0:未开启,1开启]")
@ApiModelProperty(position = 23, value = "预约开启标识[0:未开启,1:开启]")
private int reserve;
@ApiModelProperty(value = "系统时间")
private String sysTime;
@ApiModelProperty(value = "用户预约标识[0:未预约,1:预约]")
private int userReserve;
private static final GoblinMixAppDetailsVo obj = new GoblinMixAppDetailsVo();
......
......@@ -109,14 +109,4 @@ public class GoblinGoodsAnticipateController {
return goblinGoodsAnticipateService.reserveByMix(mixId);
}
@ApiOperationSupport(order = 7)
@ApiOperation(value = "混合购【根据mixId查询用户是否预约该混合购】")
@GetMapping("reserveMixByUid")
@ApiImplicitParams({
@ApiImplicitParam(type = "form", required = true, dataType = "String", name = "mixId", value = "混合售id"),
})
public ResponseDto<Boolean> reserveMixByUid(@RequestParam(value = "mixId", required = true) String mixId) {
return goblinGoodsAnticipateService.reserveMixByUid(mixId);
}
}
......@@ -73,6 +73,12 @@ public class GoblinMixAppServiceImpl implements IGoblinMixAppService {
}
GoblinStoreInfoVo storeInfoVo = redisUtils.getStoreInfoVo(baseVo.getStoreId());
GoblinMixAppDetailsVo vo = GoblinMixAppDetailsVo.getNew().copy(baseVo, storeInfoVo.getStoreName());
//获取用户预约情况
//获取udi
String uid = CurrentUtil.getCurrentUid();
if (redisUtils.getReserveMixByUid(uid, mixId) != null){
vo.setUserReserve(1);
}
int stock = 0;
for (GoblinMixDetailsItemVo item : vo.getItem()) {
GoblinGoodsSkuInfoVo skuInfoVo = redisUtils.getGoodsSkuInfoVo(item.getSkuId());
......
......@@ -2602,7 +2602,12 @@ public class GoblinRedisUtils {
//根据用户uid和混合mixId查询用户预约
public GoblinMixReserveVo getReserveMixByUid(String uid, String mixId) {
return (GoblinMixReserveVo) redisUtil.get(GoblinRedisConst.GOBLIN_MIX_RESERVE_UID.concat(mixId).concat(":").concat(uid));
Object obj = redisUtil.get(GoblinRedisConst.GOBLIN_MIX_RESERVE_UID.concat(mixId).concat(":").concat(uid));
if (obj == null) {
return null;
} else {
return (GoblinMixReserveVo) obj;
}
}
......
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