<?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" >
<mapper namespace="cn.superdesk.uniorder.dao.mapper.accounting.unified.customer.AccountingUnifiedCustomerOrderGoodsMapperExSys">

	<resultMap id="GoodResultMap" type="cn.superdesk.uniorder.dao.entity.sys.SysGood">
		<id column="id" property="id" jdbcType="BIGINT"/>
		<result column="sys_order_id" property="sysOrderId" jdbcType="VARCHAR"/>
		<result column="goodno" property="goodno" jdbcType="VARCHAR"/>
		<result column="total" property="total" jdbcType="INTEGER"/>
		<result column="unit_price" property="unitPrice" jdbcType="DECIMAL"/>
		<result column="price" property="price" jdbcType="DECIMAL"/>
		<result column="dispatch_price" property="dispatchPrice" jdbcType="DECIMAL"/>
		<result column="total_price" property="totalPrice" jdbcType="DECIMAL"/>
		<result column="optionname" property="optionname" jdbcType="VARCHAR"/>
		<result column="unit" property="unit" jdbcType="VARCHAR"/>
		<result column="other_field1" property="otherField1" jdbcType="VARCHAR"/>
		<result column="other_field2" property="otherField2" jdbcType="VARCHAR"/>
		<result column="tax_code" property="taxCode" jdbcType="VARCHAR"/>
		<result column="fiscal_code" property="fiscalCode" jdbcType="VARCHAR"/>
	</resultMap>

	<select id="findAllFromGood" resultMap="GoodResultMap">
		select
		id, sys_order_id, goodno, total, unit_price, price, dispatch_price, total_price,
		optionname, unit, other_field1, other_field2, tax_code, fiscal_code
		from
		sys_good
		<where>
			<if test="sysOrderId != null ">
				and sys_order_id = #{sysOrderId,jdbcType=VARCHAR}
			</if>
		</where>
	</select>



</mapper>