提交 9dc27b94 作者: ZhangJingKun

bug修改

2796 进行相同人物审核时,库中已有人物应该都带有编码
多标签查询
上级 b964da00
...@@ -59,7 +59,8 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo> ...@@ -59,7 +59,8 @@ public interface CharacterBasicInfoMapper extends BaseMapper<CharacterBasicInfo>
"and b.check_result = 1 " + "and b.check_result = 1 " +
"and a.name = #{name} " + "and a.name = #{name} " +
"and a.id != #{id} " + "and a.id != #{id} " +
"and b.article_id != #{articleId}") "and b.article_id != #{articleId} " +
"and a.uid IS NOT NULL")
List<CharacterVo> getListByName(String id, String name, String articleId); List<CharacterVo> getListByName(String id, String name, String articleId);
@Select("select count(1) " + @Select("select count(1) " +
......
...@@ -28,9 +28,7 @@ ...@@ -28,9 +28,7 @@
AND a.name like '%${name}%' AND a.name like '%${name}%'
</if> </if>
<if test="company != null and company != ''"> <if test="company != null and company != ''">
<foreach item="item" index="index" collection="company" open="AND d.tag_name like '%" separator="," close="%' "> AND b.company like '%${company}%'
${item}
</foreach>
</if> </if>
<if test="duty != null and duty != ''"> <if test="duty != null and duty != ''">
AND b.duty like '%${duty}%' AND b.duty like '%${duty}%'
...@@ -48,7 +46,9 @@ ...@@ -48,7 +46,9 @@
AND b.type_id = #{typeId} AND b.type_id = #{typeId}
</if> </if>
<if test="tagName != null and tagName != ''"> <if test="tagName != null and tagName != ''">
AND d.tag_name like '%${tagName}%' <foreach item="item" index="index" collection="tagName.split(',')">
AND d.tag_name like '%${item}%'
</foreach>
</if> </if>
)t1 )t1
<if test="order != null and order != ''"> <if test="order != null and order != ''">
...@@ -79,9 +79,7 @@ ...@@ -79,9 +79,7 @@
AND a.name like '%${name}%' AND a.name like '%${name}%'
</if> </if>
<if test="company != null and company != ''"> <if test="company != null and company != ''">
<foreach item="item" index="index" collection="company" open="AND d.tag_name like '%" separator="," close="%' "> AND b.company like '%${company}%'
${item}
</foreach>
</if> </if>
<if test="duty != null and duty != ''"> <if test="duty != null and duty != ''">
AND b.duty like '%${duty}%' AND b.duty like '%${duty}%'
...@@ -99,9 +97,10 @@ ...@@ -99,9 +97,10 @@
AND b.type_id = #{typeId} AND b.type_id = #{typeId}
</if> </if>
<if test="tagName != null and tagName != ''"> <if test="tagName != null and tagName != ''">
AND d.tag_name like '%${tagName}%' <foreach item="item" index="index" collection="tagName.split(',')">
AND d.tag_name like '%${item}%'
</foreach>
</if> </if>
</select> </select>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论