From dfba7801e208b41223890ae63d86428afda66a91 Mon Sep 17 00:00:00 2001
From: zhanghb <740323835@qq.com>
Date: Tue, 18 Feb 2025 13:42:07 +0800
Subject: [PATCH] =?UTF-8?q?=E5=8F=91=E5=B1=95=E5=9F=BA=E9=87=91=E7=9B=B8?=
=?UTF-8?q?=E5=85=B3=E5=AE=9E=E7=8E=B0=E4=BF=AE=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../buy507/mall/mapper/OmsOrderMapper.java | 4 +-
.../mall/mapper/UmsDevelopmentFundMapper.java | 26 +-
.../com/buy507/mall/mapper/OmsOrderMapper.xml | 62 +-
.../impl/OmsPortalOrderServiceImpl.java | 2789 +++++++++--------
4 files changed, 1468 insertions(+), 1413 deletions(-)
diff --git a/mall-dao/src/main/java/com/buy507/mall/mapper/OmsOrderMapper.java b/mall-dao/src/main/java/com/buy507/mall/mapper/OmsOrderMapper.java
index 24e4801..f2cbdad 100644
--- a/mall-dao/src/main/java/com/buy507/mall/mapper/OmsOrderMapper.java
+++ b/mall-dao/src/main/java/com/buy507/mall/mapper/OmsOrderMapper.java
@@ -3,6 +3,8 @@ package com.buy507.mall.mapper;
import com.buy507.mall.model.OmsOrder;
import com.buy507.mall.model.OmsOrderExample;
import java.util.List;
+
+import com.buy507.mall.model.PmsProduct;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
@@ -31,4 +33,4 @@ public interface OmsOrderMapper {
int updateByPrimaryKey(OmsOrder record);
- int selectPointsAreaStatus(@Param("orderSn") String orderSn);}
\ No newline at end of file
+ PmsProduct selectPointsAreaStatus(@Param("orderSn") String orderSn);}
\ No newline at end of file
diff --git a/mall-dao/src/main/java/com/buy507/mall/mapper/UmsDevelopmentFundMapper.java b/mall-dao/src/main/java/com/buy507/mall/mapper/UmsDevelopmentFundMapper.java
index 8521bd1..adc6f04 100644
--- a/mall-dao/src/main/java/com/buy507/mall/mapper/UmsDevelopmentFundMapper.java
+++ b/mall-dao/src/main/java/com/buy507/mall/mapper/UmsDevelopmentFundMapper.java
@@ -3,6 +3,7 @@ package com.buy507.mall.mapper;
import com.buy507.mall.model.UmsDevelopmentFund;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
+import org.apache.ibatis.annotations.Update;
import java.math.BigDecimal;
@@ -18,29 +19,30 @@ public interface UmsDevelopmentFundMapper {
* 查询现金总和
* @return
*/
- @Select("SELECT SUM(cash_total) FROM ums_development_fund")
+ @Select("SELECT cash_total FROM ums_development_fund")
BigDecimal getTotalCash();
/**
* 查询积分总和
* @return
*/
- @Select("SELECT SUM(points_total) FROM ums_development_fund")
+ @Select("SELECT points_total FROM ums_development_fund")
Integer getTotalPoints();
- /**
- * 发展基金现金流水
- * @param payAmount
- */
- @Insert("INSERT INTO ums_development_fund (cash_total, updated_at) VALUES (#{payAmount}, NOW())")
- void insertCash(BigDecimal payAmount);
/**
- * 发展基金积分流水
- * @param rewardPoints
+ * 更新积分
+ * @param fundPoints
*/
- @Insert("INSERT INTO ums_development_fund (points_total, updated_at) VALUES (#{rewardPoints}, NOW())")
- void insertPoints(BigDecimal rewardPoints);
+ @Update("update ums_development_fund set points_total = points_total + #{fundPoints}")
+ void updatePoints(int fundPoints);
+
+ /**
+ * 更新现金
+ * @param fundCash
+ */
+ @Update("update ums_development_fund set cash_total = cash_total + #{fundCash}")
+ void updateCash(BigDecimal fundCash);
}
diff --git a/mall-dao/src/main/resources/com/buy507/mall/mapper/OmsOrderMapper.xml b/mall-dao/src/main/resources/com/buy507/mall/mapper/OmsOrderMapper.xml
index 8b06498..5122113 100644
--- a/mall-dao/src/main/resources/com/buy507/mall/mapper/OmsOrderMapper.xml
+++ b/mall-dao/src/main/resources/com/buy507/mall/mapper/OmsOrderMapper.xml
@@ -50,8 +50,7 @@
-
-
+
@@ -875,13 +874,56 @@
where id = #{id,jdbcType=BIGINT}
-