This commit is contained in:
parent
179ddfa584
commit
6e2b957cce
|
|
@ -111,7 +111,10 @@ public class BmMessageServiceImpl implements IBmMessageService {
|
|||
bmMessage.setFromUser(SecurityUtils.getLoginUser().getSysUser().getUserId());
|
||||
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE + companyId + ":" + bmMessage.getToCompany();
|
||||
(SpringUtils.getBean(RedisService.class)).setCacheObject(msgKey, Arrays.asList(bmMessage), MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
JSONArray arrayCache = SpringUtils.getBean(RedisService.class).getCacheObject(msgKey);
|
||||
List<BmMessage> list = arrayCache.toList(BmMessage.class);
|
||||
list.add(bmMessage);
|
||||
(SpringUtils.getBean(RedisService.class)).setCacheObject(msgKey, list, MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
return bmMessageMapper.insertBmMessage(bmMessage);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
|
|
|
|||
Loading…
Reference in New Issue