|
@@ -0,0 +1,221 @@
|
|
|
+<?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.ProposalInfoMapper">
|
|
|
+
|
|
|
+ <resultMap type="ProposalInfo" id="ProposalInfoResult">
|
|
|
+ <result property="proposalId" column="proposal_id" />
|
|
|
+ <result property="proposalUserId" column="proposal_user_id" />
|
|
|
+ <result property="proposalNumber" column="proposal_number" />
|
|
|
+ <result property="title" column="title" />
|
|
|
+ <result property="proposalName" column="proposal_name" />
|
|
|
+ <result property="proposalPhone" column="proposal_phone" />
|
|
|
+ <result property="boundary" column="boundary" />
|
|
|
+ <result property="partyAffiliation" column="party_affiliation" />
|
|
|
+ <result property="contactAddress" column="contact_address" />
|
|
|
+ <result property="categoryId" column="category_id" />
|
|
|
+ <result property="categoryName" column="category_name" />
|
|
|
+ <result property="proposalType" column="proposal_type" />
|
|
|
+ <result property="proposalContent" column="proposal_content" />
|
|
|
+ <result property="isJointly" column="is_jointly" />
|
|
|
+ <result property="isPublicity" column="is_publicity" />
|
|
|
+ <result property="contentPublicity" column="content_publicity" />
|
|
|
+ <result property="isSurvey" column="is_survey" />
|
|
|
+ <result property="isFirst" column="is_first" />
|
|
|
+ <result property="isPerson" column="is_person" />
|
|
|
+ <result property="isRecord" column="is_record" />
|
|
|
+ <result property="negotiateType" column="negotiate_type" />
|
|
|
+ <result property="proposedContractor" column="proposed_contractor" />
|
|
|
+ <result property="proposalProgress" column="proposal_progress" />
|
|
|
+ <result property="rollingProcess" column="rolling_process" />
|
|
|
+ <result property="complexType" column="complex_type" />
|
|
|
+ <result property="isCasesTogether" column="is_cases_together" />
|
|
|
+ <result property="uniteProposalId" column="unite_proposal_id" />
|
|
|
+ <result property="satisfaction" column="satisfaction" />
|
|
|
+ <result property="membersOpinion" column="members_opinion" />
|
|
|
+ <result property="zxSatisfaction" column="zx_satisfaction" />
|
|
|
+ <result property="zxOpinion" column="zx_opinion" />
|
|
|
+ <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="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectProposalInfoVo">
|
|
|
+ select proposal_id, proposal_user_id, proposal_number, title, proposal_name, proposal_phone, boundary, party_affiliation, contact_address, category_id, category_name, proposal_type, proposal_content, is_jointly, is_publicity, content_publicity, is_survey, is_first, is_person, is_record, negotiate_type, proposed_contractor, proposal_progress, rolling_process, complex_type, is_cases_together, unite_proposal_id, satisfaction, members_opinion, create_by, create_time, update_by, update_time, remark from proposal_info
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectProposalInfoList" parameterType="ProposalInfo" resultMap="ProposalInfoResult">
|
|
|
+ <include refid="selectProposalInfoVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="proposalUserId != null "> and proposal_user_id = #{proposalUserId}</if>
|
|
|
+ <if test="proposalNumber != null and proposalNumber != ''"> and proposal_number = #{proposalNumber}</if>
|
|
|
+ <if test="title != null and title != ''"> and title = #{title}</if>
|
|
|
+ <if test="proposalName != null and proposalName != ''"> and proposal_name like concat('%', #{proposalName}, '%')</if>
|
|
|
+ <if test="proposalPhone != null and proposalPhone != ''"> and proposal_phone = #{proposalPhone}</if>
|
|
|
+ <if test="boundary != null and boundary != ''"> and boundary = #{boundary}</if>
|
|
|
+ <if test="partyAffiliation != null and partyAffiliation != ''"> and party_affiliation = #{partyAffiliation}</if>
|
|
|
+ <if test="contactAddress != null and contactAddress != ''"> and contact_address = #{contactAddress}</if>
|
|
|
+ <if test="categoryId != null "> and category_id = #{categoryId}</if>
|
|
|
+ <if test="categoryName != null and categoryName != ''"> and category_name like concat('%', #{categoryName}, '%')</if>
|
|
|
+ <if test="proposalType != null and proposalType != ''"> and proposal_type = #{proposalType}</if>
|
|
|
+ <if test="proposalContent != null and proposalContent != ''"> and proposal_content = #{proposalContent}</if>
|
|
|
+ <if test="isJointly != null and isJointly != ''"> and is_jointly = #{isJointly}</if>
|
|
|
+ <if test="isPublicity != null and isPublicity != ''"> and is_publicity = #{isPublicity}</if>
|
|
|
+ <if test="contentPublicity != null and contentPublicity != ''"> and content_publicity = #{contentPublicity}</if>
|
|
|
+ <if test="isSurvey != null and isSurvey != ''"> and is_survey = #{isSurvey}</if>
|
|
|
+ <if test="isFirst != null and isFirst != ''"> and is_first = #{isFirst}</if>
|
|
|
+ <if test="isPerson != null and isPerson != ''"> and is_person = #{isPerson}</if>
|
|
|
+ <if test="isRecord != null and isRecord != ''"> and is_record = #{isRecord}</if>
|
|
|
+ <if test="negotiateType != null and negotiateType != ''"> and negotiate_type = #{negotiateType}</if>
|
|
|
+ <if test="proposedContractor != null and proposedContractor != ''"> and proposed_contractor = #{proposedContractor}</if>
|
|
|
+ <if test="proposalProgress != null and proposalProgress != ''"> and proposal_progress = #{proposalProgress}</if>
|
|
|
+ <if test="rollingProcess != null and rollingProcess != ''"> and rolling_process = #{rollingProcess}</if>
|
|
|
+ <if test="complexType != null and complexType != ''"> and complex_type = #{complexType}</if>
|
|
|
+ <if test="isCasesTogether != null and isCasesTogether != ''"> and is_cases_together = #{isCasesTogether}</if>
|
|
|
+ <if test="uniteProposalId != null "> and unite_proposal_id = #{uniteProposalId}</if>
|
|
|
+ <if test="satisfaction != null and satisfaction != ''"> and satisfaction = #{satisfaction}</if>
|
|
|
+ <if test="membersOpinion != null and membersOpinion != ''"> and members_opinion = #{membersOpinion}</if>
|
|
|
+ <if test="zxSatisfaction != null and zxSatisfaction != ''"> and zx_satisfaction = #{zxSatisfaction}</if>
|
|
|
+ <if test="zxOpinion != null and zxOpinion != ''"> and zx_opinion = #{zxOpinion}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectProposalInfoByProposalId" parameterType="Long" resultMap="ProposalInfoResult">
|
|
|
+ <include refid="selectProposalInfoVo"/>
|
|
|
+ where proposal_id = #{proposalId}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertProposalInfo" parameterType="ProposalInfo" useGeneratedKeys="true" keyProperty="proposalId">
|
|
|
+ insert into proposal_info
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="proposalUserId != null">proposal_user_id,</if>
|
|
|
+ <if test="proposalNumber != null">proposal_number,</if>
|
|
|
+ <if test="title != null and title != ''">title,</if>
|
|
|
+ <if test="proposalName != null and proposalName != ''">proposal_name,</if>
|
|
|
+ <if test="proposalPhone != null and proposalPhone != ''">proposal_phone,</if>
|
|
|
+ <if test="boundary != null">boundary,</if>
|
|
|
+ <if test="partyAffiliation != null">party_affiliation,</if>
|
|
|
+ <if test="contactAddress != null">contact_address,</if>
|
|
|
+ <if test="categoryId != null">category_id,</if>
|
|
|
+ <if test="categoryName != null">category_name,</if>
|
|
|
+ <if test="proposalType != null">proposal_type,</if>
|
|
|
+ <if test="proposalContent != null">proposal_content,</if>
|
|
|
+ <if test="isJointly != null">is_jointly,</if>
|
|
|
+ <if test="isPublicity != null">is_publicity,</if>
|
|
|
+ <if test="contentPublicity != null">content_publicity,</if>
|
|
|
+ <if test="isSurvey != null">is_survey,</if>
|
|
|
+ <if test="isFirst != null">is_first,</if>
|
|
|
+ <if test="isPerson != null">is_person,</if>
|
|
|
+ <if test="isRecord != null">is_record,</if>
|
|
|
+ <if test="negotiateType != null">negotiate_type,</if>
|
|
|
+ <if test="proposedContractor != null">proposed_contractor,</if>
|
|
|
+ <if test="proposalProgress != null">proposal_progress,</if>
|
|
|
+ <if test="rollingProcess != null">rolling_process,</if>
|
|
|
+ <if test="complexType != null">complex_type,</if>
|
|
|
+ <if test="isCasesTogether != null">is_cases_together,</if>
|
|
|
+ <if test="uniteProposalId != null">unite_proposal_id,</if>
|
|
|
+ <if test="satisfaction != null">satisfaction,</if>
|
|
|
+ <if test="membersOpinion != null">members_opinion,</if>
|
|
|
+ <if test="zxSatisfaction != null "> zx_satisfaction</if>
|
|
|
+ <if test="zxOpinion != null "> zx_opinion</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="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="proposalUserId != null">#{proposalUserId},</if>
|
|
|
+ <if test="proposalNumber != null">#{proposalNumber},</if>
|
|
|
+ <if test="title != null and title != ''">#{title},</if>
|
|
|
+ <if test="proposalName != null and proposalName != ''">#{proposalName},</if>
|
|
|
+ <if test="proposalPhone != null and proposalPhone != ''">#{proposalPhone},</if>
|
|
|
+ <if test="boundary != null">#{boundary},</if>
|
|
|
+ <if test="partyAffiliation != null">#{partyAffiliation},</if>
|
|
|
+ <if test="contactAddress != null">#{contactAddress},</if>
|
|
|
+ <if test="categoryId != null">#{categoryId},</if>
|
|
|
+ <if test="categoryName != null">#{categoryName},</if>
|
|
|
+ <if test="proposalType != null">#{proposalType},</if>
|
|
|
+ <if test="proposalContent != null">#{proposalContent},</if>
|
|
|
+ <if test="isJointly != null">#{isJointly},</if>
|
|
|
+ <if test="isPublicity != null">#{isPublicity},</if>
|
|
|
+ <if test="contentPublicity != null">#{contentPublicity},</if>
|
|
|
+ <if test="isSurvey != null">#{isSurvey},</if>
|
|
|
+ <if test="isFirst != null">#{isFirst},</if>
|
|
|
+ <if test="isPerson != null">#{isPerson},</if>
|
|
|
+ <if test="isRecord != null">#{isRecord},</if>
|
|
|
+ <if test="negotiateType != null">#{negotiateType},</if>
|
|
|
+ <if test="proposedContractor != null">#{proposedContractor},</if>
|
|
|
+ <if test="proposalProgress != null">#{proposalProgress},</if>
|
|
|
+ <if test="rollingProcess != null">#{rollingProcess},</if>
|
|
|
+ <if test="complexType != null">#{complexType},</if>
|
|
|
+ <if test="isCasesTogether != null">#{isCasesTogether},</if>
|
|
|
+ <if test="uniteProposalId != null">#{uniteProposalId},</if>
|
|
|
+ <if test="satisfaction != null">#{satisfaction},</if>
|
|
|
+ <if test="membersOpinion != null">#{membersOpinion},</if>
|
|
|
+ <if test="zxSatisfaction != null "> #{zxSatisfaction}</if>
|
|
|
+ <if test="zxOpinion != null ">#{zxOpinion}</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="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateProposalInfo" parameterType="ProposalInfo">
|
|
|
+ update proposal_info
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="proposalUserId != null">proposal_user_id = #{proposalUserId},</if>
|
|
|
+ <if test="proposalNumber != null">proposal_number = #{proposalNumber},</if>
|
|
|
+ <if test="title != null and title != ''">title = #{title},</if>
|
|
|
+ <if test="proposalName != null and proposalName != ''">proposal_name = #{proposalName},</if>
|
|
|
+ <if test="proposalPhone != null and proposalPhone != ''">proposal_phone = #{proposalPhone},</if>
|
|
|
+ <if test="boundary != null">boundary = #{boundary},</if>
|
|
|
+ <if test="partyAffiliation != null">party_affiliation = #{partyAffiliation},</if>
|
|
|
+ <if test="contactAddress != null">contact_address = #{contactAddress},</if>
|
|
|
+ <if test="categoryId != null">category_id = #{categoryId},</if>
|
|
|
+ <if test="categoryName != null">category_name = #{categoryName},</if>
|
|
|
+ <if test="proposalType != null">proposal_type = #{proposalType},</if>
|
|
|
+ <if test="proposalContent != null">proposal_content = #{proposalContent},</if>
|
|
|
+ <if test="isJointly != null">is_jointly = #{isJointly},</if>
|
|
|
+ <if test="isPublicity != null">is_publicity = #{isPublicity},</if>
|
|
|
+ <if test="contentPublicity != null">content_publicity = #{contentPublicity},</if>
|
|
|
+ <if test="isSurvey != null">is_survey = #{isSurvey},</if>
|
|
|
+ <if test="isFirst != null">is_first = #{isFirst},</if>
|
|
|
+ <if test="isPerson != null">is_person = #{isPerson},</if>
|
|
|
+ <if test="isRecord != null">is_record = #{isRecord},</if>
|
|
|
+ <if test="negotiateType != null">negotiate_type = #{negotiateType},</if>
|
|
|
+ <if test="proposedContractor != null">proposed_contractor = #{proposedContractor},</if>
|
|
|
+ <if test="proposalProgress != null">proposal_progress = #{proposalProgress},</if>
|
|
|
+ <if test="rollingProcess != null">rolling_process = #{rollingProcess},</if>
|
|
|
+ <if test="complexType != null">complex_type = #{complexType},</if>
|
|
|
+ <if test="isCasesTogether != null">is_cases_together = #{isCasesTogether},</if>
|
|
|
+ <if test="uniteProposalId != null">unite_proposal_id = #{uniteProposalId},</if>
|
|
|
+ <if test="satisfaction != null">satisfaction = #{satisfaction},</if>
|
|
|
+ <if test="membersOpinion != null">members_opinion = #{membersOpinion},</if>
|
|
|
+ <if test="zxSatisfaction != null "> zx_satisfaction = #{zxSatisfaction}</if>
|
|
|
+ <if test="zxOpinion != null "> zx_opinion = #{zxOpinion}</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="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where proposal_id = #{proposalId}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteProposalInfoByProposalId" parameterType="Long">
|
|
|
+ delete from proposal_info where proposal_id = #{proposalId}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteProposalInfoByProposalIds" parameterType="String">
|
|
|
+ delete from proposal_info where proposal_id in
|
|
|
+ <foreach item="proposalId" collection="array" open="(" separator="," close=")">
|
|
|
+ #{proposalId}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|