From d7d9b601b2e4fdb663375993e2cfbdbd363df421 Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期二, 11 七月 2023 22:17:37 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity
---
java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml b/java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml
index f6e6238..011a411 100755
--- a/java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml
+++ b/java110-db/src/main/resources/mapper/store/ResourceStoreServiceDaoImplMapper.xml
@@ -318,7 +318,7 @@
<if test="resOrderType == '20000'">
and t.stock > 0
</if>
- order by t.create_time desc,t.res_id DESC
+ order by t.res_code
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
@@ -502,8 +502,10 @@
</select>
<!-- 鏌ヨ璧勬簮淇℃伅 add by wuxw 2018-07-03 -->
<select id="queryResourceStoresTotalPrice" parameterType="Map" resultType="Map">
- select IFNULL(sum(w.stock*w.average_price),0) as totalPrice from(
- select t.stock,t.average_price from resource_store t
+ select IFNULL(sum(total_price),0) as totalPrice from(
+ select rsts.times_id,rsts.res_code,rsts.stock,rsts.price,rsts.stock*rsts.price total_price
+ from resource_store t
+ inner join resource_store_times rsts on t.res_code = rsts.res_code and rsts.status_cd = '0'
left join resource_store_type rst on t.rst_id = rst.rst_id and rst.status_cd = '0'
left join resource_store_type rst1 on t.parent_rst_id = rst1.rst_id and rst1.status_cd = '0'
left join resource_store_specification rss on t.rss_id = rss.rss_id and rss.status_cd = '0'
@@ -608,7 +610,7 @@
<if test="resOrderType == '20000'">
and t.stock > 0
</if>
- order by t.create_time desc,t.res_id DESC
+ group by rsts.times_id,rsts.res_code,rsts.stock,rsts.price
<if test="page != -1 and page != null ">
limit #{page}, #{row}
</if>
--
Gitblit v1.8.0