案例萃取,案例浏览记录

This commit is contained in:
yang
2024-09-11 15:13:54 +08:00
parent ff43f046d0
commit f82dfb7402
2 changed files with 2 additions and 71 deletions

View File

@@ -1445,8 +1445,9 @@ public class CasesServiceImpl implements ICasesService {
List<CasesBrowsingHistoryVo> batchHistoryVoList = allUserdynamicList.stream().map(userDynamic -> {
CasesBrowsingHistoryVo browsingHistoryVo = new CasesBrowsingHistoryVo();
// 注意两者存在重名属性如ID会出现覆盖。CasesBrowsingHistoryVo中的ID是案例IDbrowsingHistoryId是UserDynamic的ID
BeanUtils.copyProperties(userDynamic, browsingHistoryVo);
browsingHistoryVo.setBrowsingHistoryId(userDynamic.getId());
browsingHistoryVo.setContentInfo(userDynamic.getContentInfo());
browsingHistoryVo.setEventTime(userDynamic.getEventTime());
browsingHistoryVo.setId(null);
if (map.containsKey(userDynamic.getContentId())){
// 确保copy案例时不会覆盖数据
@@ -1462,7 +1463,6 @@ public class CasesServiceImpl implements ICasesService {
log.error("browsingHistoryVo copy error", e);
throw new RuntimeException(e);
}
}
return browsingHistoryVo;
}).collect(Collectors.toList());

View File

@@ -8,82 +8,13 @@ import java.time.LocalDateTime;
@Data
public class CasesBrowsingHistoryVo extends Cases{
private static final long serialVersionUID = -2536708166103273425L;
/**
* 事件动态
*/
public final static int TYPE_EVENT=1;
/**
* 其它动态
*/
public final static int TYPE_OTHER=9;
/**
* 类型
* 1表事件动态 2表非事件动态
* */
// private Integer type;
private String browsingHistoryId;
/**
* 动态的标题
*/
private String title;
/**
* 事件的key
* */
private String eventKey;
/**
* 事件id
* */
private String eventId;
/**
* 动态月份
* yyyyMM
* */
private Integer month;
/**
* 内容类型
* */
private String contentType;
/**
* 内容id
* */
private String contentId;
/**
* 动态内容
* */
private String contentInfo;
/**
* 用户自定义信息
*/
private String cusInfo;
/**
* 动态人id
* */
private String aid;
/**
* 用户的名称
*/
private String aname;
/**
* 是否隐藏
* */
private Boolean hidden;
private LocalDateTime eventTime;
}