|
|
|
<?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.jjh.declaration.mapper.BmsEnterpriseBasicInfoMapper">
|
|
|
|
|
|
|
|
<resultMap type="com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo" id="BmsEnterpriseBasicInfoResult">
|
|
|
|
<result property="id" column="id" />
|
|
|
|
<result property="enterpriseName" column="enterprise_name" />
|
|
|
|
<result property="creditCode" column="credit_code" />
|
|
|
|
<result property="isDeleted" column="is_deleted" />
|
|
|
|
<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" />
|
|
|
|
|
|
|
|
<result property="legalEntity" column="legal_entity" />
|
|
|
|
<result property="businessStatus" column="business_status" />
|
|
|
|
<result property="establishDate" column="establish_date" />
|
|
|
|
<result property="registeredCapital" column="registered_capital" />
|
|
|
|
<result property="enterpriseType" column="enterprise_type" />
|
|
|
|
<result property="industry" column="industry" />
|
|
|
|
<result property="institutionCode" column="institution_code" />
|
|
|
|
<result property="visitorsNum" column="visitors_num" />
|
|
|
|
<result property="formerName" column="former_name" />
|
|
|
|
<result property="enrollAddress" column="enroll_address" />
|
|
|
|
<result property="enrollType" column="enroll_type" />
|
|
|
|
<result property="business" column="business" />
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
<sql id="selectBmsEnterpriseBasicInfoVo">
|
|
|
|
select id, enterprise_name, credit_code,
|
|
|
|
legal_entity,business_status,establish_date,registered_capital,
|
|
|
|
enterprise_type,industry,institution_code,visitors_num,former_name,enroll_address,
|
|
|
|
enroll_type,business,
|
|
|
|
is_deleted, create_by, create_time, update_by, update_time, remark from bms_enterprise_basic_info
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="selectBmsEnterpriseBasicInfoList" parameterType="com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo" resultMap="BmsEnterpriseBasicInfoResult">
|
|
|
|
<include refid="selectBmsEnterpriseBasicInfoVo"/>
|
|
|
|
<where>
|
|
|
|
<if test="enterpriseName != null and enterpriseName != ''"> and enterprise_name like concat('%', #{enterpriseName}, '%')</if>
|
|
|
|
<if test="creditCode != null and creditCode != ''"> and credit_code = #{creditCode}</if>
|
|
|
|
<if test="isDeleted != null "> and is_deleted = #{isDeleted}</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<select id="selectBmsEnterpriseBasicInfoById" parameterType="Long" resultMap="BmsEnterpriseBasicInfoResult">
|
|
|
|
<include refid="selectBmsEnterpriseBasicInfoVo"/>
|
|
|
|
where id = #{id}
|
|
|
|
</select>
|
|
|
|
<select id="workSearch" resultType="com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo">
|
|
|
|
<include refid="selectBmsEnterpriseBasicInfoVo"/>
|
|
|
|
<where>
|
|
|
|
<if test="enterpriseInfo != null and enterpriseInfo != ''">
|
|
|
|
enterprise_name like concat('%', #{enterpriseInfo}, '%')
|
|
|
|
or credit_code like concat('%', #{enterpriseInfo}, '%')
|
|
|
|
</if>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
<insert id="insertBmsEnterpriseBasicInfo" parameterType="com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo">
|
|
|
|
insert into bms_enterprise_basic_info
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="id != null">id,</if>
|
|
|
|
<if test="enterpriseName != null">enterprise_name,</if>
|
|
|
|
<if test="creditCode != null">credit_code,</if>
|
|
|
|
<if test="isDeleted != null">is_deleted,</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>
|
|
|
|
<if test="legalEntity != null">legal_entity,</if>
|
|
|
|
<if test="businessStatus != null">business_status,</if>
|
|
|
|
<if test="establishDate != null">establish_date,</if>
|
|
|
|
<if test="registeredCapital != null">registered_capital,</if>
|
|
|
|
<if test="enterpriseType != null">enterprise_type,</if>
|
|
|
|
<if test="industry != null">industry,</if>
|
|
|
|
<if test="institutionCode != null">institution_code,</if>
|
|
|
|
<if test="visitorsNum != null">visitors_num,</if>
|
|
|
|
<if test="formerName != null">former_name,</if>
|
|
|
|
<if test="enrollAddress != null">enroll_address,</if>
|
|
|
|
<if test="enrollType != null">enroll_type,</if>
|
|
|
|
<if test="business != null">business,</if>
|
|
|
|
|
|
|
|
</trim>
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
<if test="id != null">#{id},</if>
|
|
|
|
<if test="enterpriseName != null">#{enterpriseName},</if>
|
|
|
|
<if test="creditCode != null">#{creditCode},</if>
|
|
|
|
<if test="isDeleted != null">#{isDeleted},</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>
|
|
|
|
<if test="legalEntity != null">#{legalEntity},</if>
|
|
|
|
<if test="businessStatus != null">#{businessStatus},</if>
|
|
|
|
<if test="establishDate != null">#{establishDate},</if>
|
|
|
|
<if test="registeredCapital != null">#{registeredCapital},</if>
|
|
|
|
<if test="enterpriseType != null">#{enterpriseType},</if>
|
|
|
|
<if test="industry != null">#{industry},</if>
|
|
|
|
<if test="institutionCode != null">#{institutionCode},</if>
|
|
|
|
<if test="visitorsNum != null">#{visitorsNum},</if>
|
|
|
|
<if test="formerName != null">#{formerName},</if>
|
|
|
|
<if test="enrollAddress != null">#{enrollAddress},</if>
|
|
|
|
<if test="enrollType != null">#{enrollType},</if>
|
|
|
|
<if test="business != null">#{business},</if>
|
|
|
|
</trim>
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
<update id="updateBmsEnterpriseBasicInfo" parameterType="com.ruoyi.jjh.declaration.entity.BmsEnterpriseBasicInfo">
|
|
|
|
update bms_enterprise_basic_info
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
<if test="enterpriseName != null">enterprise_name = #{enterpriseName},</if>
|
|
|
|
<if test="creditCode != null">credit_code = #{creditCode},</if>
|
|
|
|
<if test="isDeleted != null">is_deleted = #{isDeleted},</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>
|
|
|
|
|
|
|
|
<if test="legalEntity != null">legal_entity = #{legalEntity},</if>
|
|
|
|
<if test="businessStatus != null">business_status = #{businessStatus},</if>
|
|
|
|
<if test="establishDate != null">establish_date = #{establishDate},</if>
|
|
|
|
<if test="registeredCapital != null">registered_capital = #{registeredCapital},</if>
|
|
|
|
<if test="enterpriseType != null">enterprise_type = #{enterpriseType},</if>
|
|
|
|
<if test="industry != null">industry = #{industry},</if>
|
|
|
|
<if test="institutionCode != null"> institution_code = #{institutionCode},</if>
|
|
|
|
<if test="visitorsNum != null">visitors_num = #{visitorsNum},</if>
|
|
|
|
<if test="formerName != null">former_name = #{formerName},</if>
|
|
|
|
<if test="enrollAddress != null">enroll_address = #{enrollAddress},</if>
|
|
|
|
<if test="enrollType != null">enroll_type = #{enrollType},</if>
|
|
|
|
<if test="business != null">business = #{business},</if>
|
|
|
|
</trim>
|
|
|
|
where id = #{id}
|
|
|
|
</update>
|
|
|
|
|
|
|
|
<delete id="deleteBmsEnterpriseBasicInfoById" parameterType="Long">
|
|
|
|
delete
|
|
|
|
from bms_enterprise_basic_info
|
|
|
|
where id = #{id}
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteBmsEnterpriseBasicInfoByIds" parameterType="String">
|
|
|
|
delete from bms_enterprise_basic_info where id in
|
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
|
#{id}
|
|
|
|
</foreach>
|
|
|
|
</delete>
|
|
|
|
</mapper>
|