修复开发票时间太长导致redis不能回滚未读消息
This commit is contained in:
parent
32e76be85b
commit
32c51c1f62
@ -391,9 +391,15 @@ public class XhpcInvoiceServiceImpl implements XhpcInvoiceService {
|
||||
if (xhpcInvoice.getIsRead().equals(IsReadStatusConst.READED)) {
|
||||
return specificInvoicedResponse;
|
||||
}
|
||||
//一旦调了详情接口,就去掉该已开发票的未读状态,同时redis中的未读数量数据-1
|
||||
//一旦调了详情接口,就去掉该已开发票的未读状态,同时再次查询用户未读的数量,并将其设置到redis当中
|
||||
xhpcInvoiceMapper.updateByInvoiceId(invoiceId);
|
||||
reduceNoReadInvoiceCount(xhpcInvoice);
|
||||
Long notReadCount = xhpcInvoiceMapper.findNotReadCount(xhpcInvoice.getCreatorId(), xhpcInvoice.getCreatorType());
|
||||
String redisKey = generateRedisKey(xhpcInvoice);
|
||||
if (notReadCount == 0) {
|
||||
redisService.deleteObject(redisKey);
|
||||
} else {
|
||||
redisService.setCacheObject(redisKey, notReadCount);
|
||||
}
|
||||
return specificInvoicedResponse;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user