add jwt decode and remove shopping cart API parameter memberId

This commit is contained in:
Carl 2022-01-17 14:35:20 +08:00
parent cfcc3396ea
commit 66d7a0556b

View File

@ -123,7 +123,8 @@ public class GoodController {
@ApiOperation(value = "查询购物车信息", notes = "查询购物车信息") @ApiOperation(value = "查询购物车信息", notes = "查询购物车信息")
@PostMapping("royalcanin/getCartProductInfo") @PostMapping("royalcanin/getCartProductInfo")
public List<CartEntity> getCartProductInfo(String memberId){ public List<CartEntity> getCartProductInfo(HttpServletRequest request){
String memberId = SmartJWTUtil.decodeToken(request.getHeader(TOKEN_NAME));
return cartService.getAllProductbyMember(memberId); return cartService.getAllProductbyMember(memberId);
} }