From fd7b8fb7c89832c28a838b0449bbb8a392433ee2 Mon Sep 17 00:00:00 2001
From: Pu Zhibing <393733352@qq.com>
Date: 星期二, 22 四月 2025 14:33:02 +0800
Subject: [PATCH] 将华为云短信替换成阿里云短信
---
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java | 31 ++++++++++++++-----------------
1 files changed, 14 insertions(+), 17 deletions(-)
diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
index 81a790b..2986881 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
@@ -54,9 +54,7 @@
@Resource
private UserPointCopyMapper userPointCopyMapper;
@Resource
- private AppUserService appUserService;
- @Resource
- private TokenService tokenService;
+ private OrderClient orderClient;
/**
@@ -131,7 +129,15 @@
}
- @DeleteMapping("/getUserPointCopy")
+
+ @DeleteMapping("/deleteUserPointCopyByIds")
+ public R deleteUserPointCopyByIds(@RequestParam("ids") List<Long> ids){
+ userPointCopyMapper.deleteBatchIds(ids);
+ return R.ok();
+ }
+
+
+ @PostMapping("/getUserPointCopy")
public R<List<UserPointCopy>> getUserPointCopy(@RequestParam("orderId") Long orderId, @RequestParam("type") List<Integer> type) {
List<UserPointCopy> list = userPointCopyMapper.selectList(new LambdaQueryWrapper<UserPointCopy>().in(UserPointCopy::getType, type)
.eq(UserPointCopy::getObjectId, orderId));
@@ -157,17 +163,11 @@
IPage<UserPoint> userPointPage = userPointService.getUserPointPage(Page.of(userPoint.getPageNum(), userPoint.getPageSize()), userPoint);
return R.ok(userPointPage);
}
- @Resource
- private OrderClient orderClient;
@GetMapping("/user/list")
@ApiOperation(value = "积分管理-用户积分明细(必传用户id)", tags = "后台")
- public R<Page<UserPoint>> userlist(UserPoint userPoint) {
- Page<UserPoint> page = userPointService.lambdaQuery()
- .eq(userPoint.getType()!=null,UserPoint::getType, userPoint.getType())
- .eq(UserPoint::getAppUserId, userPoint.getAppUserId())
- .orderByDesc(UserPoint::getCreateTime)
- .page(Page.of(userPoint.getPageNum(), userPoint.getPageSize()));
+ public R<IPage<UserPoint>> userlist(UserPoint userPoint) {
+ IPage<UserPoint> page = userPointService.getUserPointPage(Page.of(userPoint.getPageNum(), userPoint.getPageSize()), userPoint);
for (UserPoint record : page.getRecords()) {
if (record.getType()==1 || record.getType()==11){
Order data = orderClient.getOrderById(record.getObjectId()).getData();
@@ -175,13 +175,10 @@
record.setExtention(data.getOrderNumber());
}
}
- int i = record.getHistoricalPoint() - record.getBalance();
- if (i>0){
+ if (record.getChangeDirection() == -1){
record.setVariableType(2);
- }else if (i<0){
- record.setVariableType(1);
}else{
- record.setVariableType(0);
+ record.setVariableType(1);
}
}
return R.ok(page);
--
Gitblit v1.7.1