|
|
@@ -28,7 +28,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="dealAccountId" column="deal_account_id" />
|
|
|
<result property="dealAccount" column="deal_account" />
|
|
|
<result property="paid" column="paid" />
|
|
|
-
|
|
|
<result property="bidCount" column="bid_count" />
|
|
|
<result property="bidPersionCount" column="bid_persion_count" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
|
@@ -49,11 +48,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="deposit" column="deposit"/>
|
|
|
<result property="serviceTariff" column="service_tariff"/>
|
|
|
<result property="payTimeLimit" column="pay_time_limit"/>
|
|
|
+ <result property="category" column="category"/>
|
|
|
+ <result property="subCategory" column="sub_category"/>
|
|
|
+ <result property="properties" column="properties" jdbcType="OTHER" typeHandler="cn.hobbystocks.auc.mapper.handler.JsonNodeTypeHandler"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLotVo">
|
|
|
select id, goods_id, auction_id, name, num, unit, imgs, detail, pub_status, pub_time, status, start_time, end_time, real_end_time, rule_type, rule_content, last_price, last_price_time, deal_price, deal_time, deal_account_id, deal_account, paid, bid_count, bid_persion_count, del_flag, create_by, create_time, update_by, update_time, sort,
|
|
|
- carousel_imgs,merchant_id,merchant_name,merchant_avatar,goods_name,goods_type,private_domain,delay_publish,pub_status,group_id,deposit,service_tariff,pay_time_limit
|
|
|
+ carousel_imgs,merchant_id,merchant_name,merchant_avatar,goods_name,goods_type,private_domain,delay_publish,pub_status,group_id,deposit,service_tariff,pay_time_limit,category,sub_category,properties
|
|
|
from lot
|
|
|
</sql>
|
|
|
|
|
|
@@ -144,6 +146,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deposit !=null ">deposit,</if>
|
|
|
<if test="serviceTariff !=null ">service_tariff,</if>
|
|
|
<if test="payTimeLimit!=null">pay_limit_time,</if>
|
|
|
+ <if test="category!=null and category!=''">category,</if>
|
|
|
+ <if test="subCategory!=null and subCategory!=''">sub_category,</if>
|
|
|
+ <if test="properties!=null">properties,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id},</if>
|
|
|
@@ -169,7 +174,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="dealAccountId != null">#{dealAccountId},</if>
|
|
|
<if test="dealAccount != null">#{dealAccount},</if>
|
|
|
<if test="paid != null">#{paid},</if>
|
|
|
-
|
|
|
<if test="bidCount != null">#{bidCount},</if>
|
|
|
<if test="bidPersionCount != null">#{bidPersionCount},</if>
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
|
@@ -190,6 +194,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="deposit !=null ">#{deposit},</if>
|
|
|
<if test="serviceTariff !=null ">#{serviceTariff},</if>
|
|
|
<if test="payTimeLimit!=null">#{payTimeLimit},</if>
|
|
|
+ <if test="category!=null and category!=''">#{category},</if>
|
|
|
+ <if test="subCategory!=null and subCategory!=''">#{subCategory}</if>
|
|
|
+ <if test="properties!=null">#{properties,jdbcType=OTHER,typeHandler=cn.hobbystocks.auc.mapper.handler.JsonNodeTypeHandler}</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
|
|
|
@@ -468,13 +475,42 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
<select id="selectBiddingLotList" resultMap="LotResult">
|
|
|
select id, goods_id, auction_id, name, num, unit, imgs, detail, pub_status, pub_time, status, start_time, end_time, real_end_time, rule_type, rule_content, last_price, last_price_time, deal_price, deal_time, deal_account_id, deal_account, paid, bid_count, bid_persion_count, del_flag, create_by, create_time, update_by, update_time, sort,
|
|
|
- carousel_imgs,merchant_id,merchant_name,merchant_avatar,goods_name,goods_type,private_domain,delay_publish,pub_status,group_id,deposit,service_tariff,pay_time_limit
|
|
|
+ carousel_imgs,merchant_id,merchant_name,merchant_avatar,goods_name,goods_type,private_domain,delay_publish,pub_status,group_id,deposit,service_tariff,pay_time_limit,category,subCategory,properties
|
|
|
from
|
|
|
lot
|
|
|
where
|
|
|
status in ('Waiting','Starting','Bidding') and del_flag <> 1 and pub_status = 1
|
|
|
- and start_time is not null and end_time is not null
|
|
|
order by start_time
|
|
|
</select>
|
|
|
|
|
|
+ <select id="queryLotListByCategory" resultMap="LotResult" parameterType="lot">
|
|
|
+ select id, goods_id, auction_id, name, num, unit, imgs, detail, pub_status, pub_time, status, start_time, end_time, real_end_time, rule_type, rule_content, last_price, last_price_time, deal_price, deal_time, deal_account_id, deal_account, paid, bid_count, bid_persion_count, del_flag, create_by, create_time, update_by, update_time, sort,
|
|
|
+ carousel_imgs,merchant_id,merchant_name,merchant_avatar,goods_name,goods_type,private_domain,delay_publish,pub_status,group_id,deposit,service_tariff,pay_time_limit,category,sub_category,properties
|
|
|
+ from
|
|
|
+ lot
|
|
|
+ <where>
|
|
|
+ del_flag <> 1 and pub_status = 1
|
|
|
+ <if test="category!=null and category!=''">
|
|
|
+ and category=#{category}
|
|
|
+ </if>
|
|
|
+ <if test="subCategory!=null and subCategory!=''">
|
|
|
+ and sub_category=#{subCategory}
|
|
|
+ </if>
|
|
|
+ <if test="searchValue!=null and searchValue!=''">
|
|
|
+ and name like concat('%',#{searchValue},'%')
|
|
|
+ </if>
|
|
|
+ <if test="status==1">
|
|
|
+ and status in ('Starting','Bidding')
|
|
|
+ </if>
|
|
|
+ <if test="status==2">
|
|
|
+ and status ='Waiting'
|
|
|
+ </if>
|
|
|
+ <if test="status==3">
|
|
|
+ and status ='Sold'
|
|
|
+ </if>
|
|
|
+ <if test="status==4">
|
|
|
+ and now()+ interval '1 hour'>end_time and status in ('Starting','Bidding')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
</mapper>
|