| | |
| | | |
| | | <resultMap id="productMap" type="com.by4cloud.platformx.business.entity.Product"> |
| | | <id property="id" column="id"/> |
| | | <result property="categoryId" column="category_id"/> |
| | | <result property="productName" column="product_name"/> |
| | | <result property="erpCode" column="erp_code"/> |
| | | <result property="mainCode" column="main_code"/> |
| | | <result property="price" column="price"/> |
| | | <result property="taxRate" column="tax_rate"/> |
| | | <result property="compId" column="comp_id"/> |
| | | <result property="createBy" column="create_by"/> |
| | |
| | | <result property="updateTime" column="update_time"/> |
| | | <result property="delFlag" column="del_flag"/> |
| | | </resultMap> |
| | | <select id="getProductListByScope" resultType="com.by4cloud.platformx.business.entity.Product"> |
| | | SELECT |
| | | t.id, |
| | | t.product_name, |
| | | t.main_code, |
| | | t.erp_code, |
| | | t.product_type, |
| | | t.tax_rate, |
| | | t.tax_class, |
| | | t.tax_code, |
| | | t.parent_id, |
| | | t.create_by, |
| | | t.update_by, |
| | | t.create_time, |
| | | t.update_time, |
| | | t.del_flag, |
| | | t.comp_id |
| | | FROM |
| | | product t |
| | | WHERE |
| | | del_flag = '0' |
| | | <if test="product.productName !=null and product.productName !=''"> |
| | | and t.product_name LIKE CONCAT('%', #{product.productName}, '%') |
| | | </if> |
| | | AND ( |
| | | NOT EXISTS ( SELECT 1 FROM product t1 WHERE t1.parent_id = t.id )) |
| | | limit 30 |
| | | </select> |
| | | </mapper> |