城市接口相关修改

master
anthonywj 1 year ago
parent d6c49d3643
commit 019d87cb7a

@ -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<StatCityCorpEntity> statCityCorpEntities = statCityCorpService.list(
new QueryWrapper<StatCityCorpEntity>().orderByDesc("count").last("limit 10"));
new QueryWrapper<StatCityCorpEntity>()
.eq(StrUtil.isNotEmpty(statCityCorpRequest.getRegionCode()), "pCityCode", statCityCorpRequest.getRegionCode())
.orderByDesc("count"));
return ResultVOUtils.success(statCityCorpEntities);
}

@ -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;
}
Loading…
Cancel
Save