|
|
@@ -42,9 +42,14 @@
|
|
42
|
42
|
<select id="selectByName" resultMap="BaseResultMap" >
|
|
43
|
43
|
select *
|
|
44
|
44
|
from t_maint_transport
|
|
45
|
|
- where name like concat('%',#{param1,jdbcType=VARCHAR},'%')
|
|
46
|
|
- and belong_id = #{param2,jdbcType=VARCHAR}
|
|
47
|
|
- and ifnull(cancel_flag,'0') = '0'
|
|
|
45
|
+ where
|
|
|
46
|
+ ifnull(cancel_flag,'0') = '0'
|
|
|
47
|
+ <if test="param2!=null and param2!=''">
|
|
|
48
|
+ and belong_id = #{param2,jdbcType=VARCHAR}
|
|
|
49
|
+ </if>
|
|
|
50
|
+ <if test="param1!=null and param1!= ''">
|
|
|
51
|
+ and name like concat('%',#{param1,jdbcType=VARCHAR},'%')
|
|
|
52
|
+ </if>
|
|
48
|
53
|
</select>
|
|
49
|
54
|
|
|
50
|
55
|
|