255 lines
9.5 KiB
XML
255 lines
9.5 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.EntBillConMapper">
|
|
<resultMap id="BaseResultMap" type="com.rzyc.model.ent.EntBillCon">
|
|
<id column="EntBillConId" jdbcType="VARCHAR" property="entbillconid" />
|
|
<result column="ChkGovBillId" jdbcType="VARCHAR" property="chkgovbillid" />
|
|
<result column="SysEnterpriseId" jdbcType="VARCHAR" property="sysenterpriseid" />
|
|
<result column="CreatedOn" jdbcType="TIMESTAMP" property="createdon" />
|
|
<result column="CreatedBy" jdbcType="VARCHAR" property="createdby" />
|
|
<result column="ModifiedOn" jdbcType="TIMESTAMP" property="modifiedon" />
|
|
<result column="ModifiedBy" jdbcType="VARCHAR" property="modifiedby" />
|
|
</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">
|
|
EntBillConId, ChkGovBillId, SysEnterpriseId, CreatedOn, CreatedBy, ModifiedOn, ModifiedBy
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.rzyc.model.ent.EntBillConExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from EntBillCon
|
|
<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>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from EntBillCon
|
|
where EntBillConId = #{entbillconid,jdbcType=VARCHAR}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
delete from EntBillCon
|
|
where EntBillConId = #{entbillconid,jdbcType=VARCHAR}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.rzyc.model.ent.EntBillConExample">
|
|
delete from EntBillCon
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.rzyc.model.ent.EntBillCon">
|
|
insert into EntBillCon (EntBillConId, ChkGovBillId, SysEnterpriseId,
|
|
CreatedOn, CreatedBy, ModifiedOn,
|
|
ModifiedBy)
|
|
values (#{entbillconid,jdbcType=VARCHAR}, #{chkgovbillid,jdbcType=VARCHAR}, #{sysenterpriseid,jdbcType=VARCHAR},
|
|
#{createdon,jdbcType=TIMESTAMP}, #{createdby,jdbcType=VARCHAR}, #{modifiedon,jdbcType=TIMESTAMP},
|
|
#{modifiedby,jdbcType=VARCHAR})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.rzyc.model.ent.EntBillCon">
|
|
insert into EntBillCon
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="entbillconid != null">
|
|
EntBillConId,
|
|
</if>
|
|
<if test="chkgovbillid != null">
|
|
ChkGovBillId,
|
|
</if>
|
|
<if test="sysenterpriseid != null">
|
|
SysEnterpriseId,
|
|
</if>
|
|
<if test="createdon != null">
|
|
CreatedOn,
|
|
</if>
|
|
<if test="createdby != null">
|
|
CreatedBy,
|
|
</if>
|
|
<if test="modifiedon != null">
|
|
ModifiedOn,
|
|
</if>
|
|
<if test="modifiedby != null">
|
|
ModifiedBy,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="entbillconid != null">
|
|
#{entbillconid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="chkgovbillid != null">
|
|
#{chkgovbillid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysenterpriseid != null">
|
|
#{sysenterpriseid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createdon != null">
|
|
#{createdon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="createdby != null">
|
|
#{createdby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="modifiedon != null">
|
|
#{modifiedon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="modifiedby != null">
|
|
#{modifiedby,jdbcType=VARCHAR},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.rzyc.model.ent.EntBillConExample" resultType="java.lang.Long">
|
|
select count(*) from EntBillCon
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update EntBillCon
|
|
<set>
|
|
<if test="record.entbillconid != null">
|
|
EntBillConId = #{record.entbillconid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.chkgovbillid != null">
|
|
ChkGovBillId = #{record.chkgovbillid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.sysenterpriseid != null">
|
|
SysEnterpriseId = #{record.sysenterpriseid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.createdon != null">
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.createdby != null">
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.modifiedon != null">
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="record.modifiedby != null">
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update EntBillCon
|
|
set EntBillConId = #{record.entbillconid,jdbcType=VARCHAR},
|
|
ChkGovBillId = #{record.chkgovbillid,jdbcType=VARCHAR},
|
|
SysEnterpriseId = #{record.sysenterpriseid,jdbcType=VARCHAR},
|
|
CreatedOn = #{record.createdon,jdbcType=TIMESTAMP},
|
|
CreatedBy = #{record.createdby,jdbcType=VARCHAR},
|
|
ModifiedOn = #{record.modifiedon,jdbcType=TIMESTAMP},
|
|
ModifiedBy = #{record.modifiedby,jdbcType=VARCHAR}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.rzyc.model.ent.EntBillCon">
|
|
update EntBillCon
|
|
<set>
|
|
<if test="chkgovbillid != null">
|
|
ChkGovBillId = #{chkgovbillid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="sysenterpriseid != null">
|
|
SysEnterpriseId = #{sysenterpriseid,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="createdon != null">
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="createdby != null">
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="modifiedon != null">
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
|
</if>
|
|
<if test="modifiedby != null">
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR},
|
|
</if>
|
|
</set>
|
|
where EntBillConId = #{entbillconid,jdbcType=VARCHAR}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.rzyc.model.ent.EntBillCon">
|
|
update EntBillCon
|
|
set ChkGovBillId = #{chkgovbillid,jdbcType=VARCHAR},
|
|
SysEnterpriseId = #{sysenterpriseid,jdbcType=VARCHAR},
|
|
CreatedOn = #{createdon,jdbcType=TIMESTAMP},
|
|
CreatedBy = #{createdby,jdbcType=VARCHAR},
|
|
ModifiedOn = #{modifiedon,jdbcType=TIMESTAMP},
|
|
ModifiedBy = #{modifiedby,jdbcType=VARCHAR}
|
|
where EntBillConId = #{entbillconid,jdbcType=VARCHAR}
|
|
</update>
|
|
<delete id="deleteByChkGovBill">
|
|
delete from EntBillCon where ChkGovBillId = #{chkgovbillid,jdbcType=VARCHAR}
|
|
</delete>
|
|
</mapper>
|