|
@ -238,17 +238,18 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
@Override |
|
|
@Override |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) { |
|
|
public PointVerificationResultDTO verifyPoint(PointVerificationFormDTO verificationParam) { |
|
|
|
|
|
PointVerificationResultDTO result = new PointVerificationResultDTO(); |
|
|
String decodedUserId = pointRedis.checkIfQrCodeExpire(verificationParam.getUserId()); |
|
|
String decodedUserId = pointRedis.checkIfQrCodeExpire(verificationParam.getUserId()); |
|
|
if(StringUtils.isNotBlank(decodedUserId)){ |
|
|
if(StringUtils.isNotBlank(decodedUserId)){ |
|
|
verificationParam.setUserId(decodedUserId); |
|
|
verificationParam.setUserId(decodedUserId); |
|
|
}else{ |
|
|
}else{ |
|
|
logger.error(String.format("用户二维码失效,参数详情 -> 【】", JSON.toJSON(verificationParam))); |
|
|
logger.error(String.format("用户二维码失效,参数详情 -> 【】", JSON.toJSON(verificationParam))); |
|
|
throw new RenException("用户二维码失效"); |
|
|
result.setSuccessFlag(false); |
|
|
|
|
|
result.setFailureReason(ModuleConstant.INVALID_USER_QRCDDE); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(new Date()); |
|
|
DimIdGenerator.DimIdBean dim = DimIdGenerator.getDimIdBean(new Date()); |
|
|
PointVerificationResultDTO result = new PointVerificationResultDTO(); |
|
|
|
|
|
ResiCommonUserIdFormDTO userId = new ResiCommonUserIdFormDTO(); |
|
|
ResiCommonUserIdFormDTO userId = new ResiCommonUserIdFormDTO(); |
|
|
userId.setUserId(verificationParam.getUserId()); |
|
|
userId.setUserId(verificationParam.getUserId()); |
|
|
ResiPointDetailResultDTO currentPoint = userPointTotalService.getMyPoint(userId); |
|
|
ResiPointDetailResultDTO currentPoint = userPointTotalService.getMyPoint(userId); |
|
@ -328,8 +329,8 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
UserPointTotalEntity userPoint = new UserPointTotalEntity(); |
|
|
UserPointTotalEntity userPoint = new UserPointTotalEntity(); |
|
|
userPoint.setUserId(verificationParam.getUserId()); |
|
|
userPoint.setUserId(verificationParam.getUserId()); |
|
|
userPoint.setCustomerId(customerId); |
|
|
userPoint.setCustomerId(customerId); |
|
|
//负数
|
|
|
//总数不变
|
|
|
userPoint.setTotalPoint(point); |
|
|
userPoint.setTotalPoint(NumConstant.ZERO); |
|
|
//负数
|
|
|
//负数
|
|
|
userPoint.setUsablePoint(point); |
|
|
userPoint.setUsablePoint(point); |
|
|
//正数
|
|
|
//正数
|
|
@ -369,7 +370,8 @@ public class PointVerificationLogServiceImpl extends BaseServiceImpl<PointVerifi |
|
|
**/ |
|
|
**/ |
|
|
@Override |
|
|
@Override |
|
|
public PointExchangeResponseResultDTO resiExchangeCallback(String userId) { |
|
|
public PointExchangeResponseResultDTO resiExchangeCallback(String userId) { |
|
|
return (PointExchangeResponseResultDTO)pointRedis.lindex(userId,NumConstant.ZERO_L); |
|
|
// return (PointExchangeResponseResultDTO)pointRedis.lindex(userId,NumConstant.ZERO_L);
|
|
|
|
|
|
return (PointExchangeResponseResultDTO)pointRedis.rpop(userId); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
/** |
|
|
/** |
|
|