|
@@ -13,6 +13,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
+ <result property="tenantId" column="tenant_id" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectDictTypeVo">
|
|
@@ -32,6 +33,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="dictType != null and dictType != ''">
|
|
|
AND dict_type like concat('%', #{dictType}, '%')
|
|
|
</if>
|
|
|
+ <if test="tenantId != null and tenantId != '' and tenantId !=0">
|
|
|
+ AND tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
<if test="params.beginTime != null and params.beginTime != ''"><!-- 开始时间检索 -->
|
|
|
and date_format(create_time,'%y%m%d') >= date_format(#{params.beginTime},'%y%m%d')
|
|
|
</if>
|
|
@@ -57,7 +61,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<select id="checkDictTypeUnique" parameterType="String" resultMap="SysDictTypeResult">
|
|
|
<include refid="selectDictTypeVo"/>
|
|
|
- where dict_type = #{dictType} limit 1
|
|
|
+ where dict_type = #{dictType}
|
|
|
+ <if test="tenantId != null and tenantId != '' and tenantId !=0">
|
|
|
+ AND tenant_id = #{tenantId}
|
|
|
+ </if>
|
|
|
+ limit 1
|
|
|
</select>
|
|
|
|
|
|
<delete id="deleteDictTypeById" parameterType="Long">
|
|
@@ -91,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null">status,</if>
|
|
|
<if test="remark != null and remark != ''">remark,</if>
|
|
|
<if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
+ <if test="tenantId != null and tenantId != '' and tenantId !=0">tenant_id,</if>
|
|
|
create_time
|
|
|
)values(
|
|
|
<if test="dictName != null and dictName != ''">#{dictName},</if>
|
|
@@ -98,6 +107,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="status != null">#{status},</if>
|
|
|
<if test="remark != null and remark != ''">#{remark},</if>
|
|
|
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
+ <if test="tenantId != null and tenantId != '' and tenantId !=0">#{tenantId},</if>
|
|
|
sysdate()
|
|
|
)
|
|
|
</insert>
|