123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295 |
- <?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.huojutech.dao.StockForecastMapper" >
- <resultMap id="BaseResultMap" type="com.huojutech.entity.StockForecast" >
- <id column="id" property="id" jdbcType="INTEGER" />
- <result column="uid" property="uid" jdbcType="INTEGER" />
- <result column="stock_name" property="stockName" jdbcType="VARCHAR" />
- <result column="stock_code" property="stockCode" jdbcType="VARCHAR" />
- <result column="expect" property="expect" jdbcType="INTEGER" />
- <result column="bet" property="bet" jdbcType="DECIMAL" />
- <result column="current_price" property="currentPrice" jdbcType="DECIMAL" />
- <result column="target_price" property="targetPrice" jdbcType="DECIMAL" />
- <result column="cycle" property="cycle" jdbcType="INTEGER" />
- <result column="start_date" property="startDate" jdbcType="DATE" />
- <result column="end_date" property="endDate" jdbcType="DATE" />
- <result column="status" property="status" jdbcType="INTEGER" />
- <result column="crt_time" property="crtTime" jdbcType="TIMESTAMP" />
- <result column="upd_time" property="updTime" jdbcType="TIMESTAMP" />
- </resultMap>
- <resultMap id="ResultMapWithBLOBs" type="com.huojutech.entity.StockForecast" extends="BaseResultMap" >
- <result column="reason" property="reason" jdbcType="LONGVARCHAR" />
- </resultMap>
- <sql id="Example_Where_Clause" >
- <where >
- <foreach collection="oredCriteria" item="criteria" separator="or" >
- <if test="criteria.valid" >
- <trim prefix="(" suffix=")" prefixOverrides="and" >
- <foreach collection="criteria.criteria" item="criterion" >
- <choose >
- <when test="criterion.noValue" >
- and ${criterion.condition}
- </when>
- <when test="criterion.singleValue" >
- and ${criterion.condition} #{criterion.value}
- </when>
- <when test="criterion.betweenValue" >
- and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
- </when>
- <when test="criterion.listValue" >
- and ${criterion.condition}
- <foreach collection="criterion.value" item="listItem" open="(" close=")" separator="," >
- #{listItem}
- </foreach>
- </when>
- </choose>
- </foreach>
- </trim>
- </if>
- </foreach>
- </where>
- </sql>
- <sql id="Base_Column_List" >
- id, uid, stock_name, stock_code, expect, bet, current_price, target_price, cycle,
- start_date, end_date, status, crt_time, upd_time
- </sql>
- <sql id="Blob_Column_List" >
- reason
- </sql>
- <select id="selectByExampleWithBLOBs" resultMap="ResultMapWithBLOBs" parameterType="com.huojutech.entity.StockForecastExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- 'true' as QUERYID,
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from stock_forecast
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByExample" resultMap="BaseResultMap" parameterType="com.huojutech.entity.StockForecastExample" >
- select
- <if test="distinct" >
- distinct
- </if>
- 'true' as QUERYID,
- <include refid="Base_Column_List" />
- from stock_forecast
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- <if test="orderByClause != null" >
- order by ${orderByClause}
- </if>
- </select>
- <select id="selectByPrimaryKey" resultMap="ResultMapWithBLOBs" parameterType="java.lang.Integer" >
- select
- <include refid="Base_Column_List" />
- ,
- <include refid="Blob_Column_List" />
- from stock_forecast
- where id = #{id,jdbcType=INTEGER}
- </select>
- <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer" >
- delete from stock_forecast
- where id = #{id,jdbcType=INTEGER}
- </delete>
- <insert id="insert" parameterType="com.huojutech.entity.StockForecast" useGeneratedKeys="true" keyProperty="id" >
- insert into stock_forecast (uid, stock_name, stock_code,
- expect, bet, current_price,
- target_price, cycle, start_date,
- end_date, status, crt_time,
- upd_time, reason)
- values (#{uid,jdbcType=INTEGER}, #{stockName,jdbcType=VARCHAR}, #{stockCode,jdbcType=VARCHAR},
- #{expect,jdbcType=INTEGER}, #{bet,jdbcType=DECIMAL}, #{currentPrice,jdbcType=DECIMAL},
- #{targetPrice,jdbcType=DECIMAL}, #{cycle,jdbcType=INTEGER}, #{startDate,jdbcType=DATE},
- #{endDate,jdbcType=DATE}, #{status,jdbcType=INTEGER}, #{crtTime,jdbcType=TIMESTAMP},
- #{updTime,jdbcType=TIMESTAMP}, #{reason,jdbcType=LONGVARCHAR})
- </insert>
- <insert id="insertSelective" parameterType="com.huojutech.entity.StockForecast" useGeneratedKeys="true" keyProperty="id" >
- insert into stock_forecast
- <trim prefix="(" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- uid,
- </if>
- <if test="stockName != null" >
- stock_name,
- </if>
- <if test="stockCode != null" >
- stock_code,
- </if>
- <if test="expect != null" >
- expect,
- </if>
- <if test="bet != null" >
- bet,
- </if>
- <if test="currentPrice != null" >
- current_price,
- </if>
- <if test="targetPrice != null" >
- target_price,
- </if>
- <if test="cycle != null" >
- cycle,
- </if>
- <if test="startDate != null" >
- start_date,
- </if>
- <if test="endDate != null" >
- end_date,
- </if>
- <if test="status != null" >
- status,
- </if>
- <if test="crtTime != null" >
- crt_time,
- </if>
- <if test="updTime != null" >
- upd_time,
- </if>
- <if test="reason != null" >
- reason,
- </if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides="," >
- <if test="uid != null" >
- #{uid,jdbcType=INTEGER},
- </if>
- <if test="stockName != null" >
- #{stockName,jdbcType=VARCHAR},
- </if>
- <if test="stockCode != null" >
- #{stockCode,jdbcType=VARCHAR},
- </if>
- <if test="expect != null" >
- #{expect,jdbcType=INTEGER},
- </if>
- <if test="bet != null" >
- #{bet,jdbcType=DECIMAL},
- </if>
- <if test="currentPrice != null" >
- #{currentPrice,jdbcType=DECIMAL},
- </if>
- <if test="targetPrice != null" >
- #{targetPrice,jdbcType=DECIMAL},
- </if>
- <if test="cycle != null" >
- #{cycle,jdbcType=INTEGER},
- </if>
- <if test="startDate != null" >
- #{startDate,jdbcType=DATE},
- </if>
- <if test="endDate != null" >
- #{endDate,jdbcType=DATE},
- </if>
- <if test="status != null" >
- #{status,jdbcType=INTEGER},
- </if>
- <if test="crtTime != null" >
- #{crtTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updTime != null" >
- #{updTime,jdbcType=TIMESTAMP},
- </if>
- <if test="reason != null" >
- #{reason,jdbcType=LONGVARCHAR},
- </if>
- </trim>
- </insert>
- <select id="countByExample" parameterType="com.huojutech.entity.StockForecastExample" resultType="java.lang.Integer" >
- select count(*) from stock_forecast
- <if test="_parameter != null" >
- <include refid="Example_Where_Clause" />
- </if>
- </select>
- <update id="updateByPrimaryKeySelective" parameterType="com.huojutech.entity.StockForecast" >
- update stock_forecast
- <set >
- <if test="uid != null" >
- uid = #{uid,jdbcType=INTEGER},
- </if>
- <if test="stockName != null" >
- stock_name = #{stockName,jdbcType=VARCHAR},
- </if>
- <if test="stockCode != null" >
- stock_code = #{stockCode,jdbcType=VARCHAR},
- </if>
- <if test="expect != null" >
- expect = #{expect,jdbcType=INTEGER},
- </if>
- <if test="bet != null" >
- bet = #{bet,jdbcType=DECIMAL},
- </if>
- <if test="currentPrice != null" >
- current_price = #{currentPrice,jdbcType=DECIMAL},
- </if>
- <if test="targetPrice != null" >
- target_price = #{targetPrice,jdbcType=DECIMAL},
- </if>
- <if test="cycle != null" >
- cycle = #{cycle,jdbcType=INTEGER},
- </if>
- <if test="startDate != null" >
- start_date = #{startDate,jdbcType=DATE},
- </if>
- <if test="endDate != null" >
- end_date = #{endDate,jdbcType=DATE},
- </if>
- <if test="status != null" >
- status = #{status,jdbcType=INTEGER},
- </if>
- <if test="crtTime != null" >
- crt_time = #{crtTime,jdbcType=TIMESTAMP},
- </if>
- <if test="updTime != null" >
- upd_time = #{updTime,jdbcType=TIMESTAMP},
- </if>
- <if test="reason != null" >
- reason = #{reason,jdbcType=LONGVARCHAR},
- </if>
- </set>
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKeyWithBLOBs" parameterType="com.huojutech.entity.StockForecast" >
- update stock_forecast
- set uid = #{uid,jdbcType=INTEGER},
- stock_name = #{stockName,jdbcType=VARCHAR},
- stock_code = #{stockCode,jdbcType=VARCHAR},
- expect = #{expect,jdbcType=INTEGER},
- bet = #{bet,jdbcType=DECIMAL},
- current_price = #{currentPrice,jdbcType=DECIMAL},
- target_price = #{targetPrice,jdbcType=DECIMAL},
- cycle = #{cycle,jdbcType=INTEGER},
- start_date = #{startDate,jdbcType=DATE},
- end_date = #{endDate,jdbcType=DATE},
- status = #{status,jdbcType=INTEGER},
- crt_time = #{crtTime,jdbcType=TIMESTAMP},
- upd_time = #{updTime,jdbcType=TIMESTAMP},
- reason = #{reason,jdbcType=LONGVARCHAR}
- where id = #{id,jdbcType=INTEGER}
- </update>
- <update id="updateByPrimaryKey" parameterType="com.huojutech.entity.StockForecast" >
- update stock_forecast
- set uid = #{uid,jdbcType=INTEGER},
- stock_name = #{stockName,jdbcType=VARCHAR},
- stock_code = #{stockCode,jdbcType=VARCHAR},
- expect = #{expect,jdbcType=INTEGER},
- bet = #{bet,jdbcType=DECIMAL},
- current_price = #{currentPrice,jdbcType=DECIMAL},
- target_price = #{targetPrice,jdbcType=DECIMAL},
- cycle = #{cycle,jdbcType=INTEGER},
- start_date = #{startDate,jdbcType=DATE},
- end_date = #{endDate,jdbcType=DATE},
- status = #{status,jdbcType=INTEGER},
- crt_time = #{crtTime,jdbcType=TIMESTAMP},
- upd_time = #{updTime,jdbcType=TIMESTAMP}
- where id = #{id,jdbcType=INTEGER}
- </update>
- </mapper>
|