发送订阅消息增加token

This commit is contained in:
谭凯凯 2024-10-21 15:09:20 +08:00 committed by Tankaikai
parent 843408b81e
commit 0d79a23ad7
1 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@ import cn.ysk.cashier.service.product.TbProductService;
import cn.ysk.cashier.service.shop.TbShopTableService;
import cn.ysk.cashier.utils.RabbitMsgUtils;
import cn.ysk.cashier.utils.RedisUtils;
import com.alibaba.fastjson.JSON;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
@ -154,8 +155,9 @@ public class TbPlaceController {
public ResponseEntity<Object> pay(HttpServletRequest request, @Validated @RequestBody PayDTO payDTO) {
String token = tokenProvider.getToken(request);
payDTO.setToken(token);
String subject = tokenProvider.getClaims(token).getSubject();
log.error(">>>>>>>>>>>>>>>>>>>>>>>>>>>>subject:{}", subject);
Object o = redisUtils.get("online-token-"+token);
String jsonString = JSON.toJSONString(o);
log.error(">>>>>>>>>>>>>>>>>>>>>>>>>>>>jsonString:{}", jsonString);
return ResponseEntity.ok(tbShopTableService.pay(payDTO));
}