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

Commit 3ba0d292 authored by GaoHu's avatar GaoHu

Merge branch 'gaohu_0727_GoblinMix' into pre

parents ce55907e 7abb6c38
...@@ -324,7 +324,9 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -324,7 +324,9 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
GoblinMixDetailsVo mixDetails = goblinRedisUtils.getMixDetails(mixId); GoblinMixDetailsVo mixDetails = goblinRedisUtils.getMixDetails(mixId);
//组合购开启预约且当前时间大于预约购开始时间或者上架时间才可预约 //组合购开启预约且当前时间大于预约购开始时间或者上架时间才可预约
if (mixDetails.getReserve() != 0 && DateUtil.compareStrDay(nowTime, mixDetails.getTimeStart()) <= 0) { if (mixDetails.getReserve() != 0 && DateUtil.compareStrDay(nowTime, mixDetails.getTimeStart()) <= 0) {
String mid = IDGenerator.nextTimeId2();
GoblinMixReserveVo goblinMixReserveVo = GoblinMixReserveVo.getNew(); GoblinMixReserveVo goblinMixReserveVo = GoblinMixReserveVo.getNew();
goblinMixReserveVo.setMid(mid);
goblinMixReserveVo.setMixId(mixId); goblinMixReserveVo.setMixId(mixId);
DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtil.DATE_FULL_STR); DateTimeFormatter formatter = DateTimeFormatter.ofPattern(DateUtil.DATE_FULL_STR);
goblinMixReserveVo.setCreatedDate(LocalDateTime.parse(nowTime,formatter)); goblinMixReserveVo.setCreatedDate(LocalDateTime.parse(nowTime,formatter));
...@@ -334,7 +336,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -334,7 +336,6 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
//redis保存用户预约组合购记录 //redis保存用户预约组合购记录
goblinRedisUtils.setReserveMixByUid(goblinMixReserveVo); goblinRedisUtils.setReserveMixByUid(goblinMixReserveVo);
//发送redis消息修改mysql记录用户预约 //发送redis消息修改mysql记录用户预约
String mid = IDGenerator.nextTimeId2();
LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr();
sqlValue.add(new Object[]{ sqlValue.add(new Object[]{
mid, mid,
...@@ -345,7 +346,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS ...@@ -345,7 +346,7 @@ public class GoblinGoodsAnticipateServiceImpl implements IGoblinGoodsAnticipateS
sendRedis("goblin_goods_anticipate_mix", sqlValue); sendRedis("goblin_goods_anticipate_mix", sqlValue);
} }
} }
return ResponseDto.success(); return ResponseDto.success(true);
} }
@Override @Override
......
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