You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
105 lines
5.6 KiB
105 lines
5.6 KiB
1 year ago
|
<?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="contacts" column="contacts" />
|
||
|
<result property="contactsNumber" column="contacts_number" />
|
||
|
<result property="address" column="address" />
|
||
|
<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" />
|
||
|
</resultMap>
|
||
|
|
||
|
<sql id="selectBmsEnterpriseBasicInfoVo">
|
||
|
select id, enterprise_name, credit_code, contacts, contacts_number, address, 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="contacts != null and contacts != ''"> and contacts = #{contacts}</if>
|
||
|
<if test="contactsNumber != null and contactsNumber != ''"> and contacts_number = #{contactsNumber}</if>
|
||
|
<if test="address != null and address != ''"> and address = #{address}</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>
|
||
|
|
||
|
<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="contacts != null">contacts,</if>
|
||
|
<if test="contactsNumber != null">contacts_number,</if>
|
||
|
<if test="address != null">address,</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>
|
||
|
</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="contacts != null">#{contacts},</if>
|
||
|
<if test="contactsNumber != null">#{contactsNumber},</if>
|
||
|
<if test="address != null">#{address},</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>
|
||
|
</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="contacts != null">contacts = #{contacts},</if>
|
||
|
<if test="contactsNumber != null">contacts_number = #{contactsNumber},</if>
|
||
|
<if test="address != null">address = #{address},</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>
|
||
|
</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>
|