|
|
|
|
@ -5,51 +5,36 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<mapper namespace="com.platform.dao.DataInfoDao">
|
|
|
|
|
<resultMap id="getEntityByText" type="com.platform.entities.DataInfoEntity">
|
|
|
|
|
<id property="id" column="id" javaType="int" jdbcType="INTEGER" />
|
|
|
|
|
<result property="regionalismCode" column="regionalism_code"
|
|
|
|
|
javaType="string" jdbcType="VARCHAR" />
|
|
|
|
|
<result property="cityName" column="city_name" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="districtName" column="district_name"
|
|
|
|
|
javaType="string" jdbcType="VARCHAR" />
|
|
|
|
|
<result property="systemCode" column="system_code" javaType="int"
|
|
|
|
|
jdbcType="INTEGER" />
|
|
|
|
|
<result property="systemName" column="system_name" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="dataType" column="data_type" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="dataVersion" column="data_version" javaType="int"
|
|
|
|
|
jdbcType="INTEGER" />
|
|
|
|
|
<result property="submittedBatch" column="submitted_batch"
|
|
|
|
|
javaType="string" jdbcType="VARCHAR" />
|
|
|
|
|
<result property="dataPath" column="data_path" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="charset" column="data_charset" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="collectingTime" column="collection_time"
|
|
|
|
|
javaType="string" jdbcType="DATE" />
|
|
|
|
|
<result property="collectorContacts" column="collector_contacts"
|
|
|
|
|
javaType="string" jdbcType="VARCHAR" />
|
|
|
|
|
<result property="collectorName" column="collector_name"
|
|
|
|
|
javaType="string" jdbcType="VARCHAR" />
|
|
|
|
|
<result property="extractStatus" column="extract_status" jdbcType="INTEGER" />
|
|
|
|
|
<id property="id" column="id"/>
|
|
|
|
|
<result property="regionalismCode" column="regionalism_code"/>
|
|
|
|
|
<result property="cityName" column="city_name"/>
|
|
|
|
|
<result property="districtName" column="district_name"/>
|
|
|
|
|
<result property="systemCode" column="system_code"/>
|
|
|
|
|
<result property="systemName" column="system_name"/>
|
|
|
|
|
<result property="dataType" column="data_type"/>
|
|
|
|
|
<result property="dataVersion" column="data_version"/>
|
|
|
|
|
<result property="submittedBatch" column="submitted_batch"/>
|
|
|
|
|
<result property="dataPath" column="data_path"/>
|
|
|
|
|
<result property="charset" column="data_charset"/>
|
|
|
|
|
<result property="collectingTime" column="collection_time"/>
|
|
|
|
|
<result property="collectorContacts" column="collector_contacts"/>
|
|
|
|
|
<result property="collectorName" column="collector_name"/>
|
|
|
|
|
<result property="extractStatus" column="extract_status"/>
|
|
|
|
|
|
|
|
|
|
<result property="year" column="data_year" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="startYear" column="start_year" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="endYear" column="end_year" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="volumeIp" column="volume_ip" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="volumePath" column="volume_path" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="mark" column="mark" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="volumePath" column="volume_path" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="mark" column="mark" javaType="string"
|
|
|
|
|
jdbcType="VARCHAR" />
|
|
|
|
|
<result property="year" column="data_year"/>
|
|
|
|
|
<result property="startYear" column="start_year"/>
|
|
|
|
|
<result property="endYear" column="end_year"/>
|
|
|
|
|
<result property="volumeIp" column="volume_ip"/>
|
|
|
|
|
<result property="volumePath" column="volume_path"/>
|
|
|
|
|
<result property="mark" column="mark"/>
|
|
|
|
|
<result property="volumePath" column="volume_path"/>
|
|
|
|
|
<result property="dataBaseType" column="data_base_type"/>
|
|
|
|
|
<result property="execResultLast" column="checkout_indicate_last"/>
|
|
|
|
|
|
|
|
|
|
<result property="payResultLast" column="checkout_pay_last"/>
|
|
|
|
|
<result property="standardExtractStatus" column="standard_extract_status"/>
|
|
|
|
|
<result property="checkoutFlag" column="checkout_flag"/>
|
|
|
|
|
<result property="mark" column="mark"/>
|
|
|
|
|
</resultMap>
|
|
|
|
|
<sql id="conditionsFilters">
|
|
|
|
|
<if test="dataType!=null">
|
|
|
|
|
@ -78,18 +63,21 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="dataYear !=null">
|
|
|
|
|
AND data_details.data_year=#{dataYear}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="array !=null and array.length > 0">
|
|
|
|
|
<if test="dataBaseType !=null and dataBaseType !=''">
|
|
|
|
|
AND data_details.data_base_type=#{dataBaseType}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="array !=null and array.size() != 0">
|
|
|
|
|
<foreach collection="array" item="item" index="index">
|
|
|
|
|
AND CONCAT(regionalism_code,system_code,city_name,district_name,system_name,data_year) LIKE CONCAT('%',CONCAT(#{item},'%'))
|
|
|
|
|
AND CONCAT(regionalism_code,system_code,city_name,district_name,system_name,data_year) LIKE CONCAT('%',CONCAT('${item}','%'))
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<!-- 获取数据符合筛选条件的全部记录信息 -->
|
|
|
|
|
<select id="getLimitedDataInfoEntities" parameterType="com.platform.entities.PagerOptions"
|
|
|
|
|
<select id="getLimitedDataInfoEntities" parameterType="com.platform.form.PagerOptions"
|
|
|
|
|
resultMap="getEntityByText">
|
|
|
|
|
SELECT
|
|
|
|
|
id,regionalism_code,city_name,district_name,system_code,system_name,data_type,data_version,submitted_batch,data_path,data_charset,collection_time,collector_name,collector_contacts,extract_status,data_year,start_year,end_year,volume_ip,volume_path,mark
|
|
|
|
|
id,regionalism_code,city_name,district_name,system_code,system_name,data_type,data_version,submitted_batch,data_path,data_charset,collection_time,collector_name,collector_contacts,extract_status,data_year,start_year,end_year,volume_ip,volume_path,data_base_type,standard_extract_status,checkout_flag,mark
|
|
|
|
|
FROM data_details
|
|
|
|
|
<where>
|
|
|
|
|
<include refid="conditionsFilters" />
|
|
|
|
|
@ -108,15 +96,34 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
LIMIT #{limit}
|
|
|
|
|
</if>
|
|
|
|
|
</select>
|
|
|
|
|
<!-- 获取数据符合筛选条件的全部记录信息 -->
|
|
|
|
|
<select id="getLimitedDataInfoByPage" parameterType="com.platform.form.PagerOptions"
|
|
|
|
|
resultMap="getEntityByText">
|
|
|
|
|
SELECT
|
|
|
|
|
id,regionalism_code,city_name,district_name,system_code,system_name,data_type,data_version,submitted_batch,data_path,data_charset,collection_time,collector_name,collector_contacts,extract_status,data_year,start_year,end_year,volume_ip,volume_path,data_base_type,standard_extract_status,checkout_flag,mark
|
|
|
|
|
FROM data_details
|
|
|
|
|
<where>
|
|
|
|
|
<include refid="conditionsFilters" />
|
|
|
|
|
</where>
|
|
|
|
|
ORDER BY data_details.id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 获取数据符合筛选条件的全部记录信息 -->
|
|
|
|
|
<select id="findAll" resultMap="getEntityByText">
|
|
|
|
|
SELECT
|
|
|
|
|
id,regionalism_code,city_name,district_name,system_code,system_name,data_type,data_version,submitted_batch,data_path,data_charset,collection_time,collector_name,collector_contacts,extract_status,data_year,start_year,end_year,volume_ip,volume_path,mark
|
|
|
|
|
id,regionalism_code,city_name,district_name,system_code,system_name,data_type,data_version,submitted_batch,data_path,data_charset,collection_time,collector_name,collector_contacts,extract_status,data_year,start_year,end_year,volume_ip,volume_path,data_base_type,standard_extract_status,checkout_flag,mark
|
|
|
|
|
FROM data_details
|
|
|
|
|
ORDER BY data_details.id
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 获取数据符合筛选条件的全部记录信息 -->
|
|
|
|
|
<select id="findById" resultMap="getEntityByText" parameterType="java.lang.Integer">
|
|
|
|
|
SELECT
|
|
|
|
|
id,regionalism_code,city_name,district_name,system_code,system_name,data_type,data_version,submitted_batch,data_path,data_charset,collection_time,collector_name,collector_contacts,extract_status,data_year,start_year,end_year,volume_ip,volume_path,data_base_type,standard_extract_status,checkout_indicate_last,checkout_pay_last,checkout_flag,mark
|
|
|
|
|
FROM data_details
|
|
|
|
|
WHERE id =#{id}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 获取数据 条件:采集时间 -->
|
|
|
|
|
<select id="findByParam" resultType="com.platform.entities.DataInfoEntity" parameterType="com.platform.entities.DataInfoEntity">
|
|
|
|
|
SELECT
|
|
|
|
|
@ -129,7 +136,7 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<!-- 获取数据符合筛选条件的总记录条数 -->
|
|
|
|
|
<select id="getLimitedDataCount" resultType="java.lang.Integer"
|
|
|
|
|
parameterType="com.platform.entities.PagerOptions">
|
|
|
|
|
parameterType="com.platform.form.PagerOptions">
|
|
|
|
|
SELECT COUNT(id) FROM data_details
|
|
|
|
|
<where>
|
|
|
|
|
<include refid="conditionsFilters" />
|
|
|
|
|
@ -139,7 +146,7 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
<!-- 获取数据查询的起始di -->
|
|
|
|
|
<select id="getLimitedBeginId" resultType="java.lang.Integer"
|
|
|
|
|
parameterType="com.platform.entities.PagerOptions">
|
|
|
|
|
parameterType="com.platform.form.PagerOptions">
|
|
|
|
|
SELECT MAX(idx) FROM (SELECT id idx FROM data_details
|
|
|
|
|
ORDER BY id LIMIT 0,#{totalLimit}) AS TEMP
|
|
|
|
|
</select>
|
|
|
|
|
@ -196,6 +203,18 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="extractStatus > 0">
|
|
|
|
|
extract_status,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payResult != null and payResult != ''">
|
|
|
|
|
checkout_pay,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="execResult != null and execResult != ''">
|
|
|
|
|
checkout_indicate,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startMonth != null and startMonth != ''">
|
|
|
|
|
start_month,
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endMonth != null and endMonth != ''">
|
|
|
|
|
end_month,
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
)
|
|
|
|
|
VALUES(
|
|
|
|
|
@ -248,6 +267,18 @@ PUBLIC "-//ibatis.apache.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<if test="extractStatus > 0">
|
|
|
|
|
#{extractStatus},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="payResult != null and payResult != ''">
|
|
|
|
|
#{payResult},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="execResult != null and execResult != ''">
|
|
|
|
|
#{execResult},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startMonth != null and startMonth != ''">
|
|
|
|
|
#{startMonth},
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endMonth != null and endMonth != ''">
|
|
|
|
|
#{endMonth},
|
|
|
|
|
</if>
|
|
|
|
|
</trim>
|
|
|
|
|
)
|
|
|
|
|
</insert>
|
|
|
|
|
|