|
@@ -2,27 +2,50 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="com.trade.service.sales.mapper.SalesCommodityMapper">
|
|
|
|
|
|
- <resultMap id="BaseResultMap" type="com.trade.service.sales.domain.SalesCommodity">
|
|
|
- <id column="id" property="id" />
|
|
|
- <id column="sales_contract_id" property="salesContractId" />
|
|
|
- <id column="hs_code" property="hsCode" />
|
|
|
- <id column="name" property="name" />
|
|
|
- <id column="pack_spec" property="packSpec" />
|
|
|
- <id column="measurement_unit" property="measurementUnit" />
|
|
|
- <id column="export_tax_rebate_rate" property="exportTaxRebateRate" />
|
|
|
- <id column="added_tax_rate" property="addedTaxRate" />
|
|
|
- <id column="number" property="number" />
|
|
|
- <id column="price_unit" property="priceUnit" />
|
|
|
- <id column="currency" property="currency" />
|
|
|
- <id column="amount" property="amount" />
|
|
|
- <id column="deleted" property="deleted" />
|
|
|
- <id column="entity_no" property="entityNo" />
|
|
|
- <id column="entity_name" property="entityName" />
|
|
|
- <id column="gmt_create" property="gmtCreate" />
|
|
|
- <id column="gmt_modified" property="gmtModified" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
- id, sales_contract_id, entity_no, entity_name, hs_code, name, pack_spec, measurement_unit, export_tax_rebate_rate, added_tax_rate, number, price_unit, currency, amount, deleted, gmt_create, gmt_modified
|
|
|
- </sql>
|
|
|
-
|
|
|
+ <resultMap id="BaseResultMap" type="com.trade.service.sales.domain.SalesCommodity">
|
|
|
+ <id column="id" property="id"/>
|
|
|
+ <id column="sales_contract_id" property="salesContractId"/>
|
|
|
+ <id column="hs_code" property="hsCode"/>
|
|
|
+ <id column="name" property="name"/>
|
|
|
+ <id column="pack_spec" property="packSpec"/>
|
|
|
+ <id column="measurement_unit" property="measurementUnit"/>
|
|
|
+ <id column="export_tax_rebate_rate" property="exportTaxRebateRate"/>
|
|
|
+ <id column="added_tax_rate" property="addedTaxRate"/>
|
|
|
+ <id column="number" property="number"/>
|
|
|
+ <id column="price_unit" property="priceUnit"/>
|
|
|
+ <id column="currency" property="currency"/>
|
|
|
+ <id column="amount" property="amount"/>
|
|
|
+ <id column="deleted" property="deleted"/>
|
|
|
+ <id column="entity_no" property="entityNo"/>
|
|
|
+ <id column="entity_name" property="entityName"/>
|
|
|
+ <id column="gmt_create" property="gmtCreate"/>
|
|
|
+ <id column="gmt_modified" property="gmtModified"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ id
|
|
|
+ , sales_contract_id, entity_no, entity_name, hs_code, name, pack_spec, measurement_unit, export_tax_rebate_rate, added_tax_rate, number, price_unit, currency, amount, deleted, gmt_create, gmt_modified
|
|
|
+ </sql>
|
|
|
+ <select id="selectBySalesContractId" resultMap="BaseResultMap">
|
|
|
+ select T1.id,
|
|
|
+ T1.sales_contract_id,
|
|
|
+ T1.entity_no,
|
|
|
+ T1.hs_code,
|
|
|
+ T1.name,
|
|
|
+ T1.pack_spec,
|
|
|
+ T1.measurement_unit,
|
|
|
+ T1.export_tax_rebate_rate,
|
|
|
+ T1.added_tax_rate,
|
|
|
+ T1.number,
|
|
|
+ T1.price_unit,
|
|
|
+ T1.currency,
|
|
|
+ T1.amount,
|
|
|
+ T1.deleted,
|
|
|
+ T1.gmt_create,
|
|
|
+ T1.gmt_modified,
|
|
|
+ T2.entity_name
|
|
|
+ from sales_commodity T1
|
|
|
+ join vendor_entity T2 on T1.entity_no = T2.entity_no
|
|
|
+ where T1.sales_contract_id = #{salesContractId}
|
|
|
+ and T1.deleted = 0
|
|
|
+ </select>
|
|
|
</mapper>
|