<?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.unified.UnifiedOrderProfitMapperEx">

	<select id="selectBySn"
	        resultMap="cn.superdesk.uniorder.dao.mapper.unified.UnifiedOrderProfitMapper.BaseResultMap"
	        parameterType="java.lang.String">
		select
		<include refid="cn.superdesk.uniorder.dao.mapper.unified.UnifiedOrderProfitMapper.Base_Column_List"/>
		from unified_order_profit
		where order_sn = #{sn} and order_sn_return is null
	</select>
	<select id="selectByReturnSn"
	        resultMap="cn.superdesk.uniorder.dao.mapper.unified.UnifiedOrderProfitMapper.BaseResultMap"
	        parameterType="java.lang.String">
		select
		<include refid="cn.superdesk.uniorder.dao.mapper.unified.UnifiedOrderProfitMapper.Base_Column_List"/>
		from unified_order_profit
		where order_sn_return = #{returnSn}
	</select>
</mapper>