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

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

Merge remote-tracking branch 'origin/dev_goblin' into dev_goblin

parents 474cbc22 bb0d985b
......@@ -3,6 +3,7 @@ package com.liquidnet.service.goblin.controller;
import com.liquidnet.common.cache.redis.util.RedisUtil;
import com.liquidnet.commons.lang.util.CurrentUtil;
import com.liquidnet.service.base.ResponseDto;
import com.liquidnet.service.goblin.constant.GoblinRedisConst;
import com.liquidnet.service.goblin.dto.vo.GoblinShoppingCartVoo;
import com.liquidnet.service.goblin.service.impl.GoblinFrontServiceImpl;
import com.liquidnet.service.goblin.util.GoblinRedisUtils;
......@@ -73,6 +74,13 @@ public class GoblinFrontLoginController {
String userId=CurrentUtil.getCurrentUid();
return ResponseDto.success(goblinFrontService.getShoppCart(userId,type));
}
@GetMapping("deleteShopCart")
@ApiOperation("请勿调用,测试用")
public ResponseDto<GoblinShoppingCartVoo> deleteShopCart(@RequestParam(name = "type", required = true)String type) {
String userId=CurrentUtil.getCurrentUid();
redisUtil.del(GoblinRedisConst.FRONT_SHOPCART.concat(userId).concat(type));
return ResponseDto.success(null);
}
......
......@@ -989,7 +989,9 @@ public class GoblinFrontServiceImpl implements GoblinFrontService {
}
//遍历里面信息
for(GoblinShoppingCartVo goblinShoppingCartVo:goblinShoppingCartVoo.getShopList()){
goblinShoppingCartVo.setStoreName(goblinRedisUtils.getStoreInfoVo(goblinShoppingCartVo.getStoreId()).getStoreName());
if(null!=goblinRedisUtils.getStoreInfoVo(goblinShoppingCartVo.getStoreId())){
goblinShoppingCartVo.setStoreName(goblinRedisUtils.getStoreInfoVo(goblinShoppingCartVo.getStoreId()).getStoreName());
}
for(GoblinShoppingCartVoDetail goblinShoppingCartVoDetail:goblinShoppingCartVo.getSkuList()){
//找到对应的 spu 和 sku
GoblinGoodsInfoVo goblinGoodsInfoVo=goblinRedisUtils.getGoodsInfoVo(goblinShoppingCartVoDetail.getSpuId());
......
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