From 6f390ad15e90a227e9037e2dcad8096277f1c8c2 Mon Sep 17 00:00:00 2001 From: wangning <164851225@qq.com> Date: Wed, 31 Jan 2018 17:18:08 +0800 Subject: [PATCH] update --- .../notice/core/impls/NoticePartnerImpl.java | 22 +++++++++++-------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticePartnerImpl.java b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticePartnerImpl.java index 317862d47..27c13e86e 100644 --- a/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticePartnerImpl.java +++ b/src/main/java/au/com/royalpay/payment/manage/notice/core/impls/NoticePartnerImpl.java @@ -1,20 +1,21 @@ package au.com.royalpay.payment.manage.notice.core.impls; -import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper; -import au.com.royalpay.payment.manage.notice.core.NoticePartner; -import au.com.royalpay.payment.tools.utils.PageListUtils; +import java.util.Collections; +import java.util.Date; +import java.util.List; + +import javax.annotation.Resource; + +import org.springframework.stereotype.Service; import com.alibaba.fastjson.JSONObject; import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageList; -import org.springframework.stereotype.Service; - -import java.util.Date; -import java.util.List; - -import javax.annotation.Resource; +import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper; +import au.com.royalpay.payment.manage.notice.core.NoticePartner; +import au.com.royalpay.payment.tools.utils.PageListUtils; /** * Created by yishuqian on 29/09/2016. @@ -39,6 +40,9 @@ public class NoticePartnerImpl implements NoticePartner { PageList partnerNotices =noticePartnerMapper.listNoticesByClientId(params, new PageBounds(params.getIntValue("page"), params.getIntValue("limit"), Order.formString("status.asc,send_time.desc"))); JSONObject res = PageListUtils.buildPageListResult(partnerNotices); + if(partnerNotices.size()<1){ + res.put("data", Collections.EMPTY_LIST); + } res.put("unReadCounts",counts); return res; }