This commit is contained in:
777
2026-01-22 00:00:06 +08:00
parent 7598710f54
commit e64478b8ab
2 changed files with 9 additions and 1 deletions

View File

@@ -106,6 +106,7 @@ public class PointManager {
if(checkPointIncr.isAllowPoint()){
User user = userService.getById(userId);
User inviteUser = userService.getById(inviteUserId);
accountMapper.incrPoint(user.getId(), checkPointIncr.getGivePoint());
PointChangeLog pointChangeLog = new PointChangeLog();
pointChangeLog.setUserId(userId);
pointChangeLog.setUsercode(user.getUsercode());
@@ -122,6 +123,9 @@ public class PointManager {
pointChangeLog.setTraceLinkType(PointChangeTraceTypeEnum.INVITE.getCode());
pointChangeLog.setTraceId(traceId);
pointChangeLogService.save(pointChangeLog);
String redisKey = getRedisKey(user.getId());
RAtomicLong atomicLong = redissonClient.getAtomicLong(redisKey);
atomicLong.addAndGet(checkPointIncr.getGivePoint());
}
}
@@ -165,6 +169,7 @@ public class PointManager {
if(checkPointIncr.isAllowPoint()){ // 参与积分
User user = userService.getById(userId);
User inviteUser = userService.getById(inviteUserId);
accountMapper.incrPoint(user.getId(), checkPointIncr.getGivePoint());
PointChangeLog pointChangeLog = new PointChangeLog();
pointChangeLog.setUserId(userId);
pointChangeLog.setUsercode(user.getUsercode());
@@ -181,6 +186,9 @@ public class PointManager {
pointChangeLog.setTraceLinkType(PointChangeTraceTypeEnum.INVITE.getCode());
pointChangeLog.setTraceId(traceId);
pointChangeLogService.save(pointChangeLog);
String redisKey = getRedisKey(user.getId());
RAtomicLong atomicLong = redissonClient.getAtomicLong(redisKey);
atomicLong.addAndGet(checkPointIncr.getGivePoint());
}
}

View File

@@ -125,7 +125,7 @@ public class RestTemplateUtil {
headers.add(entry.getKey(),entry.getValue());
}
HttpEntity<Object> request = new HttpEntity<>(object, headers);
return restTemplate.postForObject(url, request, String.class);
return NO_SSL_REST_TEMPLATE.postForObject(url, request, String.class);
}