|
@@ -5,20 +5,25 @@
|
|
<select id="listPage" resultType="com.zy.bms.pojo.vo.GroupListVo">
|
|
<select id="listPage" resultType="com.zy.bms.pojo.vo.GroupListVo">
|
|
SELECT
|
|
SELECT
|
|
t1.id,
|
|
t1.id,
|
|
|
|
+ t1.code,
|
|
t1.name,
|
|
t1.name,
|
|
t1.remark,
|
|
t1.remark,
|
|
t1.status,
|
|
t1.status,
|
|
t1.create_time,
|
|
t1.create_time,
|
|
- t2.name AS item
|
|
|
|
|
|
+ t2.name AS item,
|
|
|
|
+ t2.id AS itemId
|
|
FROM item_group t1
|
|
FROM item_group t1
|
|
LEFT JOIN item t2 ON t1.item_id = t2.id
|
|
LEFT JOIN item t2 ON t1.item_id = t2.id
|
|
<where>
|
|
<where>
|
|
<if test="io.name != null and io.name != ''">
|
|
<if test="io.name != null and io.name != ''">
|
|
- AND ( t1.id LIKE CONCAT("%",#{io.name},"%")
|
|
|
|
|
|
+ AND ( t1.code LIKE CONCAT("%",#{io.name},"%")
|
|
OR t1.name LIKE CONCAT("%",#{io.name},"%") )
|
|
OR t1.name LIKE CONCAT("%",#{io.name},"%") )
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="io.itemId != null and io.itemId != ''">
|
|
|
|
+ AND t1.item_id = #{io.itemId}
|
|
|
|
+ </if>
|
|
<if test="io.status != null and io.status > -1">
|
|
<if test="io.status != null and io.status > -1">
|
|
- AND (t1.status = #{io.status}
|
|
|
|
|
|
+ AND t1.status = #{io.status}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
ORDER BY t1.create_time DESC
|
|
ORDER BY t1.create_time DESC
|
|
@@ -26,7 +31,7 @@
|
|
|
|
|
|
<select id="getAllList" resultType="com.zy.bms.pojo.vo.GroupListVo">
|
|
<select id="getAllList" resultType="com.zy.bms.pojo.vo.GroupListVo">
|
|
SELECT
|
|
SELECT
|
|
- t1.id,
|
|
|
|
|
|
+ t1.code,
|
|
t1.name,
|
|
t1.name,
|
|
t2.name AS item
|
|
t2.name AS item
|
|
FROM item_group t1
|
|
FROM item_group t1
|