|
|
@@ -0,0 +1,276 @@
|
|
|
+<?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.basicData.mapper.TEnterpriseInformationMapper">
|
|
|
+
|
|
|
+ <resultMap type="TEnterpriseInformation" id="TEnterpriseInformationResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="delFlag" column="del_flag" />
|
|
|
+ <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="econKind" column="econ_kind" />
|
|
|
+ <result property="registCapi" column="regist_capi" />
|
|
|
+ <result property="enterpriseId" column="enterprise_id" />
|
|
|
+ <result property="belongOrg" column="belong_org" />
|
|
|
+ <result property="status" column="status" />
|
|
|
+ <result property="termStart" column="term_start" />
|
|
|
+ <result property="formatName" column="format_name" />
|
|
|
+ <result property="historyNames" column="history_names" />
|
|
|
+ <result property="endDate" column="end_date" />
|
|
|
+ <result property="regNo" column="reg_no" />
|
|
|
+ <result property="econKindCode" column="econ_kind_code" />
|
|
|
+ <result property="address" column="address" />
|
|
|
+ <result property="orgNo" column="org_no" />
|
|
|
+ <result property="districtCode" column="district_code" />
|
|
|
+ <result property="startDate" column="start_date" />
|
|
|
+ <result property="scope" column="scope" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="creditNo" column="credit_no" />
|
|
|
+ <result property="newStatus" column="new_status" />
|
|
|
+ <result property="operName" column="oper_name" />
|
|
|
+ <result property="checkDate" column="check_date" />
|
|
|
+ <result property="actualCapi" column="actual_capi" />
|
|
|
+ <result property="termEnd" column="term_end" />
|
|
|
+ <result property="isHistory" column="is_history" />
|
|
|
+ <result property="domains" column="domains" />
|
|
|
+ <result property="quotedType" column="quoted_type" />
|
|
|
+ <result property="city" column="city" />
|
|
|
+ <result property="province" column="province" />
|
|
|
+ <result property="isQuoted" column="is_quoted" />
|
|
|
+ <result property="colleguesNum" column="collegues_num" />
|
|
|
+ <result property="contact" column="contact" />
|
|
|
+ <result property="industryCode" column="industry_code" />
|
|
|
+ <result property="websites" column="websites" />
|
|
|
+ <result property="abnormalItems" column="abnormal_items" />
|
|
|
+ <result property="changerecords" column="changerecords" />
|
|
|
+ <result property="employees" column="employees" />
|
|
|
+ <result property="partners" column="partners" />
|
|
|
+ <result property="branches" column="branches" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTEnterpriseInformationVo">
|
|
|
+ select id, del_flag, create_by, create_time, update_by, update_time,
|
|
|
+ econ_kind, regist_capi, enterprise_id, belong_org, status,
|
|
|
+ term_start, format_name, history_names, end_date, reg_no,
|
|
|
+ econ_kind_code, address, org_no, district_code,
|
|
|
+ start_date, scope, name, credit_no, new_status, oper_name, check_date,
|
|
|
+ actual_capi, term_end,is_history,domains,quoted_type,city,province,is_quoted,
|
|
|
+ collegues_num,contact,industry_code,websites,abnormal_items,changerecords,
|
|
|
+ employees,partners,branches from t_enterprise_information
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTEnterpriseInformationList" parameterType="TEnterpriseInformation" resultMap="TEnterpriseInformationResult">
|
|
|
+ <include refid="selectTEnterpriseInformationVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="econKind != null and econKind != ''"> and econ_kind = #{econKind}</if>
|
|
|
+ <if test="registCapi != null and registCapi != ''"> and regist_capi = #{registCapi}</if>
|
|
|
+ <if test="enterpriseId != null and enterpriseId != ''"> and enterprise_id = #{enterpriseId}</if>
|
|
|
+ <if test="belongOrg != null and belongOrg != ''"> and belong_org = #{belongOrg}</if>
|
|
|
+ <if test="status != null and status != ''"> and status = #{status}</if>
|
|
|
+ <if test="termStart != null and termStart != ''"> and term_start = #{termStart}</if>
|
|
|
+ <if test="formatName != null and formatName != ''"> and format_name like concat('%', #{formatName}, '%')</if>
|
|
|
+ <if test="historyNames != null and historyNames != ''"> and history_names = #{historyNames}</if>
|
|
|
+ <if test="endDate != null and endDate != ''"> and end_date = #{endDate}</if>
|
|
|
+ <if test="regNo != null and regNo != ''"> and reg_no = #{regNo}</if>
|
|
|
+ <if test="econKindCode != null and econKindCode != ''"> and econ_kind_code = #{econKindCode}</if>
|
|
|
+ <if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
+ <if test="orgNo != null and orgNo != ''"> and org_no = #{orgNo}</if>
|
|
|
+ <if test="districtCode != null and districtCode != ''"> and district_code = #{districtCode}</if>
|
|
|
+ <if test="startDate != null and startDate != ''"> and start_date = #{startDate}</if>
|
|
|
+ <if test="scope != null and scope != ''"> and scope = #{scope}</if>
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="creditNo != null and creditNo != ''"> and credit_no = #{creditNo}</if>
|
|
|
+ <if test="newStatus != null and newStatus != ''"> and new_status = #{newStatus}</if>
|
|
|
+ <if test="operName != null and operName != ''"> and oper_name like concat('%', #{operName}, '%')</if>
|
|
|
+ <if test="checkDate != null and checkDate != ''"> and check_date = #{checkDate}</if>
|
|
|
+ <if test="actualCapi != null and actualCapi != ''"> and actual_capi = #{actualCapi}</if>
|
|
|
+ <if test="termEnd != null and termEnd != ''"> and term_end = #{termEnd}</if>
|
|
|
+ <if test="isHistory != null "> and is_history = #{isHistory}</if>
|
|
|
+ <if test="domains != null and domains != ''"> and domains = #{domains}</if>
|
|
|
+ <if test="quotedType != null and quotedType != ''"> and quoted_type = #{quotedType}</if>
|
|
|
+ <if test="city != null and city != ''"> and city = #{city}</if>
|
|
|
+ <if test="province != null and province != ''"> and province = #{province}</if>
|
|
|
+ <if test="isQuoted != null and isQuoted != ''"> and is_quoted = #{isQuoted}</if>
|
|
|
+ <if test="colleguesNum != null and colleguesNum != ''"> and collegues_num = #{colleguesNum}</if>
|
|
|
+ <if test="contact != null and contact != ''"> and contact = #{contact}</if>
|
|
|
+ <if test="industryCode != null and industryCode != ''"> and industry_code = #{industryCode}</if>
|
|
|
+ <if test="websites != null and websites != ''"> and websites = #{websites}</if>
|
|
|
+ <if test="abnormalItems != null and abnormalItems != ''"> and abnormal_items = #{abnormalItems}</if>
|
|
|
+ <if test="changerecords != null and changerecords != ''"> and changerecords = #{changerecords}</if>
|
|
|
+ <if test="employees != null and employees != ''"> and employees = #{employees}</if>
|
|
|
+ <if test="partners != null and partners != ''"> and partners = #{partners}</if>
|
|
|
+ <if test="branches != null and branches != ''"> and branches = #{branches}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTEnterpriseInformationById" parameterType="Long" resultMap="TEnterpriseInformationResult">
|
|
|
+ <include refid="selectTEnterpriseInformationVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+ <select id="selectTEnterpriseInformation" resultMap="TEnterpriseInformationResult">
|
|
|
+ <include refid="selectTEnterpriseInformationVo"/>
|
|
|
+ where del_flag = '0'
|
|
|
+ and (name = #{keyword}
|
|
|
+ or reg_no = #{keyword}
|
|
|
+ or credit_no = #{keyword})
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTEnterpriseInformation" parameterType="TEnterpriseInformation" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into t_enterprise_information
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="delFlag != null">del_flag,</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="econKind != null">econ_kind,</if>
|
|
|
+ <if test="registCapi != null">regist_capi,</if>
|
|
|
+ <if test="enterpriseId != null">enterprise_id,</if>
|
|
|
+ <if test="belongOrg != null">belong_org,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="termStart != null">term_start,</if>
|
|
|
+ <if test="formatName != null">format_name,</if>
|
|
|
+ <if test="historyNames != null">history_names,</if>
|
|
|
+ <if test="endDate != null">end_date,</if>
|
|
|
+ <if test="regNo != null">reg_no,</if>
|
|
|
+ <if test="econKindCode != null">econ_kind_code,</if>
|
|
|
+ <if test="address != null">address,</if>
|
|
|
+ <if test="orgNo != null">org_no,</if>
|
|
|
+ <if test="districtCode != null">district_code,</if>
|
|
|
+ <if test="startDate != null">start_date,</if>
|
|
|
+ <if test="scope != null">scope,</if>
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="creditNo != null">credit_no,</if>
|
|
|
+ <if test="newStatus != null">new_status,</if>
|
|
|
+ <if test="operName != null">oper_name,</if>
|
|
|
+ <if test="checkDate != null">check_date,</if>
|
|
|
+ <if test="actualCapi != null">actual_capi,</if>
|
|
|
+ <if test="termEnd != null">term_end,</if>
|
|
|
+ <if test="isHistory != null">is_history,</if>
|
|
|
+ <if test="domains != null and domains != ''">domains,</if>
|
|
|
+ <if test="quotedType != null and quotedType != ''">quoted_type,</if>
|
|
|
+ <if test="city != null and city != ''">city,</if>
|
|
|
+ <if test="province != null and province != ''">province,</if>
|
|
|
+ <if test="isQuoted != null and isQuoted != ''">is_quoted ,</if>
|
|
|
+ <if test="colleguesNum != null and colleguesNum != ''">collegues_num ,</if>
|
|
|
+ <if test="contact != null and contact != ''">contact,</if>
|
|
|
+ <if test="industryCode != null and industryCode != ''">industry_code,</if>
|
|
|
+ <if test="websites != null and websites != ''">websites,</if>
|
|
|
+ <if test="abnormalItems != null and abnormalItems != ''">abnormal_items,</if>
|
|
|
+ <if test="changerecords != null and changerecords != ''">changerecords ,</if>
|
|
|
+ <if test="employees != null and employees != ''">employees ,</if>
|
|
|
+ <if test="partners != null and partners != ''">partners ,</if>
|
|
|
+ <if test="branches != null and branches != ''">branches,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="delFlag != null">#{delFlag},</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="econKind != null">#{econKind},</if>
|
|
|
+ <if test="registCapi != null">#{registCapi},</if>
|
|
|
+ <if test="enterpriseId != null">#{enterpriseId},</if>
|
|
|
+ <if test="belongOrg != null">#{belongOrg},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="termStart != null">#{termStart},</if>
|
|
|
+ <if test="formatName != null">#{formatName},</if>
|
|
|
+ <if test="historyNames != null">#{historyNames},</if>
|
|
|
+ <if test="endDate != null">#{endDate},</if>
|
|
|
+ <if test="regNo != null">#{regNo},</if>
|
|
|
+ <if test="econKindCode != null">#{econKindCode},</if>
|
|
|
+ <if test="address != null">#{address},</if>
|
|
|
+ <if test="orgNo != null">#{orgNo},</if>
|
|
|
+ <if test="districtCode != null">#{districtCode},</if>
|
|
|
+ <if test="startDate != null">#{startDate},</if>
|
|
|
+ <if test="scope != null">#{scope},</if>
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="creditNo != null">#{creditNo},</if>
|
|
|
+ <if test="newStatus != null">#{newStatus},</if>
|
|
|
+ <if test="operName != null">#{operName},</if>
|
|
|
+ <if test="checkDate != null">#{checkDate},</if>
|
|
|
+ <if test="actualCapi != null">#{actualCapi},</if>
|
|
|
+ <if test="termEnd != null">#{termEnd},</if>
|
|
|
+ <if test="isHistory != null">#{isHistory},</if>
|
|
|
+ <if test="domains != null and domains != ''">#{domains},</if>
|
|
|
+ <if test="quotedType != null and quotedType != ''">#{quotedType},</if>
|
|
|
+ <if test="city != null and city != ''">#{city},</if>
|
|
|
+ <if test="province != null and province != ''">#{province},</if>
|
|
|
+ <if test="isQuoted != null and isQuoted != ''">#{isQuoted},</if>
|
|
|
+ <if test="colleguesNum != null and colleguesNum != ''">#{colleguesNum},</if>
|
|
|
+ <if test="contact != null and contact != ''">#{contact},</if>
|
|
|
+ <if test="industryCode != null and industryCode != ''">#{industryCode},</if>
|
|
|
+ <if test="websites != null and websites != ''">#{websites},</if>
|
|
|
+ <if test="abnormalItems != null and abnormalItems != ''">#{abnormalItems},</if>
|
|
|
+ <if test="changerecords != null and changerecords != ''">#{changerecords},</if>
|
|
|
+ <if test="employees != null and employees != ''">#{employees},</if>
|
|
|
+ <if test="partners != null and partners != ''">#{partners},</if>
|
|
|
+ <if test="branches != null and branches != ''">#{branches},</if>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTEnterpriseInformation" parameterType="TEnterpriseInformation">
|
|
|
+ update t_enterprise_information
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="delFlag != null">del_flag = #{delFlag},</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="econKind != null">econ_kind = #{econKind},</if>
|
|
|
+ <if test="registCapi != null">regist_capi = #{registCapi},</if>
|
|
|
+ <if test="enterpriseId != null">enterprise_id = #{enterpriseId},</if>
|
|
|
+ <if test="belongOrg != null">belong_org = #{belongOrg},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="termStart != null">term_start = #{termStart},</if>
|
|
|
+ <if test="formatName != null">format_name = #{formatName},</if>
|
|
|
+ <if test="historyNames != null">history_names = #{historyNames},</if>
|
|
|
+ <if test="endDate != null">end_date = #{endDate},</if>
|
|
|
+ <if test="regNo != null">reg_no = #{regNo},</if>
|
|
|
+ <if test="econKindCode != null">econ_kind_code = #{econKindCode},</if>
|
|
|
+ <if test="address != null">address = #{address},</if>
|
|
|
+ <if test="orgNo != null">org_no = #{orgNo},</if>
|
|
|
+ <if test="districtCode != null">district_code = #{districtCode},</if>
|
|
|
+ <if test="startDate != null">start_date = #{startDate},</if>
|
|
|
+ <if test="scope != null">scope = #{scope},</if>
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="creditNo != null">credit_no = #{creditNo},</if>
|
|
|
+ <if test="newStatus != null">new_status = #{newStatus},</if>
|
|
|
+ <if test="operName != null">oper_name = #{operName},</if>
|
|
|
+ <if test="checkDate != null">check_date = #{checkDate},</if>
|
|
|
+ <if test="actualCapi != null">actual_capi = #{actualCapi},</if>
|
|
|
+ <if test="termEnd != null">term_end = #{termEnd},</if>
|
|
|
+ <if test="isHistory != null">is_history = #{isHistory},</if>
|
|
|
+ <if test="domains != null and domains != ''">domains = #{domains},</if>
|
|
|
+ <if test="quotedType != null and quotedType != ''">quoted_type = #{quotedType},</if>
|
|
|
+ <if test="city != null and city != ''">city = #{city},</if>
|
|
|
+ <if test="province != null and province != ''">province = #{province},</if>
|
|
|
+ <if test="isQuoted != null and isQuoted != ''">is_quoted = #{isQuoted},</if>
|
|
|
+ <if test="colleguesNum != null and colleguesNum != ''">collegues_num = #{colleguesNum},</if>
|
|
|
+ <if test="contact != null and contact != ''">contact = #{contact},</if>
|
|
|
+ <if test="industryCode != null and industryCode != ''">industry_code = #{industryCode},</if>
|
|
|
+ <if test="websites != null and websites != ''">websites = #{websites},</if>
|
|
|
+ <if test="abnormalItems != null and abnormalItems != ''">abnormal_items = #{abnormalItems},</if>
|
|
|
+ <if test="changerecords != null and changerecords != ''">changerecords = #{changerecords},</if>
|
|
|
+ <if test="employees != null and employees != ''">employees = #{employees},</if>
|
|
|
+ <if test="partners != null and partners != ''">partners = #{partners},</if>
|
|
|
+ <if test="branches != null and branches != ''">branches = #{branches},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTEnterpriseInformationById" parameterType="Long">
|
|
|
+ delete from t_enterprise_information where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTEnterpriseInformationByIds" parameterType="String">
|
|
|
+ delete from t_enterprise_information where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+</mapper>
|