This commit is contained in:
parent
49f03b802c
commit
55092ce72c
|
|
@ -71,6 +71,7 @@ public class MaterialConstants {
|
|||
/** 文件类型:合同照片 */
|
||||
public static final Integer APPENDICES_OF_CONTRACT = 20; //move to TmTaskTypeEnum
|
||||
|
||||
public static final String CACHE_MATERIAL_MALL_MESSAGE_CODE = "material-mall-message-code:";
|
||||
public static final String CACHE_MATERIAL_MALL_MESSAGE = "material-mall-message:";
|
||||
public static final Long CACHE_MATERIAL_MALL_MESSAGE_HOURS = 24L;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -52,7 +52,7 @@ public class BmMessageServiceImpl implements IBmMessageService {
|
|||
|
||||
@Override
|
||||
public List<BmMessage> selectBmMessageListFromCache(BmMessage bmMessage) {
|
||||
List<BmMessage> bmMessages = redisService.getCacheList(MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_CODE);
|
||||
List<BmMessage> bmMessages = redisService.getCacheList(MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE);
|
||||
return bmMessages;
|
||||
}
|
||||
|
||||
|
|
@ -69,9 +69,9 @@ public class BmMessageServiceImpl implements IBmMessageService {
|
|||
bmMessage.setFromCompany(SecurityUtils.getLoginUser().getSysUser().getCompanyId());
|
||||
bmMessage.setFromUser(SecurityUtils.getLoginUser().getSysUser().getUserId());
|
||||
bmMessage.setUuid(String.valueOf(UUID.randomUUID()));
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_CODE;
|
||||
String msgKey = MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE;
|
||||
String msgContent = JSONObject.toJSONString(bmMessage);
|
||||
redisService.setCacheObject(msgKey, msgContent, verificationCodeConfig.getTime(), TimeUnit.MINUTES);
|
||||
redisService.setCacheObject(msgKey, msgContent, MaterialConstants.CACHE_MATERIAL_MALL_MESSAGE_HOURS, TimeUnit.HOURS);
|
||||
return bmMessageMapper.insertBmMessage(bmMessage);
|
||||
} catch (Exception e) {
|
||||
throw new ServiceException("错误信息描述");
|
||||
|
|
|
|||
Loading…
Reference in New Issue