From 019d87cb7ade40ad003152a4930a5245374ba9cc Mon Sep 17 00:00:00 2001 From: anthonywj Date: Mon, 4 Dec 2023 09:15:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9F=8E=E5=B8=82=E6=8E=A5=E5=8F=A3=E7=9B=B8?= =?UTF-8?q?=E5=85=B3=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/controller/stat/BigVisController.java | 8 +++-- .../api/req/stat/StatCityCorpRequest.java | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+), 2 deletions(-) create mode 100644 src/main/java/com/glxp/api/req/stat/StatCityCorpRequest.java diff --git a/src/main/java/com/glxp/api/controller/stat/BigVisController.java b/src/main/java/com/glxp/api/controller/stat/BigVisController.java index 96c3561..003db2d 100644 --- a/src/main/java/com/glxp/api/controller/stat/BigVisController.java +++ b/src/main/java/com/glxp/api/controller/stat/BigVisController.java @@ -1,5 +1,6 @@ package com.glxp.api.controller.stat; +import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageInfo; import com.glxp.api.annotation.AuthRuleAnnotation; @@ -8,6 +9,7 @@ import com.glxp.api.common.util.ResultVOUtils; import com.glxp.api.controller.BaseController; import com.glxp.api.entity.stat.*; import com.glxp.api.req.replicate.FilterReplicateRequest; +import com.glxp.api.req.stat.StatCityCorpRequest; import com.glxp.api.req.trace.TraceTaskDetailRequest; import com.glxp.api.res.PageSimpleResponse; import com.glxp.api.res.trace.TraceTaskDlResponse; @@ -47,10 +49,12 @@ public class BigVisController extends BaseController { * 获取城市注册企业数量 */ @GetMapping("/cpt/bigVis/city/company") - public BaseResponse getCityCompany(FilterReplicateRequest filterReplicateRequest) { + public BaseResponse getCityCompany(StatCityCorpRequest statCityCorpRequest) { List statCityCorpEntities = statCityCorpService.list( - new QueryWrapper().orderByDesc("count").last("limit 10")); + new QueryWrapper() + .eq(StrUtil.isNotEmpty(statCityCorpRequest.getRegionCode()), "pCityCode", statCityCorpRequest.getRegionCode()) + .orderByDesc("count")); return ResultVOUtils.success(statCityCorpEntities); } diff --git a/src/main/java/com/glxp/api/req/stat/StatCityCorpRequest.java b/src/main/java/com/glxp/api/req/stat/StatCityCorpRequest.java new file mode 100644 index 0000000..df54fc6 --- /dev/null +++ b/src/main/java/com/glxp/api/req/stat/StatCityCorpRequest.java @@ -0,0 +1,33 @@ +package com.glxp.api.req.stat; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.util.Date; + +@Data +public class StatCityCorpRequest { + + + private String regionCode; + private Integer id; + + private String cityCode; + + private String cityName; + + private Integer count; + + private Integer cptCount; + + private Integer rate; + + private Integer level; + private String pCityCode; + + private Date updateTime; + + private String remark; +}