master:系统调优;
parent
ba7a8e1f63
commit
ac0720f3f4
|
|
@ -96,7 +96,7 @@ public class UserFavoritesServiceImpl implements IUserFavoritesService {
|
|||
// 新增用户收藏商品消息通知
|
||||
this.noticeService.createSingleNotice(SecurityUtils.getUserId(), "收藏商品成功!", NoticeType.NOTICE.getValue(), NoticeOwnerType.SYSTEM.getValue(),
|
||||
userFav.getStoreId(), UserNoticeType.FAVORITE_PRODUCT.getValue(),
|
||||
"恭喜您,收藏" + (ObjectUtils.isNotEmpty(store) ? store.getStoreName() : "") + " 家商品: " +
|
||||
"恭喜您,收藏 " + (ObjectUtils.isNotEmpty(store) ? store.getStoreName() : "") + " 家商品: " +
|
||||
(ObjectUtils.isNotEmpty(storeProd) ? storeProd.getProdArtNum() : "") + "成功!");
|
||||
});
|
||||
return count;
|
||||
|
|
|
|||
|
|
@ -46,8 +46,12 @@ public class UserNoticeServiceImpl implements IUserNoticeService {
|
|||
@Override
|
||||
@Transactional(readOnly = true)
|
||||
public Page<UserNoticeResDTO> pcPage(UserNoticePageDTO pageDTO) {
|
||||
final Long userId = SecurityUtils.getUserIdSafe();
|
||||
if (ObjectUtils.isEmpty(userId)) {
|
||||
throw new ServiceException("用户未登录,请先登录!", HttpStatus.ERROR);
|
||||
}
|
||||
PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize());
|
||||
List<UserNoticeResDTO> list = this.userNoticeMapper.selectUserNoticeList(SecurityUtils.getUserId(), pageDTO.getNoticeTitle(), pageDTO.getNoticeType());
|
||||
List<UserNoticeResDTO> list = this.userNoticeMapper.selectUserNoticeList(userId, pageDTO.getNoticeTitle(), pageDTO.getNoticeType());
|
||||
list.forEach(x -> x.setTargetNoticeTypeName(UserNoticeType.of(x.getTargetNoticeType()).getLabel()));
|
||||
return Page.convert(new PageInfo<>(list));
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue