|
@@ -0,0 +1,386 @@
|
|
|
+<?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.idea.invoice.mapper.ReceiptManageMapper">
|
|
|
+ <resultMap id="BaseResultMap" type="com.idea.invoice.model.ReceiptManage">
|
|
|
+ <id column="id" jdbcType="VARCHAR" property="id" />
|
|
|
+ <result column="customer_management_id" jdbcType="VARCHAR" property="customerManagementId" />
|
|
|
+ <result column="business_id" jdbcType="VARCHAR" property="businessId" />
|
|
|
+ <result column="batch_number" jdbcType="VARCHAR" property="batchNumber" />
|
|
|
+ <result column="room_selection_number" jdbcType="VARCHAR" property="roomSelectionNumber" />
|
|
|
+ <result column="house_name" jdbcType="VARCHAR" property="houseName" />
|
|
|
+ <result column="buyer_name" jdbcType="VARCHAR" property="buyerName" />
|
|
|
+ <result column="receipt_type" jdbcType="VARCHAR" property="receiptType" />
|
|
|
+ <result column="receipt_money" jdbcType="DECIMAL" property="receiptMoney" />
|
|
|
+ <result column="receipt_number" jdbcType="VARCHAR" property="receiptNumber" />
|
|
|
+ <result column="receipt_status" jdbcType="INTEGER" property="receiptStatus" />
|
|
|
+ <result column="association_number" jdbcType="VARCHAR" property="associationNumber" />
|
|
|
+ <result column="created_id" jdbcType="VARCHAR" property="createdId" />
|
|
|
+ <result column="created_at" jdbcType="TIMESTAMP" property="createdAt" />
|
|
|
+ <result column="updated_at" jdbcType="TIMESTAMP" property="updatedAt" />
|
|
|
+ <result column="updated_id" jdbcType="VARCHAR" property="updatedId" />
|
|
|
+ </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, customer_management_id, business_id, batch_number, room_selection_number, house_name,
|
|
|
+ buyer_name, receipt_type, receipt_money, receipt_number, receipt_status, association_number,
|
|
|
+ created_id, created_at, updated_at, updated_id
|
|
|
+ </sql>
|
|
|
+ <select id="selectByExample" parameterType="com.idea.invoice.model.ReceiptManageExample" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <if test="distinct">
|
|
|
+ distinct
|
|
|
+ </if>
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from receipt_manage
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ <if test="orderByClause != null">
|
|
|
+ order by ${orderByClause}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
|
+ select
|
|
|
+ <include refid="Base_Column_List" />
|
|
|
+ from receipt_manage
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </select>
|
|
|
+ <delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
|
+ delete from receipt_manage
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </delete>
|
|
|
+ <delete id="deleteByExample" parameterType="com.idea.invoice.model.ReceiptManageExample">
|
|
|
+ delete from receipt_manage
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </delete>
|
|
|
+ <insert id="insert" parameterType="com.idea.invoice.model.ReceiptManage">
|
|
|
+ insert into receipt_manage (id, customer_management_id, business_id,
|
|
|
+ batch_number, room_selection_number, house_name,
|
|
|
+ buyer_name, receipt_type, receipt_money,
|
|
|
+ receipt_number, receipt_status, association_number,
|
|
|
+ created_id, created_at, updated_at,
|
|
|
+ updated_id)
|
|
|
+ values (#{id,jdbcType=VARCHAR}, #{customerManagementId,jdbcType=VARCHAR}, #{businessId,jdbcType=VARCHAR},
|
|
|
+ #{batchNumber,jdbcType=VARCHAR}, #{roomSelectionNumber,jdbcType=VARCHAR}, #{houseName,jdbcType=VARCHAR},
|
|
|
+ #{buyerName,jdbcType=VARCHAR}, #{receiptType,jdbcType=VARCHAR}, #{receiptMoney,jdbcType=DECIMAL},
|
|
|
+ #{receiptNumber,jdbcType=VARCHAR}, #{receiptStatus,jdbcType=INTEGER}, #{associationNumber,jdbcType=VARCHAR},
|
|
|
+ #{createdId,jdbcType=VARCHAR}, #{createdAt,jdbcType=TIMESTAMP}, #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ #{updatedId,jdbcType=VARCHAR})
|
|
|
+ </insert>
|
|
|
+ <insert id="insertSelective" parameterType="com.idea.invoice.model.ReceiptManage">
|
|
|
+ insert into receipt_manage
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ id,
|
|
|
+ </if>
|
|
|
+ <if test="customerManagementId != null">
|
|
|
+ customer_management_id,
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null">
|
|
|
+ business_id,
|
|
|
+ </if>
|
|
|
+ <if test="batchNumber != null">
|
|
|
+ batch_number,
|
|
|
+ </if>
|
|
|
+ <if test="roomSelectionNumber != null">
|
|
|
+ room_selection_number,
|
|
|
+ </if>
|
|
|
+ <if test="houseName != null">
|
|
|
+ house_name,
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null">
|
|
|
+ buyer_name,
|
|
|
+ </if>
|
|
|
+ <if test="receiptType != null">
|
|
|
+ receipt_type,
|
|
|
+ </if>
|
|
|
+ <if test="receiptMoney != null">
|
|
|
+ receipt_money,
|
|
|
+ </if>
|
|
|
+ <if test="receiptNumber != null">
|
|
|
+ receipt_number,
|
|
|
+ </if>
|
|
|
+ <if test="receiptStatus != null">
|
|
|
+ receipt_status,
|
|
|
+ </if>
|
|
|
+ <if test="associationNumber != null">
|
|
|
+ association_number,
|
|
|
+ </if>
|
|
|
+ <if test="createdId != null">
|
|
|
+ created_id,
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ created_at,
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ updated_at,
|
|
|
+ </if>
|
|
|
+ <if test="updatedId != null">
|
|
|
+ updated_id,
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">
|
|
|
+ #{id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="customerManagementId != null">
|
|
|
+ #{customerManagementId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null">
|
|
|
+ #{businessId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="batchNumber != null">
|
|
|
+ #{batchNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="roomSelectionNumber != null">
|
|
|
+ #{roomSelectionNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="houseName != null">
|
|
|
+ #{houseName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null">
|
|
|
+ #{buyerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiptType != null">
|
|
|
+ #{receiptType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiptMoney != null">
|
|
|
+ #{receiptMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="receiptNumber != null">
|
|
|
+ #{receiptNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiptStatus != null">
|
|
|
+ #{receiptStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="associationNumber != null">
|
|
|
+ #{associationNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdId != null">
|
|
|
+ #{createdId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ #{createdAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updatedId != null">
|
|
|
+ #{updatedId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+ <select id="countByExample" parameterType="com.idea.invoice.model.ReceiptManageExample" resultType="java.lang.Long">
|
|
|
+ select count(*) from receipt_manage
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <update id="updateByExampleSelective" parameterType="map">
|
|
|
+ update receipt_manage
|
|
|
+ <set>
|
|
|
+ <if test="record.id != null">
|
|
|
+ id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.customerManagementId != null">
|
|
|
+ customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.businessId != null">
|
|
|
+ business_id = #{record.businessId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.batchNumber != null">
|
|
|
+ batch_number = #{record.batchNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.roomSelectionNumber != null">
|
|
|
+ room_selection_number = #{record.roomSelectionNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.houseName != null">
|
|
|
+ house_name = #{record.houseName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.buyerName != null">
|
|
|
+ buyer_name = #{record.buyerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.receiptType != null">
|
|
|
+ receipt_type = #{record.receiptType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.receiptMoney != null">
|
|
|
+ receipt_money = #{record.receiptMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="record.receiptNumber != null">
|
|
|
+ receipt_number = #{record.receiptNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.receiptStatus != null">
|
|
|
+ receipt_status = #{record.receiptStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="record.associationNumber != null">
|
|
|
+ association_number = #{record.associationNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createdId != null">
|
|
|
+ created_id = #{record.createdId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="record.createdAt != null">
|
|
|
+ created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.updatedAt != null">
|
|
|
+ updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="record.updatedId != null">
|
|
|
+ updated_id = #{record.updatedId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByExample" parameterType="map">
|
|
|
+ update receipt_manage
|
|
|
+ set id = #{record.id,jdbcType=VARCHAR},
|
|
|
+ customer_management_id = #{record.customerManagementId,jdbcType=VARCHAR},
|
|
|
+ business_id = #{record.businessId,jdbcType=VARCHAR},
|
|
|
+ batch_number = #{record.batchNumber,jdbcType=VARCHAR},
|
|
|
+ room_selection_number = #{record.roomSelectionNumber,jdbcType=VARCHAR},
|
|
|
+ house_name = #{record.houseName,jdbcType=VARCHAR},
|
|
|
+ buyer_name = #{record.buyerName,jdbcType=VARCHAR},
|
|
|
+ receipt_type = #{record.receiptType,jdbcType=VARCHAR},
|
|
|
+ receipt_money = #{record.receiptMoney,jdbcType=DECIMAL},
|
|
|
+ receipt_number = #{record.receiptNumber,jdbcType=VARCHAR},
|
|
|
+ receipt_status = #{record.receiptStatus,jdbcType=INTEGER},
|
|
|
+ association_number = #{record.associationNumber,jdbcType=VARCHAR},
|
|
|
+ created_id = #{record.createdId,jdbcType=VARCHAR},
|
|
|
+ created_at = #{record.createdAt,jdbcType=TIMESTAMP},
|
|
|
+ updated_at = #{record.updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ updated_id = #{record.updatedId,jdbcType=VARCHAR}
|
|
|
+ <if test="_parameter != null">
|
|
|
+ <include refid="Update_By_Example_Where_Clause" />
|
|
|
+ </if>
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKeySelective" parameterType="com.idea.invoice.model.ReceiptManage">
|
|
|
+ update receipt_manage
|
|
|
+ <set>
|
|
|
+ <if test="customerManagementId != null">
|
|
|
+ customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="businessId != null">
|
|
|
+ business_id = #{businessId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="batchNumber != null">
|
|
|
+ batch_number = #{batchNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="roomSelectionNumber != null">
|
|
|
+ room_selection_number = #{roomSelectionNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="houseName != null">
|
|
|
+ house_name = #{houseName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="buyerName != null">
|
|
|
+ buyer_name = #{buyerName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiptType != null">
|
|
|
+ receipt_type = #{receiptType,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiptMoney != null">
|
|
|
+ receipt_money = #{receiptMoney,jdbcType=DECIMAL},
|
|
|
+ </if>
|
|
|
+ <if test="receiptNumber != null">
|
|
|
+ receipt_number = #{receiptNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="receiptStatus != null">
|
|
|
+ receipt_status = #{receiptStatus,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="associationNumber != null">
|
|
|
+ association_number = #{associationNumber,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdId != null">
|
|
|
+ created_id = #{createdId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="createdAt != null">
|
|
|
+ created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updatedAt != null">
|
|
|
+ updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ </if>
|
|
|
+ <if test="updatedId != null">
|
|
|
+ updated_id = #{updatedId,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ </set>
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+ <update id="updateByPrimaryKey" parameterType="com.idea.invoice.model.ReceiptManage">
|
|
|
+ update receipt_manage
|
|
|
+ set customer_management_id = #{customerManagementId,jdbcType=VARCHAR},
|
|
|
+ business_id = #{businessId,jdbcType=VARCHAR},
|
|
|
+ batch_number = #{batchNumber,jdbcType=VARCHAR},
|
|
|
+ room_selection_number = #{roomSelectionNumber,jdbcType=VARCHAR},
|
|
|
+ house_name = #{houseName,jdbcType=VARCHAR},
|
|
|
+ buyer_name = #{buyerName,jdbcType=VARCHAR},
|
|
|
+ receipt_type = #{receiptType,jdbcType=VARCHAR},
|
|
|
+ receipt_money = #{receiptMoney,jdbcType=DECIMAL},
|
|
|
+ receipt_number = #{receiptNumber,jdbcType=VARCHAR},
|
|
|
+ receipt_status = #{receiptStatus,jdbcType=INTEGER},
|
|
|
+ association_number = #{associationNumber,jdbcType=VARCHAR},
|
|
|
+ created_id = #{createdId,jdbcType=VARCHAR},
|
|
|
+ created_at = #{createdAt,jdbcType=TIMESTAMP},
|
|
|
+ updated_at = #{updatedAt,jdbcType=TIMESTAMP},
|
|
|
+ updated_id = #{updatedId,jdbcType=VARCHAR}
|
|
|
+ where id = #{id,jdbcType=VARCHAR}
|
|
|
+ </update>
|
|
|
+</mapper>
|