first commit
This commit is contained in:
@@ -0,0 +1,149 @@
|
||||
<?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.ruoyi.system.mapper.ContractUserMapper">
|
||||
|
||||
<resultMap type="ContractUser" id="ContractUserResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="idCard" column="id_card" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="address" column="address" />
|
||||
<result property="userType" column="user_type" />
|
||||
<result property="contractCode" column="contract_code" />
|
||||
<result property="contractSignDate" column="contract_sign_date" />
|
||||
<result property="contractTerm" column="contract_term" />
|
||||
<result property="newContractArea" column="new_contract_area" />
|
||||
<result property="oldContractArea" column="old_contract_area" />
|
||||
<result property="surveyArea" column="survey_area" />
|
||||
<result property="muFeeStandard" column="mu_fee_standard" />
|
||||
<result property="annualContractFee" column="annual_contract_fee" />
|
||||
<result property="contractCount" column="contract_count" />
|
||||
<result property="contractRemark" column="contract_remark" />
|
||||
<result property="userRemark" column="user_remark" />
|
||||
<result property="reserve1" column="reserve1" />
|
||||
<result property="reserve2" column="reserve2" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectContractUserVo">
|
||||
select id, user_name, id_card, phone, address, user_type, contract_code, contract_sign_date, contract_term, new_contract_area, old_contract_area, survey_area, mu_fee_standard, annual_contract_fee, contract_count, contract_remark, user_remark, reserve1, reserve2, create_time, update_time from contract_user
|
||||
</sql>
|
||||
|
||||
<select id="selectContractUserList" parameterType="ContractUser" resultMap="ContractUserResult">
|
||||
<include refid="selectContractUserVo"/>
|
||||
<where>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
|
||||
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
||||
<if test="address != null and address != ''"> and address = #{address}</if>
|
||||
<if test="userType != null and userType != ''"> and user_type = #{userType}</if>
|
||||
<if test="contractCode != null and contractCode != ''"> and contract_code = #{contractCode}</if>
|
||||
<if test="contractSignDate != null "> and contract_sign_date = #{contractSignDate}</if>
|
||||
<if test="contractTerm != null "> and contract_term = #{contractTerm}</if>
|
||||
<if test="newContractArea != null "> and new_contract_area = #{newContractArea}</if>
|
||||
<if test="oldContractArea != null "> and old_contract_area = #{oldContractArea}</if>
|
||||
<if test="surveyArea != null "> and survey_area = #{surveyArea}</if>
|
||||
<if test="muFeeStandard != null "> and mu_fee_standard = #{muFeeStandard}</if>
|
||||
<if test="annualContractFee != null "> and annual_contract_fee = #{annualContractFee}</if>
|
||||
<if test="contractCount != null "> and contract_count = #{contractCount}</if>
|
||||
<if test="contractRemark != null and contractRemark != ''"> and contract_remark = #{contractRemark}</if>
|
||||
<if test="userRemark != null and userRemark != ''"> and user_remark = #{userRemark}</if>
|
||||
<if test="reserve1 != null and reserve1 != ''"> and reserve1 = #{reserve1}</if>
|
||||
<if test="reserve2 != null and reserve2 != ''"> and reserve2 = #{reserve2}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectContractUserById" parameterType="Long" resultMap="ContractUserResult">
|
||||
<include refid="selectContractUserVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertContractUser" parameterType="ContractUser" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into contract_user
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name,</if>
|
||||
<if test="idCard != null and idCard != ''">id_card,</if>
|
||||
<if test="phone != null">phone,</if>
|
||||
<if test="address != null">address,</if>
|
||||
<if test="userType != null and userType != ''">user_type,</if>
|
||||
<if test="contractCode != null and contractCode != ''">contract_code,</if>
|
||||
<if test="contractSignDate != null">contract_sign_date,</if>
|
||||
<if test="contractTerm != null">contract_term,</if>
|
||||
<if test="newContractArea != null">new_contract_area,</if>
|
||||
<if test="oldContractArea != null">old_contract_area,</if>
|
||||
<if test="surveyArea != null">survey_area,</if>
|
||||
<if test="muFeeStandard != null">mu_fee_standard,</if>
|
||||
<if test="annualContractFee != null">annual_contract_fee,</if>
|
||||
<if test="contractCount != null">contract_count,</if>
|
||||
<if test="contractRemark != null">contract_remark,</if>
|
||||
<if test="userRemark != null">user_remark,</if>
|
||||
<if test="reserve1 != null">reserve1,</if>
|
||||
<if test="reserve2 != null">reserve2,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">#{userName},</if>
|
||||
<if test="idCard != null and idCard != ''">#{idCard},</if>
|
||||
<if test="phone != null">#{phone},</if>
|
||||
<if test="address != null">#{address},</if>
|
||||
<if test="userType != null and userType != ''">#{userType},</if>
|
||||
<if test="contractCode != null and contractCode != ''">#{contractCode},</if>
|
||||
<if test="contractSignDate != null">#{contractSignDate},</if>
|
||||
<if test="contractTerm != null">#{contractTerm},</if>
|
||||
<if test="newContractArea != null">#{newContractArea},</if>
|
||||
<if test="oldContractArea != null">#{oldContractArea},</if>
|
||||
<if test="surveyArea != null">#{surveyArea},</if>
|
||||
<if test="muFeeStandard != null">#{muFeeStandard},</if>
|
||||
<if test="annualContractFee != null">#{annualContractFee},</if>
|
||||
<if test="contractCount != null">#{contractCount},</if>
|
||||
<if test="contractRemark != null">#{contractRemark},</if>
|
||||
<if test="userRemark != null">#{userRemark},</if>
|
||||
<if test="reserve1 != null">#{reserve1},</if>
|
||||
<if test="reserve2 != null">#{reserve2},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateContractUser" parameterType="ContractUser">
|
||||
update contract_user
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="idCard != null and idCard != ''">id_card = #{idCard},</if>
|
||||
<if test="phone != null">phone = #{phone},</if>
|
||||
<if test="address != null">address = #{address},</if>
|
||||
<if test="userType != null and userType != ''">user_type = #{userType},</if>
|
||||
<if test="contractCode != null and contractCode != ''">contract_code = #{contractCode},</if>
|
||||
<if test="contractSignDate != null">contract_sign_date = #{contractSignDate},</if>
|
||||
<if test="contractTerm != null">contract_term = #{contractTerm},</if>
|
||||
<if test="newContractArea != null">new_contract_area = #{newContractArea},</if>
|
||||
<if test="oldContractArea != null">old_contract_area = #{oldContractArea},</if>
|
||||
<if test="surveyArea != null">survey_area = #{surveyArea},</if>
|
||||
<if test="muFeeStandard != null">mu_fee_standard = #{muFeeStandard},</if>
|
||||
<if test="annualContractFee != null">annual_contract_fee = #{annualContractFee},</if>
|
||||
<if test="contractCount != null">contract_count = #{contractCount},</if>
|
||||
<if test="contractRemark != null">contract_remark = #{contractRemark},</if>
|
||||
<if test="userRemark != null">user_remark = #{userRemark},</if>
|
||||
<if test="reserve1 != null">reserve1 = #{reserve1},</if>
|
||||
<if test="reserve2 != null">reserve2 = #{reserve2},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteContractUserById" parameterType="Long">
|
||||
delete from contract_user where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteContractUserByIds" parameterType="String">
|
||||
delete from contract_user where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user