Merge remote-tracking branch 'origin/dev_price' into dev_price
commit
fc4cbf3cf3
@ -1,54 +1,56 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.glxp.api.dao.basic.BasicProductCategoryMapper">
|
<mapper namespace="com.glxp.api.dao.basic.BasicProductCategoryMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicProductCategory">
|
<resultMap id="BaseResultMap" type="com.glxp.api.entity.basic.BasicProductCategory">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
<!--@Table basic_product_category-->
|
<!--@Table basic_product_category-->
|
||||||
<id column="id" jdbcType="BIGINT" property="id" />
|
<id column="id" jdbcType="BIGINT" property="id"/>
|
||||||
<result column="code" jdbcType="VARCHAR" property="code" />
|
<result column="code" jdbcType="VARCHAR" property="code"/>
|
||||||
<result column="parentCode" jdbcType="VARCHAR" property="parentCode" />
|
<result column="parentCode" jdbcType="VARCHAR" property="parentCode"/>
|
||||||
<result column="name" jdbcType="VARCHAR" property="name" />
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||||
<result column="createTime" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="createTime" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="updateTime" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
<result column="createUser" jdbcType="VARCHAR" property="createUser" />
|
<result column="createUser" jdbcType="VARCHAR" property="createUser"/>
|
||||||
<result column="updateUser" jdbcType="VARCHAR" property="updateUser" />
|
<result column="updateUser" jdbcType="VARCHAR" property="updateUser"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
id, code, parentCode, `name`, remark, createTime, updateTime, `createUser`, updateUser
|
id, code, parentCode, `name`, remark, createTime, updateTime, `createUser`, updateUser
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<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
|
||||||
ORDER BY id DESC
|
<where>
|
||||||
</select>
|
<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
|
||||||
|
</select>
|
||||||
|
|
||||||
<select id="selectLowTypeAll" parameterType="java.lang.String" resultType="com.glxp.api.entity.basic.BasicProductCategory">
|
<select id="selectLowTypeAll" parameterType="java.lang.String"
|
||||||
WITH recursive table_a AS (
|
resultType="com.glxp.api.entity.basic.BasicProductCategory">
|
||||||
SELECT
|
WITH recursive table_a AS (
|
||||||
*
|
SELECT *
|
||||||
FROM
|
FROM basic_product_category ta
|
||||||
basic_product_category ta
|
WHERE code = #{code}
|
||||||
WHERE
|
UNION ALL
|
||||||
code = #{code}
|
SELECT tb.*
|
||||||
UNION ALL
|
FROM basic_product_category tb
|
||||||
SELECT
|
INNER JOIN table_a ON table_a.CODE = tb.parentCode
|
||||||
tb.*
|
)
|
||||||
FROM
|
SELECT *
|
||||||
basic_product_category tb
|
FROM table_a
|
||||||
INNER JOIN table_a ON table_a.CODE = tb.parentCode
|
</select>
|
||||||
) SELECT
|
|
||||||
*
|
|
||||||
FROM
|
|
||||||
table_a
|
|
||||||
</select>
|
|
||||||
|
|
||||||
<select id="selectProductByRelCode" resultType="Long">
|
|
||||||
select count(*)
|
|
||||||
from basic_udirel
|
|
||||||
where basic_udirel.relCode = #{relCode}
|
|
||||||
</select>
|
|
||||||
|
|
||||||
|
<select id="selectProductByRelCode" resultType="Long">
|
||||||
|
select count(*)
|
||||||
|
from basic_udirel
|
||||||
|
where basic_udirel.relCode = #{relCode}
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
Loading…
Reference in New Issue