| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <?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.dgtly.companyext.mapper.CompanyExtInfoMapper">
-
- <resultMap type="CompanyExtInfo" id="CompanyExtInfoResult">
- <result property="id" column="id" />
- <result property="companyId" column="company_id" />
- <result property="companyName" column="company_name" />
- <result property="companyType" column="company_type" />
- <result property="detailAddress" column="detail_address" />
- <result property="longitude" column="longitude" />
- <result property="latitude" column="latitude" />
- <result property="legalPerson" column="legal_person" />
- <result property="contactNumber" column="contact_number" />
- <result property="establishDate" column="establish_date" />
- <result property="unifiedSocialCreditCode" column="unified_social_credit_code" />
- <result property="businessLicenseUrl" column="business_license_url" />
- <result property="defaultImgUrl" column="default_img_url" />
- <result property="propagandaImgUrl" column="propaganda_img_url" />
- <result property="companyIntroduce" column="company_introduce" />
- <result property="versionNum" column="version_num" />
- <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="selectCompanyExtInfoVo">
- select id, company_id, company_name, company_type, detail_address, longitude, latitude, legal_person, contact_number, establish_date, unified_social_credit_code, business_license_url, default_img_url, propaganda_img_url, company_introduce, version_num, create_by, create_time, update_by, update_time, remark from company_ext_info
- </sql>
- <select id="selectCompanyExtInfoList" parameterType="CompanyExtInfo" resultMap="CompanyExtInfoResult">
- <include refid="selectCompanyExtInfoVo"/>
- <where>
- <if test="companyId != null "> and company_id = #{companyId}</if>
- <if test="companyName != null and companyName != ''"> and company_name like concat('%', #{companyName}, '%')</if>
- <if test="companyType != null "> and company_type = #{companyType}</if>
- <if test="detailAddress != null and detailAddress != ''"> and detail_address = #{detailAddress}</if>
- <if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
- <if test="latitude != null and latitude != ''"> and latitude = #{latitude}</if>
- <if test="legalPerson != null and legalPerson != ''"> and legal_person = #{legalPerson}</if>
- <if test="contactNumber != null and contactNumber != ''"> and contact_number = #{contactNumber}</if>
- <if test="establishDate != null "> and establish_date = #{establishDate}</if>
- <if test="unifiedSocialCreditCode != null and unifiedSocialCreditCode != ''"> and unified_social_credit_code = #{unifiedSocialCreditCode}</if>
- <if test="businessLicenseUrl != null and businessLicenseUrl != ''"> and business_license_url = #{businessLicenseUrl}</if>
- <if test="defaultImgUrl != null and defaultImgUrl != ''"> and default_img_url = #{defaultImgUrl}</if>
- <if test="propagandaImgUrl != null and propagandaImgUrl != ''"> and propaganda_img_url = #{propagandaImgUrl}</if>
- <if test="companyIntroduce != null and companyIntroduce != ''"> and company_introduce = #{companyIntroduce}</if>
- <if test="versionNum != null "> and version_num = #{versionNum}</if>
- </where>
- </select>
-
- <select id="selectCompanyExtInfoById" parameterType="Long" resultMap="CompanyExtInfoResult">
- <include refid="selectCompanyExtInfoVo"/>
- where id = #{id}
- </select>
-
- <insert id="insertCompanyExtInfo" parameterType="CompanyExtInfo" useGeneratedKeys="true" keyProperty="id">
- insert into company_ext_info
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="companyId != null ">company_id,</if>
- <if test="companyName != null and companyName != ''">company_name,</if>
- <if test="companyType != null ">company_type,</if>
- <if test="detailAddress != null and detailAddress != ''">detail_address,</if>
- <if test="longitude != null and longitude != ''">longitude,</if>
- <if test="latitude != null and latitude != ''">latitude,</if>
- <if test="legalPerson != null and legalPerson != ''">legal_person,</if>
- <if test="contactNumber != null and contactNumber != ''">contact_number,</if>
- <if test="establishDate != null ">establish_date,</if>
- <if test="unifiedSocialCreditCode != null and unifiedSocialCreditCode != ''">unified_social_credit_code,</if>
- <if test="businessLicenseUrl != null and businessLicenseUrl != ''">business_license_url,</if>
- <if test="defaultImgUrl != null and defaultImgUrl != ''">default_img_url,</if>
- <if test="propagandaImgUrl != null and propagandaImgUrl != ''">propaganda_img_url,</if>
- <if test="companyIntroduce != null and companyIntroduce != ''">company_introduce,</if>
- <if test="versionNum != null ">version_num,</if>
- <if test="createBy != null and createBy != ''">create_by,</if>
- <if test="createTime != null ">create_time,</if>
- <if test="updateBy != null and updateBy != ''">update_by,</if>
- <if test="updateTime != null ">update_time,</if>
- <if test="remark != null and remark != ''">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="companyId != null ">#{companyId},</if>
- <if test="companyName != null and companyName != ''">#{companyName},</if>
- <if test="companyType != null ">#{companyType},</if>
- <if test="detailAddress != null and detailAddress != ''">#{detailAddress},</if>
- <if test="longitude != null and longitude != ''">#{longitude},</if>
- <if test="latitude != null and latitude != ''">#{latitude},</if>
- <if test="legalPerson != null and legalPerson != ''">#{legalPerson},</if>
- <if test="contactNumber != null and contactNumber != ''">#{contactNumber},</if>
- <if test="establishDate != null ">#{establishDate},</if>
- <if test="unifiedSocialCreditCode != null and unifiedSocialCreditCode != ''">#{unifiedSocialCreditCode},</if>
- <if test="businessLicenseUrl != null and businessLicenseUrl != ''">#{businessLicenseUrl},</if>
- <if test="defaultImgUrl != null and defaultImgUrl != ''">#{defaultImgUrl},</if>
- <if test="propagandaImgUrl != null and propagandaImgUrl != ''">#{propagandaImgUrl},</if>
- <if test="companyIntroduce != null and companyIntroduce != ''">#{companyIntroduce},</if>
- <if test="versionNum != null ">#{versionNum},</if>
- <if test="createBy != null and createBy != ''">#{createBy},</if>
- <if test="createTime != null ">#{createTime},</if>
- <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
- <if test="updateTime != null ">#{updateTime},</if>
- <if test="remark != null and remark != ''">#{remark},</if>
- </trim>
- </insert>
- <update id="updateCompanyExtInfo" parameterType="CompanyExtInfo">
- update company_ext_info
- <trim prefix="SET" suffixOverrides=",">
- <if test="companyId != null ">company_id = #{companyId},</if>
- <if test="companyName != null and companyName != ''">company_name = #{companyName},</if>
- <if test="companyType != null ">company_type = #{companyType},</if>
- <if test="detailAddress != null and detailAddress != ''">detail_address = #{detailAddress},</if>
- <if test="longitude != null and longitude != ''">longitude = #{longitude},</if>
- <if test="latitude != null and latitude != ''">latitude = #{latitude},</if>
- <if test="legalPerson != null and legalPerson != ''">legal_person = #{legalPerson},</if>
- <if test="contactNumber != null and contactNumber != ''">contact_number = #{contactNumber},</if>
- <if test="establishDate != null ">establish_date = #{establishDate},</if>
- <if test="unifiedSocialCreditCode != null and unifiedSocialCreditCode != ''">unified_social_credit_code = #{unifiedSocialCreditCode},</if>
- <if test="businessLicenseUrl != null and businessLicenseUrl != ''">business_license_url = #{businessLicenseUrl},</if>
- <if test="defaultImgUrl != null and defaultImgUrl != ''">default_img_url = #{defaultImgUrl},</if>
- <if test="propagandaImgUrl != null and propagandaImgUrl != ''">propaganda_img_url = #{propagandaImgUrl},</if>
- <if test="companyIntroduce != null and companyIntroduce != ''">company_introduce = #{companyIntroduce},</if>
- <if test="versionNum != null ">version_num = #{versionNum},</if>
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
- <if test="createTime != null ">create_time = #{createTime},</if>
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
- <if test="updateTime != null ">update_time = #{updateTime},</if>
- <if test="remark != null and remark != ''">remark = #{remark},</if>
- </trim>
- where id = #{id}
- </update>
- <delete id="deleteCompanyExtInfoById" parameterType="Long">
- delete from company_ext_info where id = #{id}
- </delete>
- <delete id="deleteCompanyExtInfoByIds" parameterType="String">
- delete from company_ext_info where id in
- <foreach item="id" collection="array" open="(" separator="," close=")">
- #{id}
- </foreach>
- </delete>
-
- </mapper>
|