|
@@ -3,7 +3,7 @@
|
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="cn.hobbystocks.auc.mapper.AuctionMapper">
|
|
<mapper namespace="cn.hobbystocks.auc.mapper.AuctionMapper">
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<resultMap type="cn.hobbystocks.auc.domain.Auction" id="AuctionResult">
|
|
<resultMap type="cn.hobbystocks.auc.domain.Auction" id="AuctionResult">
|
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
|
<result property="no" column="no" />
|
|
<result property="no" column="no" />
|
|
@@ -29,8 +29,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<sql id="selectAuctionVo">
|
|
<sql id="selectAuctionVo">
|
|
|
select
|
|
select
|
|
|
- id, no, name, site, imgs, banner, attachment, detail, des_data,
|
|
|
|
|
- labels, pub_status, pub_time, status, start_time, end_time,
|
|
|
|
|
|
|
+ id, no, name,type, imgs, banner, deposit, service_tariff, pay_time_limit,
|
|
|
|
|
+ description, pub_status, pub_time, status, start_time, end_time,
|
|
|
del_flag, create_by, create_time, update_by, update_time
|
|
del_flag, create_by, create_time, update_by, update_time
|
|
|
from
|
|
from
|
|
|
auction
|
|
auction
|
|
@@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
<select id="selectAuctionList" parameterType="cn.hobbystocks.auc.domain.Auction" resultMap="AuctionResult">
|
|
<select id="selectAuctionList" parameterType="cn.hobbystocks.auc.domain.Auction" resultMap="AuctionResult">
|
|
|
<include refid="selectAuctionVo"/>
|
|
<include refid="selectAuctionVo"/>
|
|
|
- <where>
|
|
|
|
|
|
|
+ <where>
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
<if test="site != null and site != ''"> and site like concat('%', #{site}, '%')</if>
|
|
<if test="site != null and site != ''"> and site like concat('%', #{site}, '%')</if>
|
|
|
<if test="imgs != null and imgs != ''"> and imgs like concat('%', #{imgs}, '%')</if>
|
|
<if test="imgs != null and imgs != ''"> and imgs like concat('%', #{imgs}, '%')</if>
|
|
@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND status in ('Waiting','Starting')
|
|
AND status in ('Waiting','Starting')
|
|
|
AND del_flag <> 1
|
|
AND del_flag <> 1
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<select id="selectAuctionById" parameterType="Long" resultMap="AuctionResult">
|
|
<select id="selectAuctionById" parameterType="Long" resultMap="AuctionResult">
|
|
|
<include refid="selectAuctionVo"/>
|
|
<include refid="selectAuctionVo"/>
|
|
|
where id = #{id} and del_flag <> 1
|
|
where id = #{id} and del_flag <> 1
|
|
@@ -112,7 +112,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<include refid="selectAuctionVo"/>
|
|
<include refid="selectAuctionVo"/>
|
|
|
where no = #{no} and del_flag <> 1
|
|
where no = #{no} and del_flag <> 1
|
|
|
</select>
|
|
</select>
|
|
|
-
|
|
|
|
|
|
|
+
|
|
|
<insert id="insertAuction" parameterType="cn.hobbystocks.auc.domain.Auction">
|
|
<insert id="insertAuction" parameterType="cn.hobbystocks.auc.domain.Auction">
|
|
|
insert into auction
|
|
insert into auction
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
@@ -166,13 +166,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="no != null">no = #{no},</if>
|
|
<if test="no != null">no = #{no},</if>
|
|
|
<if test="name != null">name = #{name},</if>
|
|
<if test="name != null">name = #{name},</if>
|
|
|
- <if test="site != null">site = #{site},</if>
|
|
|
|
|
|
|
+ <if test="type != null">type = #{type},</if>
|
|
|
<if test="imgs != null">imgs = #{imgs},</if>
|
|
<if test="imgs != null">imgs = #{imgs},</if>
|
|
|
<if test="banner != null">banner = #{banner},</if>
|
|
<if test="banner != null">banner = #{banner},</if>
|
|
|
- <if test="attachment != null">attachment = #{attachment},</if>
|
|
|
|
|
- <if test="detail != null">detail = #{detail},</if>
|
|
|
|
|
- <if test="desData != null">des_data = #{desData},</if>
|
|
|
|
|
- <if test="labels != null">labels = #{labels},</if>
|
|
|
|
|
|
|
+ <if test="deposit != null">deposit = #{deposit},</if>
|
|
|
|
|
+ <if test="serviceTariff != null">service_tariff = #{serviceTariff},</if>
|
|
|
|
|
+ <if test="payTimeLimit != null">pay_time_limit = #{payTimeLimit},</if>
|
|
|
|
|
+ <if test="description != null and description!=''">description = #{description},</if>
|
|
|
<if test="pubStatus != null">pub_status = #{pubStatus},</if>
|
|
<if test="pubStatus != null">pub_status = #{pubStatus},</if>
|
|
|
<if test="pubTime != null">pub_time = #{pubTime},</if>
|
|
<if test="pubTime != null">pub_time = #{pubTime},</if>
|
|
|
<if test="status != null">status = #{status},</if>
|
|
<if test="status != null">status = #{status},</if>
|
|
@@ -192,10 +192,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
<delete id="deleteAuctionByIds" parameterType="String">
|
|
<delete id="deleteAuctionByIds" parameterType="String">
|
|
|
- delete from auction where id in
|
|
|
|
|
|
|
+ delete from auction where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
#{id}
|
|
|
</foreach>
|
|
</foreach>
|
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
-</mapper>
|
|
|
|
|
|
|
+</mapper>
|