market-price-mapper.xml 1.32 KB
<?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">

<!-- @author xiangwei -->
<mapper namespace="com.cjs.cms.dao.trade.MarketPriceDao">

	<sql id="marketSql">
		
		select mch_code,mch_name,mchcode_status,issue_price from
		hs_mch.mchcode
		where 1=1
		<if test="otc_name != null and otc_name != ''">
			and mch_name=#{otc_name}
		</if>
		<if test="otc_code != null and otc_code != ''">
			and mch_code=#{otc_code}
		</if>
		<if test="mchcode_status != null and mchcode_status != ''">
			and mchcode_status=#{mchcode_status}
		</if>
		
	</sql>

	<select id="search" parameterType="map" resultType="map">
		<include refid="common.pageStart" />
		<include refid="marketSql"></include>
		<include refid="common.pageEnd" />
	</select>

	<select id="searchTotal" parameterType="map" resultType="int">
		select count(1) from (
		<include refid="marketSql"></include>
		)
	</select>
	
	<select id="update" parameterType="map" statementType="CALLABLE">
        CALL hs_asset.proc_update_marketprice(#{marketPrice},#{otc_code})
    </select>
      
    <!-- 查询指定藏品的收盘价 -->
	<select id="queryClosePirce" parameterType="string" resultType="double">
		select mclose_price from hs_mch.mchprice 
		where mch_code = #{otcCode}
	</select>
</mapper>