Commit e8707ea2 by manxiaoqiang

reged

parent a5cb65f3
...@@ -13,8 +13,8 @@ import java.util.List; ...@@ -13,8 +13,8 @@ import java.util.List;
@Transactional @Transactional
public interface NoticeRepository extends JpaRepository<IONotice, Long> { public interface NoticeRepository extends JpaRepository<IONotice, Long> {
@Query(value = "select * from ionotice n where n.isdeploy is true and (io_account = ?1 or io_account = -1) order by id desc", nativeQuery = true) @Query(value = "select * from ionotice n where n.isdeploy is true and (io_account like %?1% or io_account = -1) order by deploy_date desc", nativeQuery = true)
List<IONotice> listRecentDeployNotice(Long account); List<IONotice> listRecentDeployNotice(String email);
} }
...@@ -2,6 +2,7 @@ package com.reyun.service.impl; ...@@ -2,6 +2,7 @@ package com.reyun.service.impl;
import com.google.common.base.Function; import com.google.common.base.Function;
import com.google.common.collect.Lists; import com.google.common.collect.Lists;
import com.reyun.model.Account;
import com.reyun.model.IONotice; import com.reyun.model.IONotice;
import com.reyun.model.Notice; import com.reyun.model.Notice;
import com.reyun.model.UserNoticeLog; import com.reyun.model.UserNoticeLog;
...@@ -30,7 +31,7 @@ public class NoticeServiceImpl implements NoticeService { ...@@ -30,7 +31,7 @@ public class NoticeServiceImpl implements NoticeService {
@Override @Override
public List<IONotice> listRecentDeployNotice(Long accountId) { public List<IONotice> listRecentDeployNotice(Long accountId) {
List<IONotice> recentDeployNoticeList = noticeRepository.listRecentDeployNotice(accountId); List<IONotice> recentDeployNoticeList = noticeRepository.listRecentDeployNotice("<" + accountId + ">");
if (!CollectionUtils.isEmpty(recentDeployNoticeList)) { if (!CollectionUtils.isEmpty(recentDeployNoticeList)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment