|
@@ -87,9 +87,9 @@ public class MdeVisitsServiceImpl implements MdeVisitsService {
|
|
|
|
|
|
Long userId = LoginUserContext.getUserId2();
|
|
|
|
|
|
- MdeVisitsDO visitsDO = mdeVisitsMapper.
|
|
|
+ List<MdeVisitsDO> visitsDO = mdeVisitsMapper.
|
|
|
getMdeVisitsByUserIdAndTypeAndBizIdAndDate(null==userId?0L:userId, reqVO.getType(), reqVO.getBizId(), reqVO.getDate());
|
|
|
- if (null == visitsDO) {
|
|
|
+ if (null == visitsDO ||visitsDO.isEmpty()) {
|
|
|
// 新增
|
|
|
MdeVisitsDO visits = new MdeVisitsDO();
|
|
|
visits.setUserId(null==userId?0L:userId);
|
|
@@ -102,7 +102,7 @@ public class MdeVisitsServiceImpl implements MdeVisitsService {
|
|
|
}
|
|
|
|
|
|
// 增加访问量
|
|
|
- visitsDO.setCount(visitsDO.getCount() + 1);
|
|
|
+ visitsDO.get(0).setCount(visitsDO.get(0).getCount() + 1);
|
|
|
mdeVisitsMapper.updateById(visitsDO);
|
|
|
}
|
|
|
|