用户信息查询

This commit is contained in:
2026-02-10 15:45:36 +08:00
parent cd7f5661de
commit b6aecf4e64
5 changed files with 74 additions and 14 deletions
@@ -376,7 +376,6 @@ public class UserPointsServiceImpl extends ServiceImpl<UserPointsMapper, UserPoi
@Override
public boolean testUpdateUserPoints(UpdUserPointsDTO dto) {
LoginUser loginUser = GlobalUtils.getLoginUser();
List<String> sysUserIds = iSysBaseAPI.findSysUserIds(new SysUser());
List<LoginUser> loginUsers = iSysBaseAPI.listUserByIdsNew(sysUserIds);
loginUsers.forEach(user -> {
@@ -477,7 +476,8 @@ public class UserPointsServiceImpl extends ServiceImpl<UserPointsMapper, UserPoi
ExceptionAssertsUtil.fail("用户积分不存在");
}
userPoints.setDeductPointsSum(userPoints.getDeductPointsSum().add(dto.getPoints()));
userPoints.setPoints(userPoints.getPoints().subtract(dto.getPoints()));
BigDecimal subtract = userPoints.getPoints().subtract(dto.getPoints());
userPoints.setPoints(subtract.compareTo(BigDecimal.valueOf(0)) < 0 ? BigDecimal.valueOf(0) : subtract);
userPointsDetails.setPoints(dto.getPoints());
userPointsDetails.setRemark(dto.getRemark());
userPointsDetails.setSource(sourceEnum.getSource());
@@ -524,7 +524,7 @@ public class UserPointsServiceImpl extends ServiceImpl<UserPointsMapper, UserPoi
wrapper.between(UserPointsDetails::getCreateTime, startOfDay, endOfDay);
c = userPointsDetailsMapper.selectCount(wrapper);
if (c > 0) {
ExceptionAssertsUtil.fail("日已获得该积分");
ExceptionAssertsUtil.fail("日已获得该积分");
}
break;
// 周/次:检查用户本周是否已经获得过该积分
@@ -564,7 +564,7 @@ public class UserPointsServiceImpl extends ServiceImpl<UserPointsMapper, UserPoi
wrapper.between(UserPointsDetails::getCreateTime, startOfYear, endOfYear);
c = userPointsDetailsMapper.selectCount(wrapper);
if (c > 0) {
ExceptionAssertsUtil.fail("本年已获得该积分");
ExceptionAssertsUtil.fail("本年已获得该积分");
}
break;
default: