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

Commit 77fbae08 authored by GaoHu's avatar GaoHu

预约显示人数修改

parent 9cd298b2
...@@ -167,6 +167,10 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat ...@@ -167,6 +167,10 @@ public class GoblinGoodsAnticipateMgServiceImpl implements IGoblinGoodsAnticipat
public ResponseDto<Object> updatePeople(String skuId, BigInteger people) { public ResponseDto<Object> updatePeople(String skuId, BigInteger people) {
//修改Mongodb //修改Mongodb
goblinMongoUtils.updateGoblinGoodsAnticipateValueVoPeople(skuId, people); goblinMongoUtils.updateGoblinGoodsAnticipateValueVoPeople(skuId, people);
//修改redis
GoblinGoodsAnticipateValueVo anticipateValueVo = goblinRedisUtils.getValueBySkuId(skuId);
anticipateValueVo.setAboutPeople(people);
goblinRedisUtils.setValue(anticipateValueVo);
//修改mysql //修改mysql
LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr(); LinkedList<Object[]> sqlValue = CollectionUtil.linkedListObjectArr();
sqlValue.add(new Object[]{ sqlValue.add(new Object[]{
......
...@@ -99,6 +99,11 @@ public class GoblinRedisUtils { ...@@ -99,6 +99,11 @@ public class GoblinRedisUtils {
num = num!=null?num: BigInteger.valueOf(0); num = num!=null?num: BigInteger.valueOf(0);
//新预约 +1 //新预约 +1
redisUtil.set(GoblinRedisConst.ANTICIPATE_PEOPLE.concat(skuId),num.add(BigInteger.valueOf(1))); redisUtil.set(GoblinRedisConst.ANTICIPATE_PEOPLE.concat(skuId),num.add(BigInteger.valueOf(1)));
//跟新valueVo
GoblinGoodsAnticipateValueVo anticipateValueVo = getValueBySkuId(skuId);
anticipateValueVo.setAboutPeople(anticipateValueVo.getAboutPeople().add(BigInteger.valueOf(1)));
setValue(anticipateValueVo);
} }
/** /**
......
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