Skip to content

Commit

Permalink
feat:《大营销平台系统设计实现》 - 营销服务 第22节:用户行为返利入账
Browse files Browse the repository at this point in the history
  • Loading branch information
fuzhengwei committed May 1, 2024
1 parent a4cce0f commit 56e62f2
Show file tree
Hide file tree
Showing 6 changed files with 36 additions and 0 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
title: 第22节:用户行为返利入账
pay: https://t.zsxq.com/ICv9z
---

# 《大营销平台系统设计实现》 - 营销服务 第22节:用户行为返利入账

作者:小傅哥
<br/>博客:[https://bugstack.cn](https://bugstack.cn)

>沉淀、分享、成长,让自己和他人都能有所收获!😄
- **本章难度**:★★★☆☆
- **本章重点**:开发用户行为返利功能,实现入账和异步消息发送。
- **课程视频**https://t.zsxq.com/19fVwshWT](https://t.zsxq.com/19fVwshWT)

**版权说明**:©本项目与星球签约合作,受[《中华人民共和国著作权法实施条例》](http://www.gov.cn/zhengce/2020-12/26/content_5573623.htm) 版权法保护,禁止任何理由和任何方式公开(public)源码、资料、视频等内容到Github、Gitee等,违反可追究进一步的法律行动。

## 一、本章诉求

按照用户行为返利的需求设计,创建相应的库表,开发 rebate 返利领域,提供返利订单创建接口。并在写入订单后发送 MQ 消息。后续则处理奖励入账。

## 二、业务流程

用户的行为动作返利,是一种日常的活动类型。比如;你在某个平台创建了新账号,就会给你发一堆的开户优惠券,这些都是日常的返利活动。

日常的返利会根据用户所完成的行为动作来触达,这包括;打卡、签到、连签、支付、开户、交易、信贷、拉新等各类的动作。我们本节中所涉及的,主要是日常的日历签到行为,并也从功能实现上扩展出各类型的任务,以便于后续扩展。

<div align="center">
<img src="https://bugstack.cn/images/article/project/big-market/big-market-31-01.png" width="950px">
</div>

- 一个用户行为可能会给多种奖励,所以在接收到用户信息后,会根据配置组装聚合对象。【聚合的目的就是为了做一个统一的事务】
- 一个聚合对象中包含了返利的订单实体对象,写入task的实体对象。它们是一个事务入库。
- 另外是发送MQ消息,在完成入口动作后,会直接发送MQ消息,并且如果发送失败,会有任务兜底。【这样是面试中经常问到的点,如果MQ消息发送失败了,你是怎么处理的。】

0 comments on commit 56e62f2

Please sign in to comment.