|
@@ -65,7 +65,7 @@
|
|
<select id="getPageListByObj" parameterType="BStandardMat" resultMap="BaseResultMap">
|
|
<select id="getPageListByObj" parameterType="BStandardMat" resultMap="BaseResultMap">
|
|
SELECT s_id,s_mat_code,s_mat_name,s_mat_class,s_mat_type
|
|
SELECT s_id,s_mat_code,s_mat_name,s_mat_class,s_mat_type
|
|
from b_standard_mat
|
|
from b_standard_mat
|
|
- <where>
|
|
|
|
|
|
+ where
|
|
1=1
|
|
1=1
|
|
<if test=" sMatName != null and sMatName!='' and sMatCode != null and sMatCode!='' ">
|
|
<if test=" sMatName != null and sMatName!='' and sMatCode != null and sMatCode!='' ">
|
|
and (s_mat_name like CONCAT('%',trim(#{sMatName}),'%') or s_mat_code like CONCAT('%',trim(#{sMatCode}),'%'))
|
|
and (s_mat_name like CONCAT('%',trim(#{sMatName}),'%') or s_mat_code like CONCAT('%',trim(#{sMatCode}),'%'))
|
|
@@ -76,10 +76,13 @@
|
|
<if test=" (sMatName == null or sMatName=='') and (sMatCode != null and sMatCode!='') ">
|
|
<if test=" (sMatName == null or sMatName=='') and (sMatCode != null and sMatCode!='') ">
|
|
and s_mat_code like CONCAT('%',trim(#{sMatCode}),'%')
|
|
and s_mat_code like CONCAT('%',trim(#{sMatCode}),'%')
|
|
</if>
|
|
</if>
|
|
- <if test=" sMatType == null or sMatType=='' ">
|
|
|
|
- and s_mat_type = #{sMatCode}
|
|
|
|
|
|
+ <if test=" sMatType != null and sMatType !='' ">
|
|
|
|
+ and s_mat_type = #{sMatType}
|
|
</if>
|
|
</if>
|
|
- </where>
|
|
|
|
|
|
+ <if test=" keyWord != null and keyWord !='' ">
|
|
|
|
+ and (s_mat_name like CONCAT('%',trim(#{keyWord}),'%') or s_mat_code like CONCAT('%',trim(#{keyWord}),'%'))
|
|
|
|
+ </if>
|
|
|
|
+
|
|
</select>
|
|
</select>
|
|
|
|
|
|
</mapper>
|
|
</mapper>
|