DDD in real project 4 activity template
Wed, Mar 1, 2023
One-minute read
DDD in real project
-
model
-
vo
- 活动账单(库存、状态、日期、个人参与次数)
- ActivityBillVO
- 活动信息配置
- ActivityVO
- 变更活动状态对象
- AlterStateVO
- 奖品信息配置
- AwardVO
- 策略详情配置
- StrategyDetailVO
- 策略信息配置
- StrategyVO
-
req
- 活动配置请求对象
- ActivityConfigReq
- activityId
- activityConfigRich
- 参与活动请求
- PartakeReq
- String uId
- activityId
- Date partakeDate
-
res
- 活动参与结果
- PartakeResult extends Result
- Long strategyId
-
aggregates
- 活动配置聚合信息
- ActivityConfigRich
- ActivityVO
- StrategyVO
- list
list
-
-
repository
- IActivityRepository 活动仓库服务(活动表、奖品表、策略表、策略明细表)
- IUserTakeActivityRepository 用户参与活动仓储接口
-
service
-
deploy
-
部署活动配置接口
-
IActivityDelpoy
- createActivity(ActivityConfigReq req)
- updateActivity(ActivityConfigReq req)
-
impl
@Resource private IActivityRepository activityRepository; @Transactional(rollbackFor = Exception.class) // 添加活动配置 // 添加奖品配置 // 添加策略配置 // 添加策略明细配置
-
-
partake
- 抽奖活动参与接口
- IActivityPartake
- PartakeResult doPartake(PartakeReq req)
- 活动领取模操作,一些通用的数据服务
- ActivityPartakeSupport
@Resource protected IActivityRepository activityRepository; protected ActivityBillVO queryActivityBill(PartakeReq req){ return activityRepository.queryActivityBill(req);
- 活动领取模板抽象类
- BaseActivityPartake extends ActivityPartakeSupport implements IActivityPartake
-
stateflow
-