@@ -9,16 +9,17 @@
<result property="name" column="name" />
<result property="shows" column="shows" />
<result property="application" column="application" />
+
</resultMap>
<select id="selectSysDeptVo" resultMap="DepartmentResult">
select id,name, shows, application from jnb_department_configuration
<where>
<if test="name != null and name !=''">
- AND name LIKE '%' #{name} '%'
+ AND name LIKE concat('%', #{name}, '%')
</if>
<if test="application != null and application !=''">
- AND application LIKE '%' #{application} '%'
+ AND application LIKE concat('%', #{application}, '%')
</where>
</select>
@@ -21,11 +21,12 @@
<select id="selectSysMatterVo" resultMap="MatterResult">
select id,title, type, department,operation,address,phone,picture,examine ,content from jnb_list_of_matters
<if test="title != null and title !=''">
- AND title LIKE '%' #{title} '%'
+ AND title LIKE concat('%', #{title}, '%')
<if test="examine != null and examine !=''">
- AND examine LIKE '%' #{examine} '%'
+ AND examine LIKE concat('%', #{examine}, '%')
<if test="department != null and department !=''">
AND department = #{department}