jinpengyong
2020-07-20 94bbaadf6c8a642e33b8ca81231259513b9f72ec
update
7 files modified
22 ■■■■ changed files
src/main/java/com/moral/entity/Area.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/moral/entity/City.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/moral/entity/Province.java 2 ●●● patch | view | raw | blame | history
src/main/java/com/moral/task/RealTimeWeatherInsertTask.java 2 ●●● patch | view | raw | blame | history
src/main/resources/mapper/AreaMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/CityMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/resources/mapper/ProvinceMapper.xml 4 ●●●● patch | view | raw | blame | history
src/main/java/com/moral/entity/Area.java
@@ -6,7 +6,7 @@
@Data
public class Area {
    @Id
    private Integer areaCode;
    private String areaName;
src/main/java/com/moral/entity/City.java
@@ -6,7 +6,7 @@
@Data
public class City {
    @Id
    private Integer cityCode;
    private String cityName;
src/main/java/com/moral/entity/Province.java
@@ -6,7 +6,7 @@
@Data
public class Province {
    @Id
    private Integer provinceCode;
    private String provinceName;
src/main/java/com/moral/task/RealTimeWeatherInsertTask.java
@@ -14,7 +14,7 @@
@Component
public class RealTimeWeatherInsertTask {
    private static transient Logger logger = LoggerFactory.getLogger(AlarmTableInsertTask.class);
    private static transient Logger logger = LoggerFactory.getLogger(RealTimeWeatherInsertTask.class);
    @Resource
    private RealTimeWeatherService realTimeWeatherService;
src/main/resources/mapper/AreaMapper.xml
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.moral.mapper.AreaMapper">
    <resultMap id="BaseResultMap" type="com.moral.entity.Area">
        <id column="area_code" property="areaCode" jdbcType="INTEGER"/>
        <result column="area_name" property="areaName" jdbcType="VARCHAR"/>
        <result column="city_code" property="cityCode" jdbcType="INTEGER"/>
    </resultMap>
    <select id="getAreaByAreaCode" resultType="com.moral.entity.Area">
        select * from area where area_code=#{areaCode}
    </select>
src/main/resources/mapper/CityMapper.xml
@@ -1,11 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.moral.mapper.CityMapper">
    <resultMap id="BaseResultMap" type="com.moral.entity.City" >
        <id column="city_code" property="cityCode" jdbcType="INTEGER" />
        <result column="city_name" property="cityName" jdbcType="VARCHAR" />
        <result column="province_code" property="provinceCode" jdbcType="INTEGER" />
    </resultMap>
    <select id="getCityByCityCode" resultType="com.moral.entity.City">
        select * from city where city_code=#{cityCode}
    </select>
src/main/resources/mapper/ProvinceMapper.xml
@@ -1,10 +1,6 @@
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.moral.mapper.ProvinceMapper">
    <resultMap id="BaseResultMap" type="com.moral.entity.Province" >
        <id column="province_code" property="provinceCode" jdbcType="INTEGER" />
        <result column="province_name" property="provinceName" jdbcType="VARCHAR" />
    </resultMap>
    <select id="getProvinceByProvinceCode" resultType="com.moral.entity.Province">
        select * from province where province_code=#{provinceCode}
    </select>