mirror of
https://github.com/FatttSnake/Pinnacle-OA.git
synced 2026-04-05 23:11:24 +08:00
The backend provides an interface for fuzzy queries
This commit is contained in:
@@ -20,6 +20,36 @@
|
||||
t_user.deleted = 0;
|
||||
</select>
|
||||
|
||||
<select id="getFuzzyQueriesByAffairTitle" resultMap="affairMap">
|
||||
select
|
||||
*
|
||||
from t_affair
|
||||
<where>
|
||||
<if test=" title!=null and title!='' ">
|
||||
instr(title,#{title})>0
|
||||
</if>
|
||||
<if test=" typeId!=null ">
|
||||
and instr(type_id,#{typeId})>0
|
||||
</if>
|
||||
<if test="status!=null ">
|
||||
and instr(status,#{status})>0
|
||||
</if>
|
||||
<if test="inspectorId!=null">
|
||||
and instr(inspector_id,#{inspectorId})>0
|
||||
</if>
|
||||
<if test="createTime!=null">
|
||||
and create_time >= #{start}
|
||||
</if>
|
||||
<if test="endTime!=null">
|
||||
and create_time < #{end}
|
||||
</if>
|
||||
</where>
|
||||
order by create_time desc
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
|
||||
<resultMap id="userMap" type="user">
|
||||
<id property="id" column="user_id"/>
|
||||
<result property="username" column="user_username"/>
|
||||
@@ -36,4 +66,11 @@
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="affairMap" type="affair" autoMapping="true">
|
||||
<id property="id" column="id"/>
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user