From 8b680a3252aca370b49be3edf8aa5ac1a6865c49 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 28 Jun 2021 14:10:56 +0800
Subject: [PATCH] modify

---
 gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java |   25 +++++++++++++++++++++----
 1 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java b/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
index c547913..c8d3d1a 100644
--- a/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
+++ b/gc-user/src/main/java/com/xzx/gc/user/service/JhyInfoService.java
@@ -1,15 +1,23 @@
 package com.xzx.gc.user.service;
 
 import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.convert.Convert;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
 import com.xzx.gc.common.exception.RestException;
 import com.xzx.gc.entity.JhyInfo;
 import com.xzx.gc.user.dto.JhyApplyDto;
+import com.xzx.gc.user.dto.JhyInfoListDto;
 import com.xzx.gc.user.mapper.JhyInfoMapper;
+import com.xzx.gc.user.vo.JhyInfoListVo;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
 
 @Service
 @Transactional
@@ -49,10 +57,19 @@
             return false;
         }
 
-        if (JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus())) {
-            return true;
-        }
+        return JhyInfo.CHECK_PASS.equals(jhyInfo.getStatus());
+    }
 
-        return false;
+    public Map<String, Object> queryList(JhyInfoListDto jhyInfoListDto) {
+        PageHelper.startPage(jhyInfoListDto.getPage(), jhyInfoListDto.getLimit());
+        List<JhyInfoListVo> jhyInfoListVos = jhyInfoMapper.selectJhyInfoList(jhyInfoListDto);
+        PageInfo<JhyInfoListVo> pageInfo = new PageInfo<>(jhyInfoListVos);
+
+        Map<String, Object> data = new HashMap<>();
+        int count = Convert.toInt(pageInfo.getTotal());
+        data.put("data", jhyInfoListVos);
+        data.put("count", count);
+        data.put("code", 0);
+        return data;
     }
 }

--
Gitblit v1.9.1