|
|
@@ -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="com.goafanti.common.dao.PublicConfigMapper">
|
|
|
+ <resultMap type="com.goafanti.common.model.PublicConfig" id="PublicConfigMap">
|
|
|
+ <result property="id" column="id" jdbcType="INTEGER"/>
|
|
|
+ <result property="techAuditorStauts" column="tech_auditor_stauts" jdbcType="INTEGER"/>
|
|
|
+ <result property="techAuditor" column="tech_auditor" jdbcType="VARCHAR"/>
|
|
|
+ <result property="financeAuditorStauts" column="finance_auditor_stauts" jdbcType="INTEGER"/>
|
|
|
+ <result property="financeAuditor" column="finance_auditor" jdbcType="VARCHAR"/>
|
|
|
+ <result property="otherAuditorStauts" column="other_auditor_stauts" jdbcType="INTEGER"/>
|
|
|
+ <result property="otherAuditor" column="other_auditor" jdbcType="VARCHAR"/>
|
|
|
+ <result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="PublicConfigAllSql">
|
|
|
+ id, tech_auditor_stauts, tech_auditor, finance_auditor_stauts, finance_auditor, other_auditor_stauts, other_auditor, create_time
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <!--查询单个-->
|
|
|
+ <select id="queryById" resultMap="PublicConfigMap">
|
|
|
+ select
|
|
|
+ <include refid="PublicConfigAllSql"/>
|
|
|
+ from public_config
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--查询指定行数据-->
|
|
|
+ <select id="findPublicConfigList" resultMap="PublicConfigMap">
|
|
|
+ select
|
|
|
+ <include refid="PublicConfigAllSql"/>
|
|
|
+
|
|
|
+ from public_config
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="techAuditorStauts != null">
|
|
|
+ and tech_auditor_stauts = #{techAuditorStauts}
|
|
|
+ </if>
|
|
|
+ <if test="techAuditor != null and techAuditor != ''">
|
|
|
+ and tech_auditor = #{techAuditor}
|
|
|
+ </if>
|
|
|
+ <if test="financeAuditorStauts != null">
|
|
|
+ and finance_auditor_stauts = #{financeAuditorStauts}
|
|
|
+ </if>
|
|
|
+ <if test="financeAuditor != null and financeAuditor != ''">
|
|
|
+ and finance_auditor = #{financeAuditor}
|
|
|
+ </if>
|
|
|
+ <if test="otherAuditorStauts != null">
|
|
|
+ and other_auditor_stauts = #{otherAuditorStauts}
|
|
|
+ </if>
|
|
|
+ <if test="otherAuditor != null and otherAuditor != ''">
|
|
|
+ and other_auditor = #{otherAuditor}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ <if test="page_sql != null">
|
|
|
+ ${page_sql}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--统计总行数-->
|
|
|
+ <select id="findPublicConfigCount" resultType="java.lang.Integer">
|
|
|
+ select count(1)
|
|
|
+ from public_config
|
|
|
+ <where>
|
|
|
+ <if test="id != null">
|
|
|
+ and id = #{id}
|
|
|
+ </if>
|
|
|
+ <if test="techAuditorStauts != null">
|
|
|
+ and tech_auditor_stauts = #{techAuditorStauts}
|
|
|
+ </if>
|
|
|
+ <if test="techAuditor != null and techAuditor != ''">
|
|
|
+ and tech_auditor = #{techAuditor}
|
|
|
+ </if>
|
|
|
+ <if test="financeAuditorStauts != null">
|
|
|
+ and finance_auditor_stauts = #{financeAuditorStauts}
|
|
|
+ </if>
|
|
|
+ <if test="financeAuditor != null and financeAuditor != ''">
|
|
|
+ and finance_auditor = #{financeAuditor}
|
|
|
+ </if>
|
|
|
+ <if test="otherAuditorStauts != null">
|
|
|
+ and other_auditor_stauts = #{otherAuditorStauts}
|
|
|
+ </if>
|
|
|
+ <if test="otherAuditor != null and otherAuditor != ''">
|
|
|
+ and other_auditor = #{otherAuditor}
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ and create_time = #{createTime}
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <!--新增所有列-->
|
|
|
+ <insert id="insert" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into public_config(tech_auditor_stauts, tech_auditor, finance_auditor_stauts, finance_auditor,
|
|
|
+ other_auditor_stauts, other_auditor, create_time)
|
|
|
+ values (#{techAuditorStauts}, #{techAuditor}, #{financeAuditorStauts}, #{financeAuditor}, #{otherAuditorStauts},
|
|
|
+ #{otherAuditor}, #{createTime})
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into public_config(tech_auditor_stauts, tech_auditor, finance_auditor_stauts, finance_auditor,
|
|
|
+ other_auditor_stauts, other_auditor, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.techAuditorStauts}, #{entity.techAuditor}, #{entity.financeAuditorStauts},
|
|
|
+ #{entity.financeAuditor}, #{entity.otherAuditorStauts}, #{entity.otherAuditor}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <insert id="insertOrUpdateBatch" keyProperty="id" useGeneratedKeys="true">
|
|
|
+ insert into public_config(tech_auditor_stauts, tech_auditor, finance_auditor_stauts, finance_auditor,
|
|
|
+ other_auditor_stauts, other_auditor, create_time)
|
|
|
+ values
|
|
|
+ <foreach collection="entities" item="entity" separator=",">
|
|
|
+ (#{entity.techAuditorStauts}, #{entity.techAuditor}, #{entity.financeAuditorStauts},
|
|
|
+ #{entity.financeAuditor}, #{entity.otherAuditorStauts}, #{entity.otherAuditor}, #{entity.createTime})
|
|
|
+ </foreach>
|
|
|
+ on duplicate key update
|
|
|
+ tech_auditor_stauts = values(tech_auditor_stauts),
|
|
|
+ tech_auditor = values(tech_auditor),
|
|
|
+ finance_auditor_stauts = values(finance_auditor_stauts),
|
|
|
+ finance_auditor = values(finance_auditor),
|
|
|
+ other_auditor_stauts = values(other_auditor_stauts),
|
|
|
+ other_auditor = values(other_auditor),
|
|
|
+ create_time = values(create_time)
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <!--通过主键修改数据-->
|
|
|
+ <update id="update">
|
|
|
+ update public_config
|
|
|
+ <set>
|
|
|
+ <if test="techAuditorStauts != null">
|
|
|
+ tech_auditor_stauts = #{techAuditorStauts},
|
|
|
+ </if>
|
|
|
+ <if test="techAuditor != null and techAuditor != ''">
|
|
|
+ tech_auditor = #{techAuditor},
|
|
|
+ </if>
|
|
|
+ <if test="financeAuditorStauts != null">
|
|
|
+ finance_auditor_stauts = #{financeAuditorStauts},
|
|
|
+ </if>
|
|
|
+ <if test="financeAuditor != null and financeAuditor != ''">
|
|
|
+ finance_auditor = #{financeAuditor},
|
|
|
+ </if>
|
|
|
+ <if test="otherAuditorStauts != null">
|
|
|
+ other_auditor_stauts = #{otherAuditorStauts},
|
|
|
+ </if>
|
|
|
+ <if test="otherAuditor != null and otherAuditor != ''">
|
|
|
+ other_auditor = #{otherAuditor},
|
|
|
+ </if>
|
|
|
+ <if test="createTime != null">
|
|
|
+ create_time = #{createTime},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <!--通过主键删除-->
|
|
|
+ <delete id="deleteById">
|
|
|
+ delete
|
|
|
+ from public_config
|
|
|
+ where id = #{id}
|
|
|
+ </delete>
|
|
|
+</mapper>
|
|
|
+
|