|
@@ -0,0 +1,168 @@
|
|
|
+<?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="zhsq_qk.system.mapper.QkGovernmentMapper">
|
|
|
+
|
|
|
+ <resultMap type="QkGovernment" id="QkGovernmentResult">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <result property="goodRate" column="good_rate"/>
|
|
|
+ <result property="completionRate" column="completion_rate"/>
|
|
|
+ <result property="serviceProportion" column="service_proportion"/>
|
|
|
+ <result property="serviceCompress" column="service_compress"/>
|
|
|
+ <result property="licenseProportion" column="license_proportion"/>
|
|
|
+ <result property="licenseCompress" column="license_compress"/>
|
|
|
+ <result property="createBy" column="create_by"/>
|
|
|
+ <result property="createTime" column="create_time"/>
|
|
|
+ <result property="updateBy" column="update_by"/>
|
|
|
+ <result property="updateTime" column="update_time"/>
|
|
|
+ <result property="remark" column="remark"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectQkGovernmentVo">
|
|
|
+ select id, good_rate, completion_rate, service_proportion, service_compress, license_proportion, license_compress, create_by, create_time, update_by, update_time, remark
|
|
|
+ from qk_government
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectQkGovernmentList" parameterType="QkGovernment" resultMap="QkGovernmentResult">
|
|
|
+ <include refid="selectQkGovernmentVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="goodRate != null and goodRate != ''">
|
|
|
+ and good_rate = #{goodRate}
|
|
|
+ </if>
|
|
|
+ <if test="completionRate != null and completionRate != ''">
|
|
|
+ and completion_rate = #{completionRate}
|
|
|
+ </if>
|
|
|
+ <if test="serviceProportion != null and serviceProportion != ''">
|
|
|
+ and service_proportion = #{serviceProportion}
|
|
|
+ </if>
|
|
|
+ <if test="serviceCompress != null and serviceCompress != ''">
|
|
|
+ and service_compress = #{serviceCompress}
|
|
|
+ </if>
|
|
|
+ <if test="licenseProportion != null and licenseProportion != ''">
|
|
|
+ and license_proportion = #{licenseProportion}
|
|
|
+ </if>
|
|
|
+ <if test="licenseCompress != null and licenseCompress != ''">
|
|
|
+ and license_compress = #{licenseCompress}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectQkGovernmentById" parameterType="Long"
|
|
|
+ resultMap="QkGovernmentResult">
|
|
|
+ <include refid="selectQkGovernmentVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertQkGovernment" parameterType="QkGovernment" useGeneratedKeys="true"
|
|
|
+ keyProperty="id">
|
|
|
+ insert into qk_government
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="goodRate != null">good_rate,
|
|
|
+ </if>
|
|
|
+ <if test="completionRate != null">completion_rate,
|
|
|
+ </if>
|
|
|
+ <if test="serviceProportion != null">service_proportion,
|
|
|
+ </if>
|
|
|
+ <if test="serviceCompress != null">service_compress,
|
|
|
+ </if>
|
|
|
+ <if test="licenseProportion != null">license_proportion,
|
|
|
+ </if>
|
|
|
+ <if test="licenseCompress != null">license_compress,
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">create_by,
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">create_time,
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">update_by,
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time,
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">remark,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="goodRate != null">#{goodRate},
|
|
|
+ </if>
|
|
|
+ <if test="completionRate != null">#{completionRate},
|
|
|
+ </if>
|
|
|
+ <if test="serviceProportion != null">#{serviceProportion},
|
|
|
+ </if>
|
|
|
+ <if test="serviceCompress != null">#{serviceCompress},
|
|
|
+ </if>
|
|
|
+ <if test="licenseProportion != null">#{licenseProportion},
|
|
|
+ </if>
|
|
|
+ <if test="licenseCompress != null">#{licenseCompress},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">#{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">#{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">#{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">#{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">#{remark},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateQkGovernment" parameterType="QkGovernment">
|
|
|
+ update qk_government
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="goodRate != null">good_rate =
|
|
|
+ #{goodRate},
|
|
|
+ </if>
|
|
|
+ <if test="completionRate != null">completion_rate =
|
|
|
+ #{completionRate},
|
|
|
+ </if>
|
|
|
+ <if test="serviceProportion != null">service_proportion =
|
|
|
+ #{serviceProportion},
|
|
|
+ </if>
|
|
|
+ <if test="serviceCompress != null">service_compress =
|
|
|
+ #{serviceCompress},
|
|
|
+ </if>
|
|
|
+ <if test="licenseProportion != null">license_proportion =
|
|
|
+ #{licenseProportion},
|
|
|
+ </if>
|
|
|
+ <if test="licenseCompress != null">license_compress =
|
|
|
+ #{licenseCompress},
|
|
|
+ </if>
|
|
|
+ <if test="createBy != null">create_by =
|
|
|
+ #{createBy},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">create_time =
|
|
|
+ #{createTime},
|
|
|
+ </if>
|
|
|
+ <if test="updateBy != null">update_by =
|
|
|
+ #{updateBy},
|
|
|
+ </if>
|
|
|
+ <if test="updateTime != null">update_time =
|
|
|
+ #{updateTime},
|
|
|
+ </if>
|
|
|
+ <if test="remark != null">remark =
|
|
|
+ #{remark},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteQkGovernmentById" parameterType="Long">
|
|
|
+ delete
|
|
|
+ from qk_government where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteQkGovernmentByIds" parameterType="String">
|
|
|
+ delete from qk_government where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <select id="lastOneList" parameterType="Long"
|
|
|
+ resultMap="QkGovernmentResult">
|
|
|
+ <include refid="selectQkGovernmentVo"/>
|
|
|
+ order by create_time desc limit 1
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|