From 242bfb8d36bb183a5cf519274a15a87e2fc45971 Mon Sep 17 00:00:00 2001
From: 喻健 <喻健@Admin>
Date: 星期五, 16 十一月 2018 17:10:37 +0800
Subject: [PATCH] 后端:用户对应关系、资金明细
---
fanli/src/main/java/com/yeshi/fanli/controller/admin/PushRecordAdminController.java | 48 ++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 48 insertions(+), 0 deletions(-)
diff --git a/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushRecordAdminController.java b/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushRecordAdminController.java
index dafb478..2de9c5b 100644
--- a/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushRecordAdminController.java
+++ b/fanli/src/main/java/com/yeshi/fanli/controller/admin/PushRecordAdminController.java
@@ -13,6 +13,7 @@
import com.yeshi.fanli.service.inter.push.PushRecordService;
import com.yeshi.fanli.tag.PageEntity;
import com.yeshi.fanli.util.Constant;
+
import org.yeshi.utils.JsonUtil;
import net.sf.json.JSONObject;
@@ -36,4 +37,51 @@
out.print(JsonUtil.loadTrueResult(data));
}
+
+ /**
+ * 鎺ㄨ崘璁板綍 -(鏂板悗鍙�)
+ * @param callback
+ * @param key
+ * @param type
+ * @param pageIndex
+ * @param out
+ */
+ @RequestMapping(value = "getNewPushRecordList")
+ public void getNewPushRecordList(String callback, String key, Integer type, Integer pageIndex, PrintWriter out){
+ try {
+
+ if (pageIndex == null || pageIndex < 0){
+ pageIndex = 1;
+ }
+
+ if (type == null) {
+ type = 0;
+ }
+
+ List<PushRecord> list = pushRecordService.getPushRecordList(key, type, pageIndex);
+ if (list == null || list.size() == 0) {
+ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏆傛棤鏇村鏁版嵁"));
+ return;
+ }
+
+ int pageSize = Constant.PAGE_SIZE;
+
+ int count = pushRecordService.getCount(key, type, pageIndex);
+
+ int totalPage = (int) (count % pageSize == 0 ? count / pageSize : count / pageSize + 1);
+ PageEntity pe = new PageEntity(pageIndex, pageSize, count, totalPage);
+
+ JSONObject data = new JSONObject();
+ data.put("pe", pe);
+ data.put("result_list", list);
+
+ JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult(data));
+ } catch (Exception e) {
+ JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("鏌ヨ澶辫触"));
+ e.printStackTrace();
+ }
+
+ }
+
+
}
--
Gitblit v1.8.0