|
@@ -1,11 +1,13 @@
|
|
|
package com.jpsoft.epay.modules.business.controller;
|
|
|
|
|
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
|
|
+import com.github.pagehelper.Page;
|
|
|
import com.jpsoft.epay.config.RedisConfig;
|
|
|
import com.jpsoft.epay.modules.base.entity.*;
|
|
|
import com.jpsoft.epay.modules.base.service.*;
|
|
|
import com.jpsoft.epay.modules.business.service.RechargeService;
|
|
|
import com.jpsoft.epay.modules.common.dto.MessageResult;
|
|
|
+import com.jpsoft.epay.modules.common.dto.Sort;
|
|
|
import com.jpsoft.epay.modules.common.utils.StringUtils;
|
|
|
import com.jpsoft.epay.modules.communication.server.ChannelWrapper;
|
|
|
import com.jpsoft.epay.modules.communication.server.protocol.MeterReceivePacket;
|
|
@@ -384,4 +386,50 @@ public class MobileApiController {
|
|
|
|
|
|
return msgResult;
|
|
|
}
|
|
|
+
|
|
|
+ @GetMapping(value="rechargeList")
|
|
|
+ public MessageResult<Map> rechargeList(String roomId,
|
|
|
+ @RequestParam(defaultValue = "1") Integer pageNum,
|
|
|
+ @RequestParam(defaultValue = "10") Integer pageSize){
|
|
|
+ if(pageSize>20){
|
|
|
+ pageSize = 20;
|
|
|
+ }
|
|
|
+
|
|
|
+ MessageResult<Map> msgResult = new MessageResult<>();
|
|
|
+
|
|
|
+ try {
|
|
|
+ if (StringUtils.isEmpty(roomId)){
|
|
|
+ throw new Exception("房间编号不能为空!");
|
|
|
+ }
|
|
|
+
|
|
|
+ Map<String,Object> dataMap = new HashMap<>();
|
|
|
+
|
|
|
+ Map<String,Object> searchParams = new HashMap<>();
|
|
|
+
|
|
|
+ List<Sort> sortList = new ArrayList<>();
|
|
|
+ sortList.add(new Sort("create_time","desc"));
|
|
|
+
|
|
|
+ searchParams.put("roomId",roomId);
|
|
|
+ searchParams.put("paymentStatus","20");
|
|
|
+
|
|
|
+ Page<RechargeRecord> page = rechargeRecordService.pageSearch(searchParams,pageNum,pageSize,sortList);
|
|
|
+
|
|
|
+ dataMap.put("rows",page);
|
|
|
+ dataMap.put("pageNum",page.getPageNum());
|
|
|
+ dataMap.put("pageSize",page.getPageSize());
|
|
|
+ dataMap.put("totalRows",page.getTotal());
|
|
|
+
|
|
|
+ msgResult.setResult(true);
|
|
|
+
|
|
|
+ msgResult.setData(dataMap);
|
|
|
+ }
|
|
|
+ catch(Exception ex){
|
|
|
+ log.error(ex.getMessage(),ex);
|
|
|
+
|
|
|
+ msgResult.setMessage(ex.getMessage());
|
|
|
+ msgResult.setResult(false);
|
|
|
+ }
|
|
|
+
|
|
|
+ return msgResult;
|
|
|
+ }
|
|
|
}
|