diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/sys/SysGaodeController.java b/mallinkAdmin/src/main/java/com/iformall/controller/sys/SysGaodeController.java new file mode 100644 index 000000000..51c4d82cd --- /dev/null +++ b/mallinkAdmin/src/main/java/com/iformall/controller/sys/SysGaodeController.java @@ -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()); + } + +} diff --git a/mallinkAdmin/src/main/resources/db/migration/V2023072000001_poi.sql b/mallinkAdmin/src/main/resources/db/migration/V2023072000001_poi.sql new file mode 100644 index 000000000..d95e1bf29 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V2023072000001_poi.sql @@ -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 '父级' ; + +###重新导出数据#### + + + + + diff --git a/mallinkService/src/main/java/com/iformall/domain/po/SysGaodeCity.java b/mallinkService/src/main/java/com/iformall/domain/po/SysGaodeCity.java index 3ba31742c..e8f93bb15 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/SysGaodeCity.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/SysGaodeCity.java @@ -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; } diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumGaodeCityType.java b/mallinkService/src/main/java/com/iformall/enums/EnumGaodeCityType.java new file mode 100644 index 000000000..f165ce233 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumGaodeCityType.java @@ -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; + } +} diff --git a/mallinkService/src/main/java/com/iformall/service/SysGaoDeService.java b/mallinkService/src/main/java/com/iformall/service/SysGaoDeService.java index 2d1b33244..6d562049e 100644 --- a/mallinkService/src/main/java/com/iformall/service/SysGaoDeService.java +++ b/mallinkService/src/main/java/com/iformall/service/SysGaoDeService.java @@ -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 getAllCityLabelMap(); + List getAll(); + } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/SysGaoDeServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/SysGaoDeServiceImpl.java index c168c2e94..b0a0fac78 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/SysGaoDeServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/SysGaoDeServiceImpl.java @@ -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 getAll() { + SysGaodeCity sgc = new SysGaodeCity(); + sgc.setIsHide(EnumYesOrNo.NO.getCode()); + sgc.setStatus(EnumDelStatus.NOT_DEL.getCode()); + return sysGaodeCityMapper.findList(sgc); + } } diff --git a/mallinkService/src/main/resources/mapper/SysGaodeCityMapper.xml b/mallinkService/src/main/resources/mapper/SysGaodeCityMapper.xml index f2015b5c9..67ce43435 100644 --- a/mallinkService/src/main/resources/mapper/SysGaodeCityMapper.xml +++ b/mallinkService/src/main/resources/mapper/SysGaodeCityMapper.xml @@ -9,10 +9,12 @@ + + - `id`,`name`,`label`,`create_date`,`update_date`,`is_hide`,`status` + `id`,`name`,`label`,`create_date`,`update_date`,`is_hide`,`status`,`type`,`parent_id` @@ -29,6 +31,12 @@ and `status` = #{status} + + and `type` = #{type} + + + and `parent_id` = #{parentId} + and id in diff --git a/mallinkService/src/main/resources/mapper/TtMerchantPoiMapper.xml b/mallinkService/src/main/resources/mapper/TtMerchantPoiMapper.xml index 7201d039a..a30e44efe 100644 --- a/mallinkService/src/main/resources/mapper/TtMerchantPoiMapper.xml +++ b/mallinkService/src/main/resources/mapper/TtMerchantPoiMapper.xml @@ -84,9 +84,17 @@ and `poi_name` like concat('%', #{poiName},'%') + + and `province` like concat('%', #{province},'%') + + and `city` like concat('%', #{city},'%') + + + and `address` like concat('%', #{address},'%') + and `merchant_name` like concat('%', #{merchantName},'%')