给商品选择接口增加商品类别的查询条件
This commit is contained in:
@@ -46,6 +46,10 @@
|
||||
ofType="com.jsh.erp.datasource.vo.TreeNode" select="getNextNodeTree"/>
|
||||
</resultMap>
|
||||
|
||||
<resultMap id="ResultCategoryMapList" type="com.jsh.erp.datasource.entities.MaterialCategory">
|
||||
<result column="id" jdbcType="BIGINT" property="id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, name
|
||||
</sql>
|
||||
@@ -123,4 +127,12 @@
|
||||
and ifnull(status,'0') !='2'
|
||||
</select>
|
||||
|
||||
<select id="getListByParentId" resultMap="ResultCategoryMapList">
|
||||
SELECT id FROM jsh_material_category
|
||||
where 1=1
|
||||
<if test="parentId != null and parentId !=''">
|
||||
and parent_id = #{parentId}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -106,6 +106,12 @@
|
||||
<if test="q != null">
|
||||
and (m.name like '%${q}%' or me.bar_code like '%${q}%')
|
||||
</if>
|
||||
<if test="idList.size()>0">
|
||||
and m.category_id in
|
||||
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and ifnull(m.delete_flag,'0') !='1'
|
||||
ORDER BY id desc
|
||||
<if test="offset != null and rows != null">
|
||||
@@ -121,6 +127,12 @@
|
||||
<if test="q != null">
|
||||
and (m.name like '%${q}%' or me.bar_code like '%${q}%')
|
||||
</if>
|
||||
<if test="idList.size()>0">
|
||||
and m.category_id in
|
||||
<foreach collection="idList" item="item" index="index" separator="," open="(" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
and ifnull(m.delete_flag,'0') !='1'
|
||||
</select>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user