Merge remote-tracking branch 'origin/main' into main-cx

This commit is contained in:
chenxin
2025-02-26 10:35:39 +08:00
12 changed files with 107 additions and 5 deletions

View File

@@ -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<UmsDevelopmentFund> getDevelopmentFund() {
UmsDevelopmentFund result = memberService.getDevelopmentFund();
return CommonResult.success(result);
}
@ApiOperation("修改会员昵称")
@RequestMapping(value = "/updateMemberNickname", method = RequestMethod.POST)

View File

@@ -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<TransactionCashVo> 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<TransactionPointsVo> getPointsFlow(Long userId);
}

View File

@@ -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<Map<String, Object>> personalTeam();
/**
* 查询发展基金
* @return
*/
UmsDevelopmentFund getDevelopmentFund();
}

View File

@@ -162,6 +162,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setTransactionState(UmsMemberAccountTransaction.TRANSACTION_STATE_YES);
accountTransaction.setRevenuePoints(revenuePoints);
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(2);
umsMemberAccountTransactionMapper.insert(accountTransaction);
log.info("new Account Transaction {}" , JSONUtil.toJsonStr(accountTransaction));
@@ -206,6 +207,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setRevenuePoints(pointsCommission);
//即时到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(2);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -235,6 +237,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setRevenuePoints(pointsCommission);
//即时到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(2);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -281,6 +284,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setRemarks("三级代理上级积分分润");
accountTransaction.setRevenuePoints(pointsCommission);
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(2);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -308,6 +312,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setRevenuePoints(pointsCommission);
//24小时后到账
accountTransaction.setTransferPaymentTime(DateUtil.tomorrow());
accountTransaction.setFlowType(2);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -351,6 +356,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setRevenuePoints(pointsCommission);
//24小时后到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(2);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -371,6 +377,7 @@ public class MemberPointsSplitProfitService{
accountTransaction.setMemberId(higherMember.getId());
accountTransaction.setOrderId(order.getId());
accountTransaction.setRemarks("四级市代理平级积分分润");
accountTransaction.setFlowType(2);
accountTransaction.setRevenuePoints(pointsCommission);
//会员金额到账

View File

@@ -175,6 +175,7 @@ public class MemberSplitProfitService{
accountTransaction.setRemarks("会员此订单退出队列到账");
accountTransaction.setRevenueAmount(orderQueue.getOrderAmount());
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//出局后订单状态置为2
@@ -295,6 +296,7 @@ public class MemberSplitProfitService{
accountTransaction.setRevenueAmount(higherQueue.getOrderAmount());
//即时到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//快速出局后将订单状态置为2
@@ -402,6 +404,7 @@ public class MemberSplitProfitService{
accountTransaction.setRevenueAmount(revenueAmount);
//
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
log.info("new Account Transaction {}" , JSONUtil.toJsonStr(accountTransaction));
@@ -445,6 +448,7 @@ public class MemberSplitProfitService{
accountTransaction.setRevenueAmount(payAmountPercent);
//即时到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -474,6 +478,7 @@ public class MemberSplitProfitService{
accountTransaction.setRevenueAmount(tenPercent);
//即时到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -520,6 +525,7 @@ public class MemberSplitProfitService{
accountTransaction.setRemarks("三级代理上级分润");
accountTransaction.setRevenueAmount(payAmountPercent);
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -547,6 +553,7 @@ public class MemberSplitProfitService{
accountTransaction.setRevenueAmount(tenPercent);
//24小时后到账
accountTransaction.setTransferPaymentTime(DateUtil.tomorrow());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -591,6 +598,7 @@ public class MemberSplitProfitService{
accountTransaction.setRevenueAmount(payAmountPercent);
//24小时后到账
accountTransaction.setTransferPaymentTime(DateUtil.date());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
//会员金额到账
@@ -620,6 +628,7 @@ public class MemberSplitProfitService{
//24小时后到账
accountTransaction.setTransferPaymentTime(DateUtil.tomorrow());
accountTransaction.setFlowType(1);
umsMemberAccountTransactionMapper.insert(accountTransaction);
}
}

View File

@@ -1308,6 +1308,17 @@ public class UmsMemberServiceImpl implements UmsMemberService {
return CommonResult.success(result);
}
/**
* 查询发展基金
* @return
*/
@Override
public UmsDevelopmentFund getDevelopmentFund() {
UmsDevelopmentFund developmentFund = new UmsDevelopmentFund();
developmentFund = umsDevelopmentFundMapper.selectAll();
return developmentFund;
}
private Map<String, Object> getOrderInfoByDate(DateTime begin, DateTime end, UmsMember currentMember, List<Long> teamIdList) {
Map<String, Object> infoMap = new HashMap<>();

View File

@@ -1,10 +1,13 @@
package com.buy507.mall.portal.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
@Data
@AllArgsConstructor
@@ -18,5 +21,6 @@ public class TransactionCashVo implements Serializable {
private String remarks;
//时间
private Data transferPaymentTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date transferPaymentTime;
}

View File

@@ -1,10 +1,13 @@
package com.buy507.mall.portal.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
@Data
@AllArgsConstructor
@@ -17,5 +20,6 @@ public class TransactionPointsVo implements Serializable {
private String remarks;
//时间
private Data transferPaymentTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date transferPaymentTime;
}