From 153dc8751edbeec20a4c32f29bdc57558b3688dd Mon Sep 17 00:00:00 2001
From: zhanghb <740323835@qq.com>
Date: Sat, 22 Feb 2025 15:59:12 +0800
Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=9B=B4=E6=96=B0=E5=8F=91?=
=?UTF-8?q?=E5=B1=95=E5=9F=BA=E9=87=91=E3=80=81=E4=B8=AA=E4=BA=BA=E9=92=B1?=
=?UTF-8?q?=E5=8C=85=E4=B8=9A=E5=8A=A1=E9=80=BB=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
mall-admin/pom.xml | 1 +
.../mall/mapper/UmsDevelopmentFundMapper.java | 7 ++++
.../buy507/mall/model/UmsDevelopmentFund.java | 32 +++++++++++++++++++
.../model/UmsMemberAccountTransaction.java | 12 +++++++
.../controller/UmsMemberController.java | 10 +++++-
.../mall/portal/dao/MyWalletMapper.java | 4 +--
.../mall/portal/service/UmsMemberService.java | 7 ++++
.../impl/MemberPointsSplitProfitService.java | 7 ++++
.../impl/MemberSplitProfitService.java | 9 ++++++
.../service/impl/UmsMemberServiceImpl.java | 15 ++++++---
.../mall/portal/vo/TransactionCashVo.java | 6 +++-
.../mall/portal/vo/TransactionPointsVo.java | 6 +++-
.../src/main/resources/dao/HomeDao.xml | 12 +++----
13 files changed, 113 insertions(+), 15 deletions(-)
diff --git a/mall-admin/pom.xml b/mall-admin/pom.xml
index b6422fd..f9ec056 100644
--- a/mall-admin/pom.xml
+++ b/mall-admin/pom.xml
@@ -66,6 +66,7 @@
org.projectlombok
lombok
true
+ 1.18.20
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 adc6f04..ee33f15 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
@@ -43,6 +43,13 @@ public interface UmsDevelopmentFundMapper {
*/
@Update("update ums_development_fund set cash_total = cash_total + #{fundCash}")
void updateCash(BigDecimal fundCash);
+
+ /**
+ * 发展基金
+ * @return
+ */
+ @Select("select id, cash_total, points_total, updated_at from ums_development_fund")
+ UmsDevelopmentFund selectAll();
}
diff --git a/mall-dao/src/main/java/com/buy507/mall/model/UmsDevelopmentFund.java b/mall-dao/src/main/java/com/buy507/mall/model/UmsDevelopmentFund.java
index 3186e89..56f721d 100644
--- a/mall-dao/src/main/java/com/buy507/mall/model/UmsDevelopmentFund.java
+++ b/mall-dao/src/main/java/com/buy507/mall/model/UmsDevelopmentFund.java
@@ -36,6 +36,38 @@ public class UmsDevelopmentFund implements Serializable {
*/
private Date updatedAt;
+ public Integer getPointsTotal() {
+ return pointsTotal;
+ }
+
+ public void setPointsTotal(Integer pointsTotal) {
+ this.pointsTotal = pointsTotal;
+ }
+
+ public Integer getId() {
+ return id;
+ }
+
+ public void setId(Integer id) {
+ this.id = id;
+ }
+
+ public BigDecimal getCashTotal() {
+ return cashTotal;
+ }
+
+ public void setCashTotal(BigDecimal cashTotal) {
+ this.cashTotal = cashTotal;
+ }
+
+ public Date getUpdatedAt() {
+ return updatedAt;
+ }
+
+ public void setUpdatedAt(Date updatedAt) {
+ this.updatedAt = updatedAt;
+ }
+
@Override
public String toString() {
return "UmsDevelopmentFund{" +
diff --git a/mall-dao/src/main/java/com/buy507/mall/model/UmsMemberAccountTransaction.java b/mall-dao/src/main/java/com/buy507/mall/model/UmsMemberAccountTransaction.java
index 5650077..ce0edf0 100644
--- a/mall-dao/src/main/java/com/buy507/mall/model/UmsMemberAccountTransaction.java
+++ b/mall-dao/src/main/java/com/buy507/mall/model/UmsMemberAccountTransaction.java
@@ -44,6 +44,17 @@ public class UmsMemberAccountTransaction implements Serializable {
@ApiModelProperty(value = "进账积分")
private Integer revenuePoints;
+ public Integer getFlowType() {
+ return flowType;
+ }
+
+ public void setFlowType(Integer flowType) {
+ this.flowType = flowType;
+ }
+
+ @ApiModelProperty(value = "流水类型")
+ private Integer flowType;
+
private static final long serialVersionUID = 1L;
public Long getId() {
@@ -139,6 +150,7 @@ public class UmsMemberAccountTransaction implements Serializable {
", createTime=" + createTime +
", transferPaymentTime=" + transferPaymentTime +
", revenuePoints=" + revenuePoints +
+ ", flowType=" + flowType +
'}';
}
}
\ No newline at end of file
diff --git a/mall-portal/src/main/java/com/buy507/mall/portal/controller/UmsMemberController.java b/mall-portal/src/main/java/com/buy507/mall/portal/controller/UmsMemberController.java
index 3afe48d..23dfb34 100644
--- a/mall-portal/src/main/java/com/buy507/mall/portal/controller/UmsMemberController.java
+++ b/mall-portal/src/main/java/com/buy507/mall/portal/controller/UmsMemberController.java
@@ -1,6 +1,7 @@
package com.buy507.mall.portal.controller;
import com.buy507.mall.common.api.CommonResult;
+import com.buy507.mall.model.UmsDevelopmentFund;
import com.buy507.mall.portal.domain.*;
import com.buy507.mall.portal.service.UmsMemberService;
import io.swagger.annotations.Api;
@@ -89,7 +90,14 @@ public class UmsMemberController {
MemberInfoResult result = memberService.getMemberInfo();
return CommonResult.success(result);
}
-
+
+ @ApiOperation("获取发展基金")
+ @RequestMapping(value = "/getDevelopmentFund", method = RequestMethod.GET)
+ @ResponseBody
+ public CommonResult getDevelopmentFund() {
+ UmsDevelopmentFund result = memberService.getDevelopmentFund();
+ return CommonResult.success(result);
+ }
@ApiOperation("修改会员昵称")
@RequestMapping(value = "/updateMemberNickname", method = RequestMethod.POST)
diff --git a/mall-portal/src/main/java/com/buy507/mall/portal/dao/MyWalletMapper.java b/mall-portal/src/main/java/com/buy507/mall/portal/dao/MyWalletMapper.java
index a142017..2711dd1 100644
--- a/mall-portal/src/main/java/com/buy507/mall/portal/dao/MyWalletMapper.java
+++ b/mall-portal/src/main/java/com/buy507/mall/portal/dao/MyWalletMapper.java
@@ -25,7 +25,7 @@ public interface MyWalletMapper {
* @return
*/
@Select("SELECT revenue_amount, remarks, transfer_payment_time FROM ums_member_account_transaction " +
- "WHERE ums_member_account_transaction.member_id = #{userId} ORDER BY transfer_payment_time DESC")
+ "WHERE member_id = #{userId} And flow_type = 1 ORDER BY transfer_payment_time DESC")
List getCashFlow(Long userId);
/**
@@ -42,6 +42,6 @@ public interface MyWalletMapper {
* @return
*/
@Select("SELECT revenue_points, remarks, transfer_payment_time FROM ums_member_account_transaction " +
- "WHERE ums_member_account_transaction.member_id = #{userId} ORDER BY transfer_payment_time DESC")
+ "WHERE member_id = #{userId} And flow_type = 2 ORDER BY transfer_payment_time DESC")
List getPointsFlow(Long userId);
}
diff --git a/mall-portal/src/main/java/com/buy507/mall/portal/service/UmsMemberService.java b/mall-portal/src/main/java/com/buy507/mall/portal/service/UmsMemberService.java
index 5037269..0e1ead1 100644
--- a/mall-portal/src/main/java/com/buy507/mall/portal/service/UmsMemberService.java
+++ b/mall-portal/src/main/java/com/buy507/mall/portal/service/UmsMemberService.java
@@ -3,6 +3,7 @@ package com.buy507.mall.portal.service;
import java.util.List;
import java.util.Map;
+import com.buy507.mall.model.UmsDevelopmentFund;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestParam;
@@ -185,4 +186,10 @@ public interface UmsMemberService {
* @return
*/
CommonResult