1、替换CONCAT函数,兼容海量数据库语法
This commit is contained in:
@@ -53,8 +53,6 @@ public interface SimulationNodeMapper extends BaseMapper<SimulationNode> {
|
||||
|
||||
List<SpdmNodeMemberVo> getNodeMemberListByNodeIdList(@Param("nodeIdList") List<String> nodeIdList);
|
||||
|
||||
SpdmNodeDetailVo getNodeDetail(@Param("projectNodeId") String projectNodeId,@Param("tenantId") String tenantId);
|
||||
|
||||
List<ProjectNodePo> allList(@Param("nodeIdList") List<String> deleteNodeList);
|
||||
|
||||
void deleteTaskBatch(List<String> deleteNodeIdList);
|
||||
|
||||
@@ -114,7 +114,8 @@
|
||||
<select id="getDemandList" resultType="com.sdm.project.model.vo.SpdmDemandVo">
|
||||
select * from simulation_demand where tenant_id = #{tenantId}
|
||||
<if test="req.demandName != null and req.demandName != ''">
|
||||
and demand_name like CONCAT('%',#{req.demandName},'%')
|
||||
<bind name="searchKey1" value="'%' + req.demandName + '%'"/>
|
||||
and demand_name like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.projectId != null and req.projectId != ''">
|
||||
and project_id = #{req.projectId}
|
||||
|
||||
@@ -239,13 +239,16 @@
|
||||
and sn.exe_status = #{exeStatus}
|
||||
</if>
|
||||
<if test="nodeCode != null and nodeCode != ''">
|
||||
and sn.nodeCode like CONCAT('%',#{nodeCode},'%')
|
||||
<bind name="searchKey1" value="'%' + nodeCode + '%'"/>
|
||||
and sn.nodeCode like #{searchKey1}
|
||||
</if>
|
||||
<if test="manager != null and manager != ''">
|
||||
and snm.name like CONCAT('%',#{manager},'%')
|
||||
<bind name="searchKey2" value="'%' + manager + '%'"/>
|
||||
and snm.name like #{searchKey2}
|
||||
</if>
|
||||
<if test="nodeName != null and nodeName != ''">
|
||||
and sn.nodeName like CONCAT('%',#{nodeName},'%')
|
||||
<bind name="searchKey3" value="'%' + nodeName + '%'"/>
|
||||
and sn.nodeName like #{searchKey3}
|
||||
</if>
|
||||
order by create_time desc
|
||||
limit #{pos},#{limit}
|
||||
@@ -265,13 +268,16 @@
|
||||
and sn.exe_status = #{exeStatus}
|
||||
</if>
|
||||
<if test="nodeCode != null and nodeCode != ''">
|
||||
and sn.nodeCode like CONCAT('%',#{nodeCode},'%')
|
||||
<bind name="searchKey1" value="'%' + nodeCode + '%'"/>
|
||||
and sn.nodeCode like #{searchKey1}
|
||||
</if>
|
||||
<if test="manager != null and manager != ''">
|
||||
and snm.name like CONCAT('%',#{manager},'%')
|
||||
<bind name="searchKey2" value="'%' + manager + '%'"/>
|
||||
and snm.name like #{searchKey2}
|
||||
</if>
|
||||
<if test="nodeName != null and nodeName != ''">
|
||||
and sn.nodeName like CONCAT('%',#{nodeName},'%')
|
||||
<bind name="searchKey3" value="'%' + nodeName + '%'"/>
|
||||
and sn.nodeName like #{searchKey3}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
@@ -288,16 +294,6 @@
|
||||
)
|
||||
</select>
|
||||
|
||||
<select id="getNodeDetail" resultType="com.sdm.project.model.vo.SpdmNodeDetailVo">
|
||||
select *,
|
||||
GROUP_CONCAT(snm.name ORDER BY snm.name SEPARATOR ',') AS managers
|
||||
from simulation_node sn
|
||||
LEFT JOIN simulation_node_member snm ON sn.uuid = snm.nodeId
|
||||
where sn.uuid = #{projectNodeId}
|
||||
and sn.tenantId = #{tenantId}
|
||||
GROUP BY sn.uuid limit 0,1
|
||||
</select>
|
||||
|
||||
<select id="allList" resultType="com.sdm.project.model.po.ProjectNodePo">
|
||||
select * from simulation_node
|
||||
where uuid in (
|
||||
|
||||
@@ -579,7 +579,8 @@
|
||||
]]>
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and nodeName like CONCAT('%',#{name},'%')
|
||||
<bind name="searchKey" value="'%' + name+ '%'"/>
|
||||
and nodeName #{searchKey}
|
||||
</if>
|
||||
order by createTime desc
|
||||
</select>
|
||||
@@ -609,7 +610,8 @@
|
||||
]]>
|
||||
</if>
|
||||
<if test="name != null and name != ''">
|
||||
and runName like CONCAT('%',#{name},'%')
|
||||
<bind name="searchKey" value="'%' + name + '%'"/>
|
||||
and runName like #{searchKey}
|
||||
</if>
|
||||
order by createTime desc
|
||||
</select>
|
||||
@@ -654,34 +656,44 @@
|
||||
select * from simulation_task
|
||||
<where>
|
||||
<if test="req.tag1 != null and req.tag1 != ''">
|
||||
tag1 like CONCAT('%',#{req.tag1},'%')
|
||||
<bind name="searchKey1" value="'%' + req.tag1 + '%'"/>
|
||||
tag1 like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.tag2 != null and req.tag2 != ''">
|
||||
and tag2 like CONCAT('%',#{req.tag2},'%')
|
||||
<bind name="searchKey2" value="'%' + req.tag2 + '%'"/>
|
||||
and tag2 like #{searchKey2}
|
||||
</if>
|
||||
<if test="req.tag3 != null and req.tag3 != ''">
|
||||
and tag3 like CONCAT('%',#{req.tag3},'%')
|
||||
<bind name="searchKey3" value="'%' + req.tag3 + '%'"/>
|
||||
and tag3 like #{searchKey3}
|
||||
</if>
|
||||
<if test="req.tag4 != null and req.tag4 != ''">
|
||||
and tag4 like CONCAT('%',#{req.tag4},'%')
|
||||
<bind name="searchKey4" value="'%' + req.tag4 + '%'"/>
|
||||
and tag4 like #{searchKey4}
|
||||
</if>
|
||||
<if test="req.tag5 != null and req.tag5 != ''">
|
||||
and tag5 like CONCAT('%',#{req.tag5},'%')
|
||||
<bind name="searchKey5" value="'%' + req.tag5 + '%'"/>
|
||||
and tag5 like #{searchKey5}
|
||||
</if>
|
||||
<if test="req.tag6 != null and req.tag6 != ''">
|
||||
and tag6 like CONCAT('%',#{req.tag6},'%')
|
||||
<bind name="searchKey6" value="'%' + req.tag6 + '%'"/>
|
||||
and tag6 like #{searchKey6}
|
||||
</if>
|
||||
<if test="req.tag7 != null and req.tag7 != ''">
|
||||
and tag7 like CONCAT('%',#{req.tag7},'%')
|
||||
<bind name="searchKey7" value="'%' + req.tag7 + '%'"/>
|
||||
and tag7 like #{searchKey7}
|
||||
</if>
|
||||
<if test="req.tag8 != null and req.tag8 != ''">
|
||||
and tag8 like CONCAT('%',#{req.tag8},'%')
|
||||
<bind name="searchKey8" value="'%' + req.tag8 + '%'"/>
|
||||
and tag8 like #{searchKey8}
|
||||
</if>
|
||||
<if test="req.tag9 != null and req.tag9 != ''">
|
||||
and tag9 like CONCAT('%',#{req.tag9},'%')
|
||||
<bind name="searchKey9" value="'%' + req.tag9 + '%'"/>
|
||||
and tag9 like #{searchKey9}
|
||||
</if>
|
||||
<if test="req.tag10 != null and req.tag10 != ''">
|
||||
and tag10 like CONCAT('%',#{req.tag10},'%')
|
||||
<bind name="searchKey10" value="'%' + req.tag10 + '%'"/>
|
||||
and tag10 like #{searchKey10}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -56,7 +56,8 @@
|
||||
and demand_id = #{req.demandId}
|
||||
</if>
|
||||
<if test="req.taskName != null and req.taskName != ''">
|
||||
and task_name like CONCAT('%',#{req.taskName},'%')
|
||||
<bind name="searchKey" value="'%' + req.taskName + '%'"/>
|
||||
and task_name like #{searchKey}
|
||||
</if>
|
||||
<if test="req.progress != null and req.progress != ''">
|
||||
and progress = #{req.progress}
|
||||
@@ -194,10 +195,12 @@
|
||||
)
|
||||
</if>
|
||||
<if test="req.taskName != null and req.taskName != ''">
|
||||
and task_name like CONCAT('%',#{req.taskName},'%')
|
||||
<bind name="searchKey1" value="'%' + req.taskName + '%'"/>
|
||||
and task_name like #{searchKey}
|
||||
</if>
|
||||
<if test="req.name != null and req.name != ''">
|
||||
and task_name like CONCAT('%',#{req.name},'%')
|
||||
<bind name="searchKey2" value="'%' + req.name + '%'"/>
|
||||
and task_name like #{searchKey2}
|
||||
</if>
|
||||
<if test="req.beginTime != null and req.beginTime != ''">
|
||||
<![CDATA[
|
||||
@@ -250,34 +253,44 @@
|
||||
and node.nodeName is not null and node.nodeName != ''
|
||||
and task.exe_status is not null
|
||||
<if test="req.tag1 != null and req.tag1 !='' ">
|
||||
and task.tag1 like CONCAT('%',#{req.tag1},'%')
|
||||
<bind name="searchKey1" value="'%' + req.tag1 + '%'"/>
|
||||
and task.tag1 like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.tag2 != null and req.tag2 !='' ">
|
||||
and task.tag2 like CONCAT('%',#{req.tag2},'%')
|
||||
<bind name="searchKey2" value="'%' + req.tag2 + '%'"/>
|
||||
and task.tag2 like #{searchKey2}
|
||||
</if>
|
||||
<if test="req.tag3 != null and req.tag3 !='' ">
|
||||
and task.tag3 like CONCAT('%',#{req.tag3},'%')
|
||||
<bind name="searchKey3" value="'%' + req.tag3 + '%'"/>
|
||||
and task.tag3 like #{searchKey3}
|
||||
</if>
|
||||
<if test="req.tag4 != null and req.tag4 !='' ">
|
||||
and task.tag4 like CONCAT('%',#{req.tag4},'%')
|
||||
<bind name="searchKey4" value="'%' + req.tag4 + '%'"/>
|
||||
and task.tag4 like #{searchKey4}
|
||||
</if>
|
||||
<if test="req.tag5 != null and req.tag5 !='' ">
|
||||
and task.tag5 like CONCAT('%',#{req.tag5},'%')
|
||||
<bind name="searchKey5" value="'%' + req.tag5 + '%'"/>
|
||||
and task.tag5 like #{searchKey5}
|
||||
</if>
|
||||
<if test="req.tag6 != null and req.tag6 !='' ">
|
||||
and task.tag6 like CONCAT('%',#{req.tag6},'%')
|
||||
<bind name="searchKey6" value="'%' + req.tag6 + '%'"/>
|
||||
and task.tag6 like #{searchKey6}
|
||||
</if>
|
||||
<if test="req.tag7 != null and req.tag7 !='' ">
|
||||
and task.tag7 like CONCAT('%',#{req.tag7},'%')
|
||||
<bind name="searchKey7" value="'%' + req.tag7 + '%'"/>
|
||||
and task.tag7 like #{searchKey7}
|
||||
</if>
|
||||
<if test="req.tag8 != null and req.tag8 !='' ">
|
||||
and task.tag8 like CONCAT('%',#{req.tag8},'%')
|
||||
<bind name="searchKey8" value="'%' + req.tag8 + '%'"/>
|
||||
and task.tag8 like #{searchKey8}
|
||||
</if>
|
||||
<if test="req.tag9 != null and req.tag9 !='' ">
|
||||
and task.tag9 like CONCAT('%',#{req.tag9},'%')
|
||||
<bind name="searchKey9" value="'%' + req.tag9 + '%'"/>
|
||||
and task.tag9 like #{searchKey9}
|
||||
</if>
|
||||
<if test="req.tag10 != null and req.tag10 !='' ">
|
||||
and task.tag10 like CONCAT('%',#{req.tag10},'%')
|
||||
<bind name="searchKey10" value="'%' + req.tag10 + '%'"/>
|
||||
and task.tag10 like #{searchKey10}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
@@ -296,34 +309,44 @@
|
||||
and
|
||||
performance.completeStatus is not null
|
||||
<if test="req.tag1 != null and req.tag1 !='' ">
|
||||
and task.tag1 like CONCAT('%',#{req.tag1},'%')
|
||||
<bind name="searchKey1" value="'%' + req.tag1 + '%'"/>
|
||||
and task.tag1 like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.tag2 != null and req.tag2 !='' ">
|
||||
and task.tag2 like CONCAT('%',#{req.tag2},'%')
|
||||
<bind name="searchKey2" value="'%' + req.tag2 + '%'"/>
|
||||
and task.tag2 like #{searchKey2}
|
||||
</if>
|
||||
<if test="req.tag3 != null and req.tag3 !='' ">
|
||||
and task.tag3 like CONCAT('%',#{req.tag3},'%')
|
||||
<bind name="searchKey3" value="'%' + req.tag3 + '%'"/>
|
||||
and task.tag3 like #{searchKey3}
|
||||
</if>
|
||||
<if test="req.tag4 != null and req.tag4 !='' ">
|
||||
and task.tag4 like CONCAT('%',#{req.tag4},'%')
|
||||
<bind name="searchKey4" value="'%' + req.tag4 + '%'"/>
|
||||
and task.tag4 like #{searchKey4}
|
||||
</if>
|
||||
<if test="req.tag5 != null and req.tag5 !='' ">
|
||||
and task.tag5 like CONCAT('%',#{req.tag5},'%')
|
||||
<bind name="searchKey5" value="'%' + req.tag5 + '%'"/>
|
||||
and task.tag5 like #{searchKey5}
|
||||
</if>
|
||||
<if test="req.tag6 != null and req.tag6 !='' ">
|
||||
and task.tag6 like CONCAT('%',#{req.tag6},'%')
|
||||
<bind name="searchKey6" value="'%' + req.tag6 + '%'"/>
|
||||
and task.tag6 like #{searchKey6}
|
||||
</if>
|
||||
<if test="req.tag7 != null and req.tag7 !='' ">
|
||||
and task.tag7 like CONCAT('%',#{req.tag7},'%')
|
||||
<bind name="searchKey7" value="'%' + req.tag7 + '%'"/>
|
||||
and task.tag7 like #{searchKey7}
|
||||
</if>
|
||||
<if test="req.tag8 != null and req.tag8 !='' ">
|
||||
and task.tag8 like CONCAT('%',#{req.tag8},'%')
|
||||
<bind name="searchKey8" value="'%' + req.tag8 + '%'"/>
|
||||
and task.tag8 like #{searchKey8}
|
||||
</if>
|
||||
<if test="req.tag9 != null and req.tag9 !='' ">
|
||||
and task.tag9 like CONCAT('%',#{req.tag9},'%')
|
||||
<bind name="searchKey9" value="'%' + req.tag9 + '%'"/>
|
||||
and task.tag9 like #{searchKey9}
|
||||
</if>
|
||||
<if test="req.tag10 != null and req.tag10 !='' ">
|
||||
and task.tag10 like CONCAT('%',#{req.tag10},'%')
|
||||
<bind name="searchKey10" value="'%' + req.tag10 + '%'"/>
|
||||
and task.tag10 like #{searchKey10}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
@@ -380,34 +403,44 @@
|
||||
<where>
|
||||
task.exe_status is not null
|
||||
<if test="req.tag1 != null and req.tag1 !='' ">
|
||||
and task.tag1 like CONCAT('%',#{req.tag1},'%')
|
||||
<bind name="searchKey1" value="'%' + req.tag1 + '%'"/>
|
||||
and task.tag1 like #{searchKey1}
|
||||
</if>
|
||||
<if test="req.tag2 != null and req.tag2 !='' ">
|
||||
and task.tag2 like CONCAT('%',#{req.tag2},'%')
|
||||
<bind name="searchKey2" value="'%' + req.tag2 + '%'"/>
|
||||
and task.tag2 like #{searchKey2}
|
||||
</if>
|
||||
<if test="req.tag3 != null and req.tag3 !='' ">
|
||||
and task.tag3 like CONCAT('%',#{req.tag3},'%')
|
||||
<bind name="searchKey3" value="'%' + req.tag3 + '%'"/>
|
||||
and task.tag3 like #{searchKey3}
|
||||
</if>
|
||||
<if test="req.tag4 != null and req.tag4 !='' ">
|
||||
and task.tag4 like CONCAT('%',#{req.tag4},'%')
|
||||
<bind name="searchKey4" value="'%' + req.tag4 + '%'"/>
|
||||
and task.tag4 like #{searchKey4}
|
||||
</if>
|
||||
<if test="req.tag5 != null and req.tag5 !='' ">
|
||||
and task.tag5 like CONCAT('%',#{req.tag5},'%')
|
||||
<bind name="searchKey5" value="'%' + req.tag5 + '%'"/>
|
||||
and task.tag5 like #{searchKey5}
|
||||
</if>
|
||||
<if test="req.tag6 != null and req.tag6 !='' ">
|
||||
and task.discipline like CONCAT('%',#{req.tag6},'%')
|
||||
<bind name="searchKey6" value="'%' + req.tag6 + '%'"/>
|
||||
and task.discipline like #{searchKey6}
|
||||
</if>
|
||||
<if test="req.tag7 != null and req.tag7 !='' ">
|
||||
and task.tag7 like CONCAT('%',#{req.tag7},'%')
|
||||
<bind name="searchKey7" value="'%' + req.tag7 + '%'"/>
|
||||
and task.tag7 like #{searchKey7}
|
||||
</if>
|
||||
<if test="req.tag8 != null and req.tag8 !='' ">
|
||||
and task.tag8 like CONCAT('%',#{req.tag8},'%')
|
||||
<bind name="searchKey8" value="'%' + req.tag8 + '%'"/>
|
||||
and task.tag8 like #{searchKey8}
|
||||
</if>
|
||||
<if test="req.tag9 != null and req.tag9 !='' ">
|
||||
and task.tag9 like CONCAT('%',#{req.tag9},'%')
|
||||
<bind name="searchKey9" value="'%' + req.tag9 + '%'"/>
|
||||
and task.tag9 like #{searchKey9}
|
||||
</if>
|
||||
<if test="req.tag10 != null and req.tag10 !='' ">
|
||||
and task.tag10 like CONCAT('%',#{req.tag10},'%')
|
||||
<bind name="searchKey10" value="'%' + req.tag10 + '%'"/>
|
||||
and task.tag10 like #{searchKey10}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user