<?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="com.nq.dao.SiteIndexSettingMapper" >
|
<resultMap id="BaseResultMap" type="com.nq.pojo.SiteIndexSetting" >
|
<constructor >
|
<idArg column="id" jdbcType="INTEGER" javaType="java.lang.Integer" />
|
<arg column="buy_max_percent" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
|
<arg column="force_sell_percent" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
|
<arg column="trans_am_begin" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_am_end" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_pm_begin" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_pm_end" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_am_begin_us" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_am_end_us" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_pm_begin_us" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_pm_end_us" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_am_begin_hk" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_am_end_hk" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_pm_begin_hk" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="trans_pm_end_hk" jdbcType="VARCHAR" javaType="java.lang.String" />
|
<arg column="down_limit" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
|
<arg column="rise_limit" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
|
<arg column="force_stop_remind_ratio" jdbcType="DECIMAL" javaType="java.math.BigDecimal" />
|
</constructor>
|
</resultMap>
|
<sql id="Base_Column_List" >
|
id, buy_max_percent, force_sell_percent, trans_am_begin, trans_am_end, trans_pm_begin,
|
trans_pm_end,trans_am_begin_us, trans_am_end_us, trans_pm_begin_us,
|
trans_pm_end_us,trans_am_begin_hk, trans_am_end_hk, trans_pm_begin_hk,
|
trans_pm_end_hk, down_limit, rise_limit, force_stop_remind_ratio
|
</sql>
|
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
|
select
|
<include refid="Base_Column_List" />
|
from site_index_setting
|
where id = #{id,jdbcType=INTEGER}
|
</select>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
|
delete from site_index_setting
|
where id = #{id,jdbcType=INTEGER}
|
</delete>
|
<insert id="insert" parameterType="com.nq.pojo.SiteIndexSetting" >
|
insert into site_index_setting (id, buy_max_percent, force_sell_percent,
|
trans_am_begin, trans_am_end, trans_pm_begin,
|
trans_pm_end, trans_am_begin_us, trans_am_end_us, trans_pm_begin_us,
|
trans_pm_end_us, trans_am_begin_hk, trans_am_end_hk, trans_pm_begin_hk,
|
trans_pm_end_hk,down_limit, rise_limit, force_stop_remind_ratio
|
)
|
values (#{id,jdbcType=INTEGER}, #{buyMaxPercent,jdbcType=DECIMAL}, #{forceSellPercent,jdbcType=DECIMAL},
|
#{transAmBegin,jdbcType=VARCHAR}, #{transAmEnd,jdbcType=VARCHAR}, #{transPmBegin,jdbcType=VARCHAR},
|
#{transPmEnd,jdbcType=VARCHAR},#{transAmBeginUs,jdbcType=VARCHAR}, #{transAmEndUs,jdbcType=VARCHAR}, #{transPmBeginUs,jdbcType=VARCHAR},
|
#{transPmEndUs,jdbcType=VARCHAR},#{transAmBeginhk,jdbcType=VARCHAR}, #{transAmEndhk,jdbcType=VARCHAR}, #{transPmBeginhk,jdbcType=VARCHAR},
|
#{transPmEndhk,jdbcType=VARCHAR}, #{downLimit,jdbcType=DECIMAL}, #{riseLimit,jdbcType=DECIMAL}, #{forceStopRemindRatio,jdbcType=DECIMAL}
|
)
|
</insert>
|
<insert id="insertSelective" parameterType="com.nq.pojo.SiteIndexSetting" >
|
insert into site_index_setting
|
<trim prefix="(" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
id,
|
</if>
|
<if test="buyMaxPercent != null" >
|
buy_max_percent,
|
</if>
|
<if test="forceSellPercent != null" >
|
force_sell_percent,
|
</if>
|
<if test="transAmBegin != null" >
|
trans_am_begin,
|
</if>
|
<if test="transAmEnd != null" >
|
trans_am_end,
|
</if>
|
<if test="transPmBegin != null" >
|
trans_pm_begin,
|
</if>
|
<if test="transPmEnd != null" >
|
trans_pm_end,
|
</if>
|
<if test="transAmBeginUs != null" >
|
trans_am_begin_us,
|
</if>
|
<if test="transAmEndUs != null" >
|
trans_am_end_us,
|
</if>
|
<if test="transPmBeginUs != null" >
|
trans_pm_begin_us,
|
</if>
|
<if test="transPmEndUs != null" >
|
trans_pm_end_us,
|
</if>
|
<if test="transAmBeginhk != null" >
|
trans_am_begin_hk,
|
</if>
|
<if test="transAmEndhk != null" >
|
trans_am_end_hk,
|
</if>
|
<if test="transPmBeginhk != null" >
|
trans_pm_begin_hk,
|
</if>
|
<if test="transPmEndhk != null" >
|
trans_pm_end_hk,
|
</if>
|
<if test="downLimit != null" >
|
down_limit,
|
</if>
|
<if test="riseLimit != null" >
|
rise_limit,
|
</if>
|
<if test="forceStopRemindRatio != null" >
|
force_stop_remind_ratio,
|
</if>
|
</trim>
|
<trim prefix="values (" suffix=")" suffixOverrides="," >
|
<if test="id != null" >
|
#{id,jdbcType=INTEGER},
|
</if>
|
<if test="buyMaxPercent != null" >
|
#{buyMaxPercent,jdbcType=DECIMAL},
|
</if>
|
<if test="forceSellPercent != null" >
|
#{forceSellPercent,jdbcType=DECIMAL},
|
</if>
|
<if test="transAmBegin != null" >
|
#{transAmBegin,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmEnd != null" >
|
#{transAmEnd,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmBegin != null" >
|
#{transPmBegin,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmEnd != null" >
|
#{transPmEnd,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmBeginUs != null" >
|
#{transAmBeginUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmEndUs != null" >
|
#{transAmEndUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmBeginUs != null" >
|
#{transPmBeginUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmEndUs != null" >
|
#{transPmEndUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmBeginhk != null" >
|
#{transAmBeginhk,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmEndhk != null" >
|
#{transAmEndhk,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmBeginhk != null" >
|
#{transPmBeginhk,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmEndhk != null" >
|
#{transPmEndhk,jdbcType=VARCHAR},
|
</if>
|
<if test="downLimit != null" >
|
#{downLimit,jdbcType=DECIMAL},
|
</if>
|
<if test="riseLimit != null" >
|
#{riseLimit,jdbcType=DECIMAL},
|
</if>
|
<if test="forceStopRemindRatio != null" >
|
#{forceStopRemindRatio,jdbcType=DECIMAL},
|
</if>
|
</trim>
|
</insert>
|
<update id="updateByPrimaryKeySelective" parameterType="com.nq.pojo.SiteIndexSetting" >
|
update site_index_setting
|
<set >
|
<if test="buyMaxPercent != null" >
|
buy_max_percent = #{buyMaxPercent,jdbcType=DECIMAL},
|
</if>
|
<if test="forceSellPercent != null" >
|
force_sell_percent = #{forceSellPercent,jdbcType=DECIMAL},
|
</if>
|
<if test="transAmBegin != null" >
|
trans_am_begin = #{transAmBegin,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmEnd != null" >
|
trans_am_end = #{transAmEnd,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmBegin != null" >
|
trans_pm_begin = #{transPmBegin,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmEnd != null" >
|
trans_pm_end = #{transPmEnd,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmBeginUs != null" >
|
trans_am_begin_us = #{transAmBeginUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmEndUs != null" >
|
trans_am_end_us = #{transAmEndUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmBeginUS != null" >
|
trans_pm_begin_us = #{transPmBeginUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmEndUs != null" >
|
trans_pm_end_us = #{transPmEndUs,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmBeginhk != null" >
|
trans_am_begin_hk = #{transAmBeginhk,jdbcType=VARCHAR},
|
</if>
|
<if test="transAmEndhk != null" >
|
trans_am_end_hk = #{transAmEndhk,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmBeginhk != null" >
|
trans_pm_begin_hk = #{transPmBeginhk,jdbcType=VARCHAR},
|
</if>
|
<if test="transPmEndhk != null" >
|
trans_pm_end_hk = #{transPmEndhk,jdbcType=VARCHAR},
|
</if>
|
<if test="downLimit != null" >
|
down_limit = #{downLimit,jdbcType=DECIMAL},
|
</if>
|
<if test="riseLimit != null" >
|
rise_limit = #{riseLimit,jdbcType=DECIMAL},
|
</if>
|
<if test="forceStopRemindRatio != null" >
|
force_stop_remind_ratio = #{forceStopRemindRatio,jdbcType=DECIMAL},
|
</if>
|
</set>
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
<update id="updateByPrimaryKey" parameterType="com.nq.pojo.SiteIndexSetting" >
|
update site_index_setting
|
set buy_max_percent = #{buyMaxPercent,jdbcType=DECIMAL},
|
force_sell_percent = #{forceSellPercent,jdbcType=DECIMAL},
|
trans_am_begin = #{transAmBegin,jdbcType=VARCHAR},
|
trans_am_end = #{transAmEnd,jdbcType=VARCHAR},
|
trans_pm_begin = #{transPmBegin,jdbcType=VARCHAR},
|
trans_pm_end = #{transPmEnd,jdbcType=VARCHAR},
|
trans_am_begin_us = #{transAmBeginUs,jdbcType=VARCHAR},
|
trans_am_end_us = #{transAmEndUs,jdbcType=VARCHAR},
|
trans_pm_begin_us = #{transPmBeginUs,jdbcType=VARCHAR},
|
trans_pm_end_us = #{transPmEndUs,jdbcType=VARCHAR},
|
trans_am_begin_hk = #{transAmBeginhk,jdbcType=VARCHAR},
|
trans_am_end_hk = #{transAmEndhk,jdbcType=VARCHAR},
|
trans_pm_begin_hk = #{transPmBeginhk,jdbcType=VARCHAR},
|
trans_pm_end_hk = #{transPmEndhk,jdbcType=VARCHAR},
|
down_limit = #{downLimit,jdbcType=DECIMAL},
|
rise_limit = #{riseLimit,jdbcType=DECIMAL},
|
force_stop_remind_ratio = #{forceStopRemindRatio,jdbcType=DECIMAL}
|
where id = #{id,jdbcType=INTEGER}
|
</update>
|
|
|
|
|
<select id="selectAllSiteIndexSetting" resultMap="BaseResultMap">
|
SELECT
|
<include refid="Base_Column_List"/>
|
FROM site_index_setting
|
</select>
|
|
|
</mapper>
|