|
|
@ -117,5 +117,35 @@ public class MqPointCallbackController { |
|
|
|
log.info("pubActiveLive consumer success,formDTO:{}", JSON.toJSONString(formList)); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
* @Description 楼院小组积分事件统一回调入口 |
|
|
|
* @param mqMsg |
|
|
|
* @return com.epmet.commons.tools.utils.Result<java.lang.Boolean> |
|
|
|
* @author wangc |
|
|
|
* @date 2020.12.23 09:33 |
|
|
|
*/ |
|
|
|
@RequestMapping("resigrouppointcallback") |
|
|
|
public Result<Boolean> resiGroupPointCallback(@RequestBody ReceiveMqMsg mqMsg){ |
|
|
|
log.debug("resi_group point event callback receive mqMsg:{}", JSON.toJSONString(mqMsg)); |
|
|
|
if (mqMsg == null || StringUtils.isBlank(mqMsg.getMsg())) { |
|
|
|
log.warn("resi_group point event mqMsg is empty"); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
List<BasePointEventMsg> formList = JSON.parseArray(mqMsg.getMsg(), BasePointEventMsg.class); |
|
|
|
|
|
|
|
try { |
|
|
|
|
|
|
|
formList.forEach(obj -> { |
|
|
|
userPointActionLogService.grantPointByEvent(obj.getEventTag(),obj); |
|
|
|
}); |
|
|
|
|
|
|
|
} catch (Exception e) { |
|
|
|
logger.error("resi_group point event callback fail", e); |
|
|
|
throw new RenException(EpmetErrorCode.SERVER_ERROR.getMsg()); |
|
|
|
} |
|
|
|
log.info("resi_group point event callback success,formDTO:{}", JSON.toJSONString(formList)); |
|
|
|
return new Result<Boolean>().ok(true); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|