|
@@ -32,6 +32,12 @@
|
|
WHERE id = #{id}
|
|
WHERE id = #{id}
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
+ <update id="updateByDisplaceId">
|
|
|
|
+ UPDATE tb_displace_audit
|
|
|
|
+ SET if_deposit = #{ifDeposit}
|
|
|
|
+ WHERE displace_id = #{displaceId}
|
|
|
|
+ </update>
|
|
|
|
+
|
|
<!--更新报价结束时间-->
|
|
<!--更新报价结束时间-->
|
|
<update id="updateEndTime">
|
|
<update id="updateEndTime">
|
|
UPDATE tb_displace_audit SET end_time = #{endTime} WHERE id = #{id}
|
|
UPDATE tb_displace_audit SET end_time = #{endTime} WHERE id = #{id}
|
|
@@ -56,18 +62,18 @@
|
|
|
|
|
|
<!--查询待确认-->
|
|
<!--查询待确认-->
|
|
<select id="selectDisplaceConfirmList" resultType="com.demo.wjj.bo.DisplaceListBo">
|
|
<select id="selectDisplaceConfirmList" resultType="com.demo.wjj.bo.DisplaceListBo">
|
|
- SELECT a.id, a.displace_id displaceId, a.audit_status auditStatus, a.first_pic_url picUrl
|
|
|
|
|
|
+ SELECT a.id,a.is_kxc isKxc, a.up_type upType, a.displace_id displaceId, IFNULL(a.look_times, 0) lookTimes, a.first_pic_url picUrl, a.start_time , a.end_time startTime, a.storage,a.is_good,a.min_price,a.max_price,a.persist_price
|
|
FROM tb_displace_audit a
|
|
FROM tb_displace_audit a
|
|
JOIN tb_sales s ON a.sale_id = s.sale_id
|
|
JOIN tb_sales s ON a.sale_id = s.sale_id
|
|
- JOIN tb_digger_agent d ON d.wx_openid = s.wx_openid
|
|
|
|
- JOIN tb_deposit b ON b.da_id = d.id
|
|
|
|
WHERE
|
|
WHERE
|
|
- a.audit_status = #{auditStatus}
|
|
|
|
- AND a.agent_id = #{agentId} AND s.agent_id = #{agentId} AND s.wx_openid = #{openId}
|
|
|
|
|
|
+ a.audit_status IN ('1', '3')
|
|
|
|
+ AND a.agent_id = #{agentId}
|
|
|
|
+ AND s.wx_openid = #{openId}
|
|
AND a.state = '1'
|
|
AND a.state = '1'
|
|
- AND b.is_common='0'
|
|
|
|
- AND b.pay_status='0'
|
|
|
|
- ORDER BY a.displace_id DESC
|
|
|
|
|
|
+ AND a.is_good='2'
|
|
|
|
+ AND a.storage='1'
|
|
|
|
+ And a.if_deposit='1'
|
|
|
|
+ ORDER BY a.pub_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!--查询置换详情-->
|
|
<!--查询置换详情-->
|
|
@@ -86,11 +92,12 @@
|
|
<result column="end_time" property="endTime"/>
|
|
<result column="end_time" property="endTime"/>
|
|
<result column="time_delay" property="timeDelay"/>
|
|
<result column="time_delay" property="timeDelay"/>
|
|
<result column="min_money" property="minMoney"/>
|
|
<result column="min_money" property="minMoney"/>
|
|
|
|
+ <result column="up_type" property="upType"/>
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<!--查询置换审核-->
|
|
<!--查询置换审核-->
|
|
<select id="selectDisplaceAudit" resultMap="displaceAudit">
|
|
<select id="selectDisplaceAudit" resultMap="displaceAudit">
|
|
- SELECT a.id, a.displace_id, a.agent_id, a.audit_status, a.start_time, a.end_time, a.bail, a.time_delay, a.min_money,a.persist_price
|
|
|
|
|
|
+ SELECT a.id, a.displace_id, a.agent_id, a.audit_status, a.start_time, a.end_time, a.bail, a.time_delay, a.min_money,a.persist_price,a.up_type
|
|
FROM tb_displace_audit a
|
|
FROM tb_displace_audit a
|
|
WHERE a.state = '1' AND a.displace_id = #{displaceId}
|
|
WHERE a.state = '1' AND a.displace_id = #{displaceId}
|
|
</select>
|
|
</select>
|
|
@@ -114,6 +121,7 @@
|
|
AND a.state = '1'
|
|
AND a.state = '1'
|
|
AND a.is_good='2'
|
|
AND a.is_good='2'
|
|
AND a.storage='1'
|
|
AND a.storage='1'
|
|
|
|
+ And a.if_deposit='2'
|
|
ORDER BY a.start_time DESC
|
|
ORDER BY a.start_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -130,6 +138,7 @@
|
|
AND b.offer_times > 0
|
|
AND b.offer_times > 0
|
|
AND a.is_good='2'
|
|
AND a.is_good='2'
|
|
AND a.storage='1'
|
|
AND a.storage='1'
|
|
|
|
+ And a.if_deposit='2'
|
|
ORDER BY a.start_time DESC
|
|
ORDER BY a.start_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -146,6 +155,7 @@
|
|
AND b.displace_id=a.displace_id
|
|
AND b.displace_id=a.displace_id
|
|
AND a.is_good='2'
|
|
AND a.is_good='2'
|
|
AND a.storage='1'
|
|
AND a.storage='1'
|
|
|
|
+ And a.if_deposit='2'
|
|
ORDER BY a.start_time DESC
|
|
ORDER BY a.start_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
@@ -168,6 +178,17 @@
|
|
ORDER BY a.start_time DESC
|
|
ORDER BY a.start_time DESC
|
|
</select>
|
|
</select>
|
|
|
|
|
|
|
|
+ <select id="selectMyList" resultType="com.demo.wjj.bo.DisplaceListBo">
|
|
|
|
+ SELECT a.id,a.is_kxc isKxc, a.up_type upType, a.displace_id displaceId, IFNULL(a.look_times, 0) lookTimes, IFNULL(o.offer_times, 0) offerTimes, a.first_pic_url picUrl, a.start_time , a.end_time startTime, IFNULL(o.max_offer, a.min_money) currentPrice,a.storage,a.is_good,a.min_price,a.max_price,a.persist_price
|
|
|
|
+ FROM (
|
|
|
|
+ SELECT DISTINCT o.displace_id
|
|
|
|
+ FROM tb_offer_detail d JOIN tb_offer o ON d.offer_id = o.id
|
|
|
|
+ WHERE d.da_id = #{diggerAgentId}
|
|
|
|
+ ) t JOIN tb_displace_audit a ON t.displace_id = a.displace_id LEFT JOIN tb_offer o ON a.displace_id = o.displace_id
|
|
|
|
+ WHERE a.audit_status IN ('1', '3') AND a.state = '1' AND a.agent_id = #{agentId} and is_good='2'
|
|
|
|
+ ORDER BY a.start_time DESC
|
|
|
|
+ </select>
|
|
|
|
+
|
|
<!--我要卖精品机-->
|
|
<!--我要卖精品机-->
|
|
<select id="getDisplaceGoodSaleList" resultType="com.demo.wjj.bo.DisplaceListBo">
|
|
<select id="getDisplaceGoodSaleList" resultType="com.demo.wjj.bo.DisplaceListBo">
|
|
SELECT a.id,a.is_kxc isKxc, a.up_type upType, a.displace_id displaceId, IFNULL(a.look_times, 0) lookTimes, IFNULL(d.offer_times, 0) offerTimes, a.first_pic_url picUrl, a.start_time , a.end_time startTime, IFNULL(d.max_offer, a.min_money) currentPrice,a.storage,a.is_good,a.min_price,a.max_price,a.persist_price
|
|
SELECT a.id,a.is_kxc isKxc, a.up_type upType, a.displace_id displaceId, IFNULL(a.look_times, 0) lookTimes, IFNULL(d.offer_times, 0) offerTimes, a.first_pic_url picUrl, a.start_time , a.end_time startTime, IFNULL(d.max_offer, a.min_money) currentPrice,a.storage,a.is_good,a.min_price,a.max_price,a.persist_price
|