master
wangning 7 years ago
parent c63da8fed1
commit 6f390ad15e

@ -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<JSONObject> 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;
}

Loading…
Cancel
Save