market-price-mapper.xml
1.32 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
<?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>