|
@@ -0,0 +1,112 @@
|
|
|
+<?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.projectV2.XmProjectInvestorMapper">
|
|
|
+
|
|
|
+ <resultMap type="XmProjectInvestor" id="XmProjectInvestorResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="xmId" column="xm_id" />
|
|
|
+ <result property="xmbh" column="xmbh" />
|
|
|
+ <result property="xmmc" column="xmmc" />
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="isDel" column="is_del" />
|
|
|
+ <result property="companyName" column="company_name" />
|
|
|
+ <result property="companyAddress" column="company_address" />
|
|
|
+ <result property="companyLegal" column="company_legal" />
|
|
|
+ <result property="companyCode" column="company_code" />
|
|
|
+ <result property="phone" column="phone" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectXmProjectInvestorVo">
|
|
|
+ select id, xm_id, xmbh, xmmc, create_by, create_time, update_by, update_time, is_del, company_name, company_address, company_legal, company_code, phone from xm_project_investor
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectXmProjectInvestorList" parameterType="XmProjectInvestor" resultMap="XmProjectInvestorResult">
|
|
|
+ <include refid="selectXmProjectInvestorVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="xmId != null "> and xm_id = #{xmId}</if>
|
|
|
+ <if test="xmbh != null and xmbh != ''"> and xmbh = #{xmbh}</if>
|
|
|
+ <if test="xmmc != null and xmmc != ''"> and xmmc = #{xmmc}</if>
|
|
|
+ <if test="isDel != null "> and is_del = #{isDel}</if>
|
|
|
+ <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
|
|
|
+ <if test="companyAddress != null and companyAddress != ''"> and company_address = #{companyAddress}</if>
|
|
|
+ <if test="companyLegal != null and companyLegal != ''"> and company_legal = #{companyLegal}</if>
|
|
|
+ <if test="companyCode != null and companyCode != ''"> and company_code = #{companyCode}</if>
|
|
|
+ <if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectXmProjectInvestorById" parameterType="Long" resultMap="XmProjectInvestorResult">
|
|
|
+ <include refid="selectXmProjectInvestorVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertXmProjectInvestor" parameterType="XmProjectInvestor" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into xm_project_investor
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="xmId != null">xm_id,</if>
|
|
|
+ <if test="xmbh != null">xmbh,</if>
|
|
|
+ <if test="xmmc != null">xmmc,</if>
|
|
|
+ <if test="createBy != null">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="isDel != null">is_del,</if>
|
|
|
+ <if test="companyName != null">company_name,</if>
|
|
|
+ <if test="companyAddress != null">company_address,</if>
|
|
|
+ <if test="companyLegal != null">company_legal,</if>
|
|
|
+ <if test="companyCode != null">company_code,</if>
|
|
|
+ <if test="phone != null">phone,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="xmId != null">#{xmId},</if>
|
|
|
+ <if test="xmbh != null">#{xmbh},</if>
|
|
|
+ <if test="xmmc != null">#{xmmc},</if>
|
|
|
+ <if test="createBy != null">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="isDel != null">#{isDel},</if>
|
|
|
+ <if test="companyName != null">#{companyName},</if>
|
|
|
+ <if test="companyAddress != null">#{companyAddress},</if>
|
|
|
+ <if test="companyLegal != null">#{companyLegal},</if>
|
|
|
+ <if test="companyCode != null">#{companyCode},</if>
|
|
|
+ <if test="phone != null">#{phone},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateXmProjectInvestor" parameterType="XmProjectInvestor">
|
|
|
+ update xm_project_investor
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="xmId != null">xm_id = #{xmId},</if>
|
|
|
+ <if test="xmbh != null">xmbh = #{xmbh},</if>
|
|
|
+ <if test="xmmc != null">xmmc = #{xmmc},</if>
|
|
|
+ <if test="createBy != null">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="isDel != null">is_del = #{isDel},</if>
|
|
|
+ <if test="companyName != null">company_name = #{companyName},</if>
|
|
|
+ <if test="companyAddress != null">company_address = #{companyAddress},</if>
|
|
|
+ <if test="companyLegal != null">company_legal = #{companyLegal},</if>
|
|
|
+ <if test="companyCode != null">company_code = #{companyCode},</if>
|
|
|
+ <if test="phone != null">phone = #{phone},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteXmProjectInvestorById" parameterType="Long">
|
|
|
+ delete from xm_project_investor where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteXmProjectInvestorByIds" parameterType="String">
|
|
|
+ delete from xm_project_investor where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|