|
@@ -145,6 +145,51 @@
|
|
|
WHERE flow.node_id = #{nodeId} LIMIT 1
|
|
|
</select>
|
|
|
|
|
|
+ <select id="getListSearch" parameterType="com.siwei.apply.domain.vo.ProjectFilterVo" resultMap="projectMap">
|
|
|
+ SELECT *
|
|
|
+ FROM t_project
|
|
|
+ <where>
|
|
|
+ <if test="keyWords != null and keyWords.size() > 0">
|
|
|
+ regexp_like(name,
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , 'i')
|
|
|
+ OR
|
|
|
+ regexp_like(code,
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , 'i')
|
|
|
+ OR
|
|
|
+ regexp_like(company,
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , 'i')
|
|
|
+ </if>
|
|
|
+ <if test="isOnchain != null and isOnchain">
|
|
|
+ AND on_chain_num > 0
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ ORDER BY updated_at DESC
|
|
|
+ LIMIT #{pageSize} offset #{offset}
|
|
|
+ </select>
|
|
|
|
|
|
-
|
|
|
+ <select id="getSearchCount" parameterType="com.siwei.apply.domain.vo.ProjectFilterVo" resultType="int">
|
|
|
+ SELECT COUNT(*)
|
|
|
+ FROM t_project
|
|
|
+ <where>
|
|
|
+ <if test="keyWords != null and keyWords.size() > 0">
|
|
|
+ regexp_like(name,
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , 'i')
|
|
|
+ OR
|
|
|
+ regexp_like(code,
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , 'i')
|
|
|
+ OR
|
|
|
+ regexp_like(company,
|
|
|
+ <foreach collection="keyWords" item="word" open="'(" separator="|" close=")'" >${word}</foreach>
|
|
|
+ , 'i')
|
|
|
+ </if>
|
|
|
+ <if test="isOnchain != null and isOnchain">
|
|
|
+ AND on_chain_num > 0
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|