master
wangning 7 years ago
parent c63da8fed1
commit 6f390ad15e

@ -1,20 +1,21 @@
package au.com.royalpay.payment.manage.notice.core.impls; package au.com.royalpay.payment.manage.notice.core.impls;
import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper; import java.util.Collections;
import au.com.royalpay.payment.manage.notice.core.NoticePartner; import java.util.Date;
import au.com.royalpay.payment.tools.utils.PageListUtils; import java.util.List;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.github.miemiedev.mybatis.paginator.domain.Order; import com.github.miemiedev.mybatis.paginator.domain.Order;
import com.github.miemiedev.mybatis.paginator.domain.PageBounds; import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
import com.github.miemiedev.mybatis.paginator.domain.PageList; import com.github.miemiedev.mybatis.paginator.domain.PageList;
import org.springframework.stereotype.Service; import au.com.royalpay.payment.manage.mappers.notice.NoticePartnerMapper;
import au.com.royalpay.payment.manage.notice.core.NoticePartner;
import java.util.Date; import au.com.royalpay.payment.tools.utils.PageListUtils;
import java.util.List;
import javax.annotation.Resource;
/** /**
* Created by yishuqian on 29/09/2016. * Created by yishuqian on 29/09/2016.
@ -39,6 +40,9 @@ public class NoticePartnerImpl implements NoticePartner {
PageList<JSONObject> partnerNotices =noticePartnerMapper.listNoticesByClientId(params, PageList<JSONObject> partnerNotices =noticePartnerMapper.listNoticesByClientId(params,
new PageBounds(params.getIntValue("page"), params.getIntValue("limit"), Order.formString("status.asc,send_time.desc"))); new PageBounds(params.getIntValue("page"), params.getIntValue("limit"), Order.formString("status.asc,send_time.desc")));
JSONObject res = PageListUtils.buildPageListResult(partnerNotices); JSONObject res = PageListUtils.buildPageListResult(partnerNotices);
if(partnerNotices.size()<1){
res.put("data", Collections.EMPTY_LIST);
}
res.put("unReadCounts",counts); res.put("unReadCounts",counts);
return res; return res;
} }

Loading…
Cancel
Save