From 5cdad407736e44288b91e893e7144d472e684576 Mon Sep 17 00:00:00 2001 From: dinggang <2498628697@qq.com> Date: Tue, 25 Oct 2022 17:41:43 +0800 Subject: [PATCH] =?UTF-8?q?1.=E8=83=BD=E5=8A=9B=E5=B9=BF=E5=9C=BA=E5=BA=94?= =?UTF-8?q?=E7=94=A8=E5=B9=BF=E5=9C=BAbug=E4=BF=AE=E5=A4=8D=EF=BC=8C?= =?UTF-8?q?=E8=BF=94=E5=9B=9E=E7=BB=93=E6=9E=9C=E5=A2=9E=E5=8A=A0=E6=9F=A5?= =?UTF-8?q?=E8=AF=A2=E7=BB=93=E6=9E=9C=E6=80=BB=E6=95=B0=202.=E7=AE=97?= =?UTF-8?q?=E6=B3=95=E5=B9=BF=E5=9C=BA=E5=92=8Cgis=E5=B9=BF=E5=9C=BA?= =?UTF-8?q?=E6=9F=A5=E8=AF=A2=E6=8E=A5=E5=8F=A3=E9=87=8D=E5=86=99=EF=BC=8C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=8C=89=E5=8C=BA=E5=B8=82=E7=AD=9B=E9=80=89?= =?UTF-8?q?=E6=9D=A1=E4=BB=B6=EF=BC=8C=E8=B5=B6=E5=9B=9E=E7=BB=93=E6=9E=9C?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2=E7=BB=93=E6=9E=9C=E6=80=BB?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/ResourceController.java | 7 ++ .../modules/resource/dao/ResourceDao.java | 7 ++ .../resource/service/ResourceService.java | 2 + .../service/impl/ResourceServiceImpl.java | 20 +++++- .../resources/mapper/resource/ResourceDao.xml | 71 +++++++++++++++++++ 5 files changed, 106 insertions(+), 1 deletion(-) diff --git a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java index c3e6e84f..ac0403a3 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/controller/ResourceController.java @@ -671,4 +671,11 @@ public class ResourceController { return new Result<>().ok(resourceService.getPotentialList()); } + @PostMapping("/getSquareList") + @ApiOperation("/算法广场获取算法或Gis列表") + @LogOperation("/算法广场获取算法或Gis列表") + public Result getSquareList(@RequestBody JSONObject jsonObject) { + return new Result().ok(resourceService.getSquareList(jsonObject)); + } + } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java index 770903c0..5eaa24d4 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/dao/ResourceDao.java @@ -205,4 +205,11 @@ public interface ResourceDao extends BaseDao { List getPotentialList(@Param("halfMonthDay") String halfMonthDay, @Param("monthDay") String monthDay); List getStarList(); + + Integer selectAppListCount(@Param("type") Integer type, @Param("area") String area); + + List getSquareList(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area, + @Param("pageNum") Integer pageNum, @Param("pageSize") Integer pageSize); + + Integer getSquareListCount(@Param("type") String type, @Param("deptType") Integer deptType, @Param("area") String area); } \ No newline at end of file diff --git a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java index bfb902fc..a6caed9b 100644 --- a/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java +++ b/renren-admin/src/main/java/io/renren/modules/resource/service/ResourceService.java @@ -157,4 +157,6 @@ public interface ResourceService extends CrudService maps = resourceDao.selectAppList((pageNum - 1) * 9, type, area); maps.forEach(x -> x.put("pic", resourceDao.selectPicByResId(x.get("id").toString()))); - return maps; + return new HashMap() {{ + put("appList",maps); + put("total", resourceDao.selectAppListCount(type, area)); + }}; } @Override @@ -2410,4 +2414,18 @@ public class ResourceServiceImpl extends CrudServiceImpl + + + + + + + \ No newline at end of file