|
|
@ -22,27 +22,30 @@
|
|
|
|
<select id="getTreeList" resultType="com.glxp.api.res.basic.BasicProductCategoryTypeResponse">
|
|
|
|
<select id="getTreeList" resultType="com.glxp.api.res.basic.BasicProductCategoryTypeResponse">
|
|
|
|
SELECT id, code, name as label, parentCode, remark
|
|
|
|
SELECT id, code, name as label, parentCode, remark
|
|
|
|
FROM basic_product_category
|
|
|
|
FROM basic_product_category
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
|
|
|
<if test="deptCode != '' and deptCode != null">
|
|
|
|
|
|
|
|
and deptCode = #{deptCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
<if test="invCode != '' and invCode != null">
|
|
|
|
|
|
|
|
and invCode = #{invCode}
|
|
|
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
</where>
|
|
|
|
ORDER BY id DESC
|
|
|
|
ORDER BY id DESC
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectLowTypeAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.basic.BasicProductCategory">
|
|
|
|
<select id="selectLowTypeAll" parameterType="java.lang.String"
|
|
|
|
|
|
|
|
resultType="com.glxp.api.entity.basic.BasicProductCategory">
|
|
|
|
WITH recursive table_a AS (
|
|
|
|
WITH recursive table_a AS (
|
|
|
|
SELECT
|
|
|
|
SELECT *
|
|
|
|
*
|
|
|
|
FROM basic_product_category ta
|
|
|
|
FROM
|
|
|
|
WHERE code = #{code}
|
|
|
|
basic_product_category ta
|
|
|
|
|
|
|
|
WHERE
|
|
|
|
|
|
|
|
code = #{code}
|
|
|
|
|
|
|
|
UNION ALL
|
|
|
|
UNION ALL
|
|
|
|
SELECT
|
|
|
|
SELECT tb.*
|
|
|
|
tb.*
|
|
|
|
FROM basic_product_category tb
|
|
|
|
FROM
|
|
|
|
|
|
|
|
basic_product_category tb
|
|
|
|
|
|
|
|
INNER JOIN table_a ON table_a.CODE = tb.parentCode
|
|
|
|
INNER JOIN table_a ON table_a.CODE = tb.parentCode
|
|
|
|
) SELECT
|
|
|
|
)
|
|
|
|
*
|
|
|
|
SELECT *
|
|
|
|
FROM
|
|
|
|
FROM table_a
|
|
|
|
table_a
|
|
|
|
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectProductByRelCode" resultType="Long">
|
|
|
|
<select id="selectProductByRelCode" resultType="Long">
|
|
|
@ -50,5 +53,4 @@
|
|
|
|
from basic_udirel
|
|
|
|
from basic_udirel
|
|
|
|
where basic_udirel.relCode = #{relCode}
|
|
|
|
where basic_udirel.relCode = #{relCode}
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
</mapper>
|
|
|
|
</mapper>
|
|
|
|