|
|
@@ -1,9 +1,9 @@
|
|
|
package top.lvzhiqiang.service.impl;
|
|
|
|
|
|
-import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
import me.chanjar.weixin.cp.api.WxCpGroupRobotService;
|
|
|
@@ -628,7 +628,7 @@ public class CoinServiceImpl implements CoinService {
|
|
|
}
|
|
|
|
|
|
@Override
|
|
|
- public JSONArray mainSearch(JSONObject params) throws Exception {
|
|
|
+ public Object mainSearch(JSONObject params) throws Exception {
|
|
|
JSONArray result = new JSONArray();
|
|
|
if (params.getString("nameEn").equals("allPositionv2")) {
|
|
|
Map<String, String> paramMap = new HashMap<>();
|
|
|
@@ -657,14 +657,20 @@ public class CoinServiceImpl implements CoinService {
|
|
|
PageHelper.startPage(params.getInteger("pageNo"), params.getInteger("pageSize"), true);
|
|
|
List<CoinHistoryOrder> historyOrderList = coinMapper.findHistoryOrderList(params.toJavaObject(Map.class));
|
|
|
|
|
|
+ PageInfo<CoinHistoryOrder> historyOrderPageInfo = new PageInfo<>(historyOrderList);
|
|
|
+
|
|
|
renderMainSearch4OrderHistoryProductType(historyOrderList);
|
|
|
- result = (JSONArray) JSON.toJSON(historyOrderList);
|
|
|
+ //result = (JSONArray) JSON.toJSON(historyOrderList);
|
|
|
+ return historyOrderPageInfo;
|
|
|
} else if (params.getString("nameEn").equals("traderList")) {
|
|
|
PageHelper.startPage(params.getInteger("pageNo"), params.getInteger("pageSize"), true);
|
|
|
List<CoinTrader> mixTraderList = coinMapper.findMixTraderList(params.toJavaObject(Map.class));
|
|
|
|
|
|
+ PageInfo<CoinTrader> coinTraderPageInfo = new PageInfo<>(mixTraderList);
|
|
|
+
|
|
|
renderMainSearch4TraderList(mixTraderList);
|
|
|
- result = (JSONArray) JSON.toJSON(mixTraderList);
|
|
|
+ //result = (JSONArray) JSON.toJSON(mixTraderList);
|
|
|
+ return coinTraderPageInfo;
|
|
|
} else if (params.getString("nameEn").equals("monitorCurrency")) {
|
|
|
List<String> monitorCurrencyList = coinMapper.findMonitorCurrencyList();
|
|
|
|