|
@@ -0,0 +1,158 @@
|
|
|
+<?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.tool.mapper.TEnterpriseCompanyMapper">
|
|
|
+
|
|
|
+ <resultMap type="TEnterpriseCompany" id="TEnterpriseCompanyResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="agentid" column="agentid" />
|
|
|
+ <result property="name" column="name" />
|
|
|
+ <result property="logoUrl" column="logo_url" />
|
|
|
+ <result property="description" column="description" />
|
|
|
+ <result property="close" column="close" />
|
|
|
+ <result property="corpid" column="corpid" />
|
|
|
+ <result property="inviteCode" column="invite_code" />
|
|
|
+ <result property="industry" column="industry" />
|
|
|
+ <result property="corpName" column="corp_name" />
|
|
|
+ <result property="licenseCode" column="license_code" />
|
|
|
+ <result property="authChannel" column="auth_channel" />
|
|
|
+ <result property="authChannelType" column="auth_channel_type" />
|
|
|
+ <result property="isAuthenticated" column="is_authenticated" />
|
|
|
+ <result property="authLevel" column="auth_level" />
|
|
|
+ <result property="inviteUrl" column="invite_url" />
|
|
|
+ <result property="corpLogoUrl" column="corp_logo_url" />
|
|
|
+ <result property="mark" column="mark" />
|
|
|
+ <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" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <sql id="selectTEnterpriseCompanyVo">
|
|
|
+ select id, agentid, name, logo_url, description, close, corpid, invite_code, industry, corp_name, license_code, auth_channel, auth_channel_type, is_authenticated, auth_level, invite_url, corp_logo_url, mark, del_flag, create_by, create_time, update_by, update_time from t_enterprise_company
|
|
|
+ </sql>
|
|
|
+
|
|
|
+ <select id="selectTEnterpriseCompanyList" parameterType="TEnterpriseCompany" resultMap="TEnterpriseCompanyResult">
|
|
|
+ <include refid="selectTEnterpriseCompanyVo"/>
|
|
|
+ <where>
|
|
|
+ <if test="agentid != null and agentid != ''"> and agentid = #{agentid}</if>
|
|
|
+ <if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
+ <if test="logoUrl != null and logoUrl != ''"> and logo_url = #{logoUrl}</if>
|
|
|
+ <if test="description != null and description != ''"> and description = #{description}</if>
|
|
|
+ <if test="close != null and close != ''"> and close = #{close}</if>
|
|
|
+ <if test="corpid != null and corpid != ''"> and corpid = #{corpid}</if>
|
|
|
+ <if test="inviteCode != null and inviteCode != ''"> and invite_code = #{inviteCode}</if>
|
|
|
+ <if test="industry != null and industry != ''"> and industry = #{industry}</if>
|
|
|
+ <if test="corpName != null and corpName != ''"> and corp_name like concat('%', #{corpName}, '%')</if>
|
|
|
+ <if test="licenseCode != null and licenseCode != ''"> and license_code = #{licenseCode}</if>
|
|
|
+ <if test="authChannel != null and authChannel != ''"> and auth_channel = #{authChannel}</if>
|
|
|
+ <if test="authChannelType != null and authChannelType != ''"> and auth_channel_type = #{authChannelType}</if>
|
|
|
+ <if test="isAuthenticated != null and isAuthenticated != ''"> and is_authenticated = #{isAuthenticated}</if>
|
|
|
+ <if test="authLevel != null and authLevel != ''"> and auth_level = #{authLevel}</if>
|
|
|
+ <if test="inviteUrl != null and inviteUrl != ''"> and invite_url = #{inviteUrl}</if>
|
|
|
+ <if test="corpLogoUrl != null and corpLogoUrl != ''"> and corp_logo_url = #{corpLogoUrl}</if>
|
|
|
+ <if test="mark != null and mark != ''"> and mark = #{mark}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <select id="selectTEnterpriseCompanyById" parameterType="String" resultMap="TEnterpriseCompanyResult">
|
|
|
+ <include refid="selectTEnterpriseCompanyVo"/>
|
|
|
+ where id = #{id}
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <insert id="insertTEnterpriseCompany" parameterType="TEnterpriseCompany">
|
|
|
+ insert into t_enterprise_company
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">id,</if>
|
|
|
+ <if test="agentid != null">agentid,</if>
|
|
|
+ <if test="name != null">name,</if>
|
|
|
+ <if test="logoUrl != null">logo_url,</if>
|
|
|
+ <if test="description != null">description,</if>
|
|
|
+ <if test="close != null">close,</if>
|
|
|
+ <if test="corpid != null">corpid,</if>
|
|
|
+ <if test="inviteCode != null">invite_code,</if>
|
|
|
+ <if test="industry != null">industry,</if>
|
|
|
+ <if test="corpName != null">corp_name,</if>
|
|
|
+ <if test="licenseCode != null">license_code,</if>
|
|
|
+ <if test="authChannel != null">auth_channel,</if>
|
|
|
+ <if test="authChannelType != null">auth_channel_type,</if>
|
|
|
+ <if test="isAuthenticated != null">is_authenticated,</if>
|
|
|
+ <if test="authLevel != null">auth_level,</if>
|
|
|
+ <if test="inviteUrl != null">invite_url,</if>
|
|
|
+ <if test="corpLogoUrl != null">corp_logo_url,</if>
|
|
|
+ <if test="mark != null">mark,</if>
|
|
|
+ <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>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="id != null">#{id},</if>
|
|
|
+ <if test="agentid != null">#{agentid},</if>
|
|
|
+ <if test="name != null">#{name},</if>
|
|
|
+ <if test="logoUrl != null">#{logoUrl},</if>
|
|
|
+ <if test="description != null">#{description},</if>
|
|
|
+ <if test="close != null">#{close},</if>
|
|
|
+ <if test="corpid != null">#{corpid},</if>
|
|
|
+ <if test="inviteCode != null">#{inviteCode},</if>
|
|
|
+ <if test="industry != null">#{industry},</if>
|
|
|
+ <if test="corpName != null">#{corpName},</if>
|
|
|
+ <if test="licenseCode != null">#{licenseCode},</if>
|
|
|
+ <if test="authChannel != null">#{authChannel},</if>
|
|
|
+ <if test="authChannelType != null">#{authChannelType},</if>
|
|
|
+ <if test="isAuthenticated != null">#{isAuthenticated},</if>
|
|
|
+ <if test="authLevel != null">#{authLevel},</if>
|
|
|
+ <if test="inviteUrl != null">#{inviteUrl},</if>
|
|
|
+ <if test="corpLogoUrl != null">#{corpLogoUrl},</if>
|
|
|
+ <if test="mark != null">#{mark},</if>
|
|
|
+ <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>
|
|
|
+ </trim>
|
|
|
+ </insert>
|
|
|
+
|
|
|
+ <update id="updateTEnterpriseCompany" parameterType="TEnterpriseCompany">
|
|
|
+ update t_enterprise_company
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="agentid != null">agentid = #{agentid},</if>
|
|
|
+ <if test="name != null">name = #{name},</if>
|
|
|
+ <if test="logoUrl != null">logo_url = #{logoUrl},</if>
|
|
|
+ <if test="description != null">description = #{description},</if>
|
|
|
+ <if test="close != null">close = #{close},</if>
|
|
|
+ <if test="corpid != null">corpid = #{corpid},</if>
|
|
|
+ <if test="inviteCode != null">invite_code = #{inviteCode},</if>
|
|
|
+ <if test="industry != null">industry = #{industry},</if>
|
|
|
+ <if test="corpName != null">corp_name = #{corpName},</if>
|
|
|
+ <if test="licenseCode != null">license_code = #{licenseCode},</if>
|
|
|
+ <if test="authChannel != null">auth_channel = #{authChannel},</if>
|
|
|
+ <if test="authChannelType != null">auth_channel_type = #{authChannelType},</if>
|
|
|
+ <if test="isAuthenticated != null">is_authenticated = #{isAuthenticated},</if>
|
|
|
+ <if test="authLevel != null">auth_level = #{authLevel},</if>
|
|
|
+ <if test="inviteUrl != null">invite_url = #{inviteUrl},</if>
|
|
|
+ <if test="corpLogoUrl != null">corp_logo_url = #{corpLogoUrl},</if>
|
|
|
+ <if test="mark != null">mark = #{mark},</if>
|
|
|
+ <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>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+ </update>
|
|
|
+
|
|
|
+ <delete id="deleteTEnterpriseCompanyById" parameterType="String">
|
|
|
+ delete from t_enterprise_company where id = #{id}
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <delete id="deleteTEnterpriseCompanyByIds" parameterType="String">
|
|
|
+ delete from t_enterprise_company where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+ </delete>
|
|
|
+</mapper>
|