@@ -155,7 +155,7 @@
</select>
<select id="queryAllUnlink" resultType="cn.tr.module.smart.web.vo.BizDeptUnlinkDocVO">
SELECT
- bmd.id as docId,
+ distinct(bmd.id) as docId,
bmd.type,
bmd.title,
bmd.source,
@@ -170,6 +170,7 @@
LEFT JOIN biz_doc_dept bdd ON bmd.ID = bdd.doc_id
<where>
and bmd.deleted = 0
+ and bmd.title is not null
<if test="query.condition != null and query.condition != ''">
and bmd.title like concat('%',#{query.condition,jdbcType=VARCHAR},'%')
</if>
@@ -34,7 +34,7 @@
<select id="queryAllUnlink" resultType="cn.tr.module.smart.web.vo.BizDeptUnlinkQuestionVO">
- bqg.id as questionGroupId,
+ distinct(bqg.id)as questionGroupId,
bqg.name,
bqg.type,
bqg.interval,
@@ -47,6 +47,7 @@
biz_question_group bqg
LEFT JOIN biz_question_dept bqd ON bqg.ID = bqd.question_group_id
+ and bqg.name is not null
<if test="query.deptId != null and query.deptId != '' ">
AND (bqd.dept_id != #{query.deptId} or bqd.dept_id is null)