|
|
@ -73,15 +73,19 @@ public class MqPointCallbackController { |
|
|
|
log.warn("registerVolunteer mqMsg is empty"); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
BasePointEventMsg formDTO = ConvertUtils.sourceToTarget(mqMsg.getMsg(), BasePointEventMsg.class); |
|
|
|
List<BasePointEventMsg> formList = JSON.parseArray(mqMsg.getMsg(), BasePointEventMsg.class); |
|
|
|
try { |
|
|
|
//TODO 调用调整积分方法去给用户加减积分 userPointActionLogService.
|
|
|
|
userPointActionLogService.grantPointByEvent(EventEnum.REGISTER_VOLUNTEER.getEventTag(),formDTO); |
|
|
|
formList.forEach(obj -> { |
|
|
|
userPointActionLogService.grantPointByEvent(EventEnum.ACTIVE_INSERT_LIVE.getEventTag(),obj); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("registerVolunteer consume fail", e); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
log.info("registerVolunteer consumer success,formDTO:{}", JSON.toJSONString(formDTO)); |
|
|
|
log.info("registerVolunteer consumer success,formDTO:{}", JSON.toJSONString(formList)); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
|
|
|
@ -98,15 +102,19 @@ public class MqPointCallbackController { |
|
|
|
log.warn("pubActiveLive mqMsg is empty"); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
BasePointEventMsg formDTO = ConvertUtils.sourceToTarget(mqMsg.getMsg(), BasePointEventMsg.class); |
|
|
|
List<BasePointEventMsg> formList = JSON.parseArray(mqMsg.getMsg(), BasePointEventMsg.class); |
|
|
|
//BasePointEventMsg formDTO = ConvertUtils.sourceToTarget(mqMsg.getMsg(), BasePointEventMsg.class);
|
|
|
|
try { |
|
|
|
//TODO 调用调整积分方法去给用户加减积分 userPointActionLogService.
|
|
|
|
userPointActionLogService.grantPointByEvent(EventEnum.ACTIVE_INSERT_LIVE.getEventTag(),formDTO); |
|
|
|
formList.forEach(obj -> { |
|
|
|
userPointActionLogService.grantPointByEvent(EventEnum.ACTIVE_INSERT_LIVE.getEventTag(),obj); |
|
|
|
}); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("pubActiveLive consume fail", e); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
log.info("pubActiveLive consumer success,formDTO:{}", JSON.toJSONString(formDTO)); |
|
|
|
log.info("pubActiveLive consumer success,formDTO:{}", JSON.toJSONString(formList)); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
} |
|
|
|