|
@@ -342,28 +342,28 @@
|
|
|
WHERE
|
|
|
1=1
|
|
|
<choose>
|
|
|
- <when test='null!=param.type and param.type=="id" and null!=param.fromContent and param.fromContent.size()>0'>
|
|
|
- <foreach collection="param.fromContent" open="AND dobj.id IN(" close=")" separator="," item="keyword">
|
|
|
+ <when test='null!=param.type and param.type=="id" and null!=param.slaveContent and param.slaveContent.size()>0'>
|
|
|
+ <foreach collection="param.slaveContent" open="AND dobj.id IN(" close=")" separator="," item="keyword">
|
|
|
#{keyword}
|
|
|
</foreach>
|
|
|
</when>
|
|
|
- <when test='null!=param.type and param.type=="name" and null!=param.fromContent and param.fromContent.size()>0'>
|
|
|
- <foreach collection="param.fromContent" open="AND dobj.name IN(" close=")" separator="," item="keyword">
|
|
|
+ <when test='null!=param.type and param.type=="name" and null!=param.slaveContent and param.slaveContent.size()>0'>
|
|
|
+ <foreach collection="param.slaveContent" open="AND dobj.name IN(" close=")" separator="," item="keyword">
|
|
|
#{keyword}
|
|
|
</foreach>
|
|
|
</when>
|
|
|
- <when test='null!=param.type and param.type=="localId" and null!=param.fromContent and param.fromContent.size()>0'>
|
|
|
- <foreach collection="param.fromContent" open="AND dobj.local_id IN(" close=")" separator="," item="keyword">
|
|
|
+ <when test='null!=param.type and param.type=="localId" and null!=param.slaveContent and param.slaveContent.size()>0'>
|
|
|
+ <foreach collection="param.slaveContent" open="AND dobj.local_id IN(" close=")" separator="," item="keyword">
|
|
|
#{keyword}
|
|
|
</foreach>
|
|
|
</when>
|
|
|
- <when test='null!=param.type and param.type=="localName" and null!=param.fromContent and param.fromContent.size()>0'>
|
|
|
- <foreach collection="param.fromContent" open="AND dobj.local_name IN(" close=")" separator="," item="keyword">
|
|
|
+ <when test='null!=param.type and param.type=="localName" and null!=param.slaveContent and param.slaveContent.size()>0'>
|
|
|
+ <foreach collection="param.slaveContent" open="AND dobj.local_name IN(" close=")" separator="," item="keyword">
|
|
|
#{keyword}
|
|
|
</foreach>
|
|
|
</when>
|
|
|
- <when test='null!=param.type and param.type=="cadId" and null!=param.fromContent and param.fromContent.size()>0'>
|
|
|
- <foreach collection="param.fromContent" open="AND JSON_UNQUOTE(JSON_EXTRACT(dobj.infos, '$.cADID')) IN(" close=")" separator="," item="keyword">
|
|
|
+ <when test='null!=param.type and param.type=="cadId" and null!=param.slaveContent and param.slaveContent.size()>0'>
|
|
|
+ <foreach collection="param.slaveContent" open="AND JSON_UNQUOTE(JSON_EXTRACT(dobj.infos, '$.cADID')) IN(" close=")" separator="," item="keyword">
|
|
|
#{keyword}
|
|
|
</foreach>
|
|
|
</when>
|
|
@@ -452,8 +452,8 @@
|
|
|
) AS dtoA
|
|
|
LEFT JOIN dt_object AS dtoB ON (
|
|
|
JSON_SEARCH( dtoA.objToIds, 'one', dtoB.id ) > 0
|
|
|
- <if test="null!=param.fromContent and param.fromContent.size()>0">
|
|
|
- <foreach collection="param.fromContent" item="keyword" open="AND (" close=")" separator=" OR ">
|
|
|
+ <if test="null!=param.slaveContent and param.slaveContent.size()>0">
|
|
|
+ <foreach collection="param.slaveContent" item="keyword" open="AND (" close=")" separator=" OR ">
|
|
|
dtoB.id = #{keyword}
|
|
|
OR dtoB.`name` LIKE CONCAT( '%', #{keyword}, '%' )
|
|
|
OR dtoB.local_name LIKE CONCAT( '%', #{keyword}, '%' )
|