|
|
@@ -9,10 +9,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="companyId" column="company_id" />
|
|
|
<result property="tag" column="tag" />
|
|
|
<result property="createTime" column="create_time" />
|
|
|
+ <result property="companyUserId" column="company_user_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectCompanyTagVo">
|
|
|
- select tag_id, company_id, tag, create_time from company_tag
|
|
|
+ select tag_id, company_id, tag, create_time,company_user_id from company_tag
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectCompanyTagList" parameterType="CompanyTag" resultMap="CompanyTagResult">
|
|
|
@@ -20,6 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
|
<if test="companyId != null "> and company_id = #{companyId}</if>
|
|
|
<if test="tag != null and tag != ''"> and tag = #{tag}</if>
|
|
|
+ <if test="companyUserId != null and companyUserId != ''"> and company_user_id = #{companyUserId}</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
@@ -41,6 +43,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="params.companyId != null">
|
|
|
and ct.company_id = #{params.companyId}
|
|
|
</if>
|
|
|
+ <if test="params.companyUserId != null">
|
|
|
+ and (ct.company_user_id = #{params.companyUserId} or ct.company_user_id is null)
|
|
|
+ </if>
|
|
|
<if test="params.tagName != null">
|
|
|
and ct.tag = #{params.tagName}
|
|
|
</if>
|
|
|
@@ -99,11 +104,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyId != null">company_id,</if>
|
|
|
<if test="tag != null">tag,</if>
|
|
|
<if test="createTime != null">create_time,</if>
|
|
|
+ <if test="companyUserId != null">company_user_id,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="companyId != null">#{companyId},</if>
|
|
|
<if test="tag != null">#{tag},</if>
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="companyUserId != null">#{companyUserId},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -113,6 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="companyId != null">company_id = #{companyId},</if>
|
|
|
<if test="tag != null">tag = #{tag},</if>
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
|
|
|
</trim>
|
|
|
where tag_id = #{tagId}
|
|
|
</update>
|