221 lines
9.1 KiB
XML
221 lines
9.1 KiB
XML
<?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.rzyc.mapper.ent.MinMiddleIndexMapper">
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.ent.MinMiddleIndex">
|
|
<result column="id" jdbcType="VARCHAR" property="id" />
|
|
<result column="min_category_id" jdbcType="VARCHAR" property="minCategoryId" />
|
|
<result column="index_id" jdbcType="VARCHAR" property="indexId" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
id, min_category_id, index_id, create_time
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.rzyc.model.ent.MinMiddleIndexExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from min_middle_index
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
<if test="limit != null">
|
|
<if test="offset != null">
|
|
limit ${offset}, ${limit}
|
|
</if>
|
|
<if test="offset == null">
|
|
limit ${limit}
|
|
</if>
|
|
</if>
|
|
</select>
|
|
<delete id="deleteByExample" parameterType="com.rzyc.model.ent.MinMiddleIndexExample">
|
|
delete from min_middle_index
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.rzyc.model.ent.MinMiddleIndex">
|
|
insert into min_middle_index (id, min_category_id, index_id,
|
|
create_time)
|
|
values (#{id,jdbcType=VARCHAR}, #{minCategoryId,jdbcType=VARCHAR}, #{indexId,jdbcType=VARCHAR},
|
|
#{createTime,jdbcType=TIMESTAMP})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.rzyc.model.ent.MinMiddleIndex">
|
|
insert into min_middle_index
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="minCategoryId != null">
|
|
min_category_id,
|
|
</if>
|
|
<if test="indexId != null">
|
|
index_id,
|
|
</if>
|
|
<if test="createTime != null">
|
|
create_time,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="minCategoryId != null">
|
|
#{minCategoryId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="indexId != null">
|
|
#{indexId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createTime != null">
|
|
#{createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.rzyc.model.ent.MinMiddleIndexExample" resultType="java.lang.Long">
|
|
select count(*) from min_middle_index
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update min_middle_index
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.minCategoryId != null">
|
|
min_category_id = #{record.minCategoryId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.indexId != null">
|
|
index_id = #{record.indexId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.createTime != null">
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update min_middle_index
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
min_category_id = #{record.minCategoryId,jdbcType=VARCHAR},
|
|
index_id = #{record.indexId,jdbcType=VARCHAR},
|
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
|
|
<resultMap id="BaseResultMapSpecial" type="com.rzyc.model.ent.MinMiddleIndex">
|
|
<result column="id" jdbcType="VARCHAR" property="id" />
|
|
<result column="min_category_id" jdbcType="VARCHAR" property="minCategoryId" />
|
|
<result column="index_id" jdbcType="VARCHAR" property="indexId" />
|
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
<association property="chkBillDetailWithBLOBs" javaType="com.rzyc.model.check.ChkBillDetailWithBLOBs" column="BookEntCheckDetailId">
|
|
<id column="ChkBillDetailId" jdbcType="VARCHAR" property="chkbilldetailid" />
|
|
<result column="CheckObjectName" jdbcType="LONGVARCHAR" property="checkobjectname" />
|
|
<result column="CheckMethod" jdbcType="LONGVARCHAR" property="checkmethod" />
|
|
<result column="CheckBasis" jdbcType="LONGVARCHAR" property="checkbasis" />
|
|
<result column="CheckBasisContent" jdbcType="LONGVARCHAR" property="checkbasiscontent" />
|
|
<result column="EnforBasis" jdbcType="LONGVARCHAR" property="enforbasis" />
|
|
<result column="EnforBasisContent" jdbcType="LONGVARCHAR" property="enforbasiscontent" />
|
|
<result column="SeriousContent" jdbcType="LONGVARCHAR" property="seriouscontent" />
|
|
<result column="UnqBasisContent" jdbcType="LONGVARCHAR" property="unqbasiscontent" />
|
|
<result column="UnRectificatyContent" jdbcType="LONGVARCHAR" property="unrectificatycontent" />
|
|
<result column="DutyBasis" jdbcType="LONGVARCHAR" property="dutybasis" />
|
|
<result column="DutyBasisContent" jdbcType="LONGVARCHAR" property="dutybasiscontent" />
|
|
<result column="DefinitionBasis" jdbcType="LONGVARCHAR" property="definitionbasis" />
|
|
<result column="DefinitionBasisPerson" jdbcType="LONGVARCHAR" property="definitionbasisperson" />
|
|
<result column="Notice" jdbcType="LONGVARCHAR" property="notice" />
|
|
<result column="BasicsFact" jdbcType="LONGVARCHAR" property="basicsfact" />
|
|
<result column="Remark" jdbcType="LONGVARCHAR" property="remark" />
|
|
<result column="HiddenDanger" jdbcType="VARCHAR" property="HiddenDanger" />
|
|
</association>
|
|
</resultMap>
|
|
|
|
<select id="selectCheckItem" resultMap="BaseResultMapSpecial">
|
|
select * from min_middle_index t1 left join ChkBillDetail t2 on t1.index_id = t2.ChkBillDetailId
|
|
where t1.min_category_id = #{categoryId}
|
|
</select>
|
|
|
|
<delete id="deleteMinMiddleIndex" parameterType="java.lang.String">
|
|
DELETE FROM min_middle_index WHERE min_category_id = #{categoryId}
|
|
</delete>
|
|
|
|
<!--批量插入-->
|
|
<insert id="insertList" parameterType="com.rzyc.model.ent.MinMiddleIndex">
|
|
insert into min_middle_index (id, min_category_id, index_id,
|
|
create_time)
|
|
values
|
|
<foreach collection="records" item="record" separator=",">
|
|
(#{record.id,jdbcType=VARCHAR}, #{record.minCategoryId,jdbcType=VARCHAR}, #{record.indexId,jdbcType=VARCHAR},
|
|
#{record.createTime,jdbcType=TIMESTAMP})
|
|
</foreach>
|
|
|
|
</insert>
|
|
</mapper>
|