Browse Source

fix poi

release_toaliyun_real
lin 2 years ago
parent
commit
73c982c280
8 changed files with 108 additions and 1 deletions
  1. +28
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/sys/SysGaodeController.java
  2. +9
    -0
      mallinkAdmin/src/main/resources/db/migration/V2023072000001_poi.sql
  3. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/po/SysGaodeCity.java
  4. +36
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumGaodeCityType.java
  5. +5
    -0
      mallinkService/src/main/java/com/iformall/service/SysGaoDeService.java
  6. +9
    -0
      mallinkService/src/main/java/com/iformall/service/impl/SysGaoDeServiceImpl.java
  7. +9
    -1
      mallinkService/src/main/resources/mapper/SysGaodeCityMapper.xml
  8. +8
    -0
      mallinkService/src/main/resources/mapper/TtMerchantPoiMapper.xml

+ 28
- 0
mallinkAdmin/src/main/java/com/iformall/controller/sys/SysGaodeController.java View File

@@ -0,0 +1,28 @@
package com.iformall.controller.sys;

import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.service.SysGaoDeService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
* @author gongbiao
*/
@RestController
@RequestMapping("/api/sysGaode")
public class SysGaodeController extends BaseController {

private final Logger logger = LoggerFactory.getLogger(this.getClass());

@Autowired
private SysGaoDeService sysGaoDeService;
@GetMapping("getAll")
public ResultData getAll() {
return new ResultData(sysGaoDeService.getAll());
}
}

+ 9
- 0
mallinkAdmin/src/main/resources/db/migration/V2023072000001_poi.sql View File

@@ -0,0 +1,9 @@
alter table sys_gaode_city add column type int(1) NOT NULL COMMENT '类型EnumGaodeCityType' ;
alter table sys_gaode_city add column parent_id bigint(11) COMMENT '父级' ;

###重新导出数据####






+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/po/SysGaodeCity.java View File

@@ -28,4 +28,8 @@ public class SysGaodeCity extends BaseEntity {
private Integer isHide;
@io.swagger.annotations.ApiModelProperty(value="0-有效 1-无效",name="status")
private Integer status;
@io.swagger.annotations.ApiModelProperty(value="类型EnumGaodeCityType",name="type")
private Integer type;
@io.swagger.annotations.ApiModelProperty(value="父级",name="parentId")
private Long parentId;
}

+ 36
- 0
mallinkService/src/main/java/com/iformall/enums/EnumGaodeCityType.java View File

@@ -0,0 +1,36 @@
package com.iformall.enums;


/**
* @author gongbiao
*/
public enum EnumGaodeCityType {

PROVINCE(1, "省"),
CITY(2, "市");

public static EnumGaodeCityType getEnum(Integer code) {
for (EnumGaodeCityType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumGaodeCityType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 5
- 0
mallinkService/src/main/java/com/iformall/service/SysGaoDeService.java View File

@@ -1,7 +1,10 @@
package com.iformall.service;

import java.util.List;
import java.util.Map;

import com.iformall.domain.po.SysGaodeCity;

public interface SysGaoDeService {

/**
@@ -12,4 +15,6 @@ public interface SysGaoDeService {
*/
Map<String,String> getAllCityLabelMap();
List<SysGaodeCity> getAll();
}

+ 9
- 0
mallinkService/src/main/java/com/iformall/service/impl/SysGaoDeServiceImpl.java View File

@@ -4,6 +4,7 @@ import java.util.*;
import com.iformall.domain.po.SysGaodeCity;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.enums.EnumDelStatus;
import com.iformall.enums.EnumGaodeCityType;
import com.iformall.enums.EnumYesOrNo;
import com.iformall.mapper.SysGaodeCityMapper;
import com.iformall.service.SysGaoDeService;
@@ -42,4 +43,12 @@ public class SysGaoDeServiceImpl implements SysGaoDeService {
}
return cacheMap;
}

@Override
public List<SysGaodeCity> getAll() {
SysGaodeCity sgc = new SysGaodeCity();
sgc.setIsHide(EnumYesOrNo.NO.getCode());
sgc.setStatus(EnumDelStatus.NOT_DEL.getCode());
return sysGaodeCityMapper.findList(sgc);
}
}

+ 9
- 1
mallinkService/src/main/resources/mapper/SysGaodeCityMapper.xml View File

@@ -9,10 +9,12 @@
<result column="update_date" jdbcType="TIMESTAMP" property="updateDate" />
<result column="is_hide" jdbcType="INTEGER" property="isHide" />
<result column="status" jdbcType="INTEGER" property="status" />
<result column="type" jdbcType="INTEGER" property="type" />
<result column="parent_id" jdbcType="BIGINT" property="parentId" />
</resultMap>
<sql id="allColumns">
`id`,`name`,`label`,`create_date`,`update_date`,`is_hide`,`status`
`id`,`name`,`label`,`create_date`,`update_date`,`is_hide`,`status`,`type`,`parent_id`
</sql>

<sql id="dynamicWhereConditions">
@@ -29,6 +31,12 @@
<if test=" null != status ">
and `status` = #{status}
</if>
<if test=" null != type ">
and `type` = #{type}
</if>
<if test=" null != parentId ">
and `parent_id` = #{parentId}
</if>
<if test=" null != ids ">
and id in
<foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")">


+ 8
- 0
mallinkService/src/main/resources/mapper/TtMerchantPoiMapper.xml View File

@@ -84,9 +84,17 @@
and `poi_name` like concat('%', #{poiName},'%')
</if>
<if test=" null != province and ''!= province ">
and `province` like concat('%', #{province},'%')
</if>
<if test=" null != city and ''!= city ">
and `city` like concat('%', #{city},'%')
</if>
<if test=" null != address and ''!= address ">
and `address` like concat('%', #{address},'%')
</if>

<if test=" null != merchantName and ''!= merchantName ">
and `merchant_name` like concat('%', #{merchantName},'%')


Loading…
Cancel
Save