| | |
| | | import com.ks.lucky.exception.LuckyActivityException; |
| | | import com.ks.lucky.exception.LuckyActivityJoinException; |
| | | import com.ks.lucky.pojo.DO.LuckyActivityJoinRecord; |
| | | import com.ks.lucky.pojo.DTO.JoinInfo; |
| | | import com.ks.lucky.pojo.DTO.*; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 活动参与记录服务 |
| | |
| | | * 参与活动 |
| | | * |
| | | * @param activityId |
| | | * @param appKey |
| | | * @param appId |
| | | * @param uid |
| | | * @param weight |
| | | * @param joinInfo |
| | | * @throws LuckyActivityException |
| | | * @throws LuckyActivityJoinException |
| | | */ |
| | | public void join(Long activityId, String appKey, String uid, JoinInfo joinInfo) throws LuckyActivityException, LuckyActivityJoinException; |
| | | public void join(@NotNull Long activityId, @NotNull Long appId, @NotEmpty String uid, Integer weight, JoinInfo joinInfo,int userType) throws LuckyActivityException, LuckyActivityJoinException; |
| | | |
| | | |
| | | /** |
| | | * 获取参与信息 |
| | | * |
| | | * @param activityId |
| | | * @param appKey |
| | | * @param appId |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public LuckyActivityJoinRecord getJoinInfo(Long activityId, String appKey, String uid); |
| | | public LuckyActivityJoinRecord getJoinInfo(Long activityId, Long appId, String uid); |
| | | |
| | | |
| | | /** |
| | | * 获取参加记录 |
| | | * |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public LuckyActivityJoinRecord getJoinRecord(Long id); |
| | | |
| | | |
| | | /** |
| | | * 获取还未开奖的活动列表 |
| | | * |
| | | * @param uid |
| | | * @param page |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | public List<Long> getUnOpenActivityIdList(Long appId, String uid, int page, int pageSize); |
| | | |
| | | public long countUnOpenActivityIdList(Long appId, String uid); |
| | | |
| | | |
| | | /** |
| | | * 获取未中奖的活动ID |
| | | * |
| | | * @param uid |
| | | * @param page |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | public List<Long> getUnDrawnActivityIdList(Long appId, String uid, int page, int pageSize); |
| | | |
| | | public long countUnDrawnActivityIdList(Long appId, String uid); |
| | | |
| | | /** |
| | | * 获取最近的参与人信息 |
| | | * |
| | | * @param activityId |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<ActivitySimpleUser> getRecentJoinerList(Long activityId, int count); |
| | | |
| | | /** |
| | | * 批量获取活动最近的参与人信息 |
| | | * |
| | | * @param activityIdList |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<ActivitySimpleUser> getRecentJoinerList(List<Long> activityIdList, int count); |
| | | |
| | | |
| | | /** |
| | | * 获取活动的参与者列表(根据参与时间先后排序) |
| | | * |
| | | * @param activityId |
| | | * @param page |
| | | * @param count |
| | | * @return |
| | | */ |
| | | public List<ActivitySimpleUser> getJoinerList(Long activityId,Integer userType, int page, int count); |
| | | |
| | | |
| | | /** |
| | | * 获取参与者的数量 |
| | | * @param activityId |
| | | * @return |
| | | */ |
| | | public long countJoiner(Long activityId,Integer userType); |
| | | |
| | | /** |
| | | * 活动参与者统计信息 |
| | | * |
| | | * @param activityId |
| | | * @param appId |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public ActivityJoinStatisticInfo getActivityJoinerStatisticInfo(Long activityId, Long appId, String uid); |
| | | |
| | | |
| | | /** |
| | | * 获取活动中奖概率统计信息 |
| | | * |
| | | * @param activityId |
| | | * @param appId |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public ActivityDrawnProbabilityStatistic getActivityDrawnProbabilityStatistic(Long activityId, Long appId, String uid); |
| | | |
| | | |
| | | /** |
| | | * 获取排行榜 |
| | | * |
| | | * @param activityId |
| | | * @param page |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | public List<ActivityJoinerRankInfo> getWeightRankList(Long activityId, int page, int pageSize); |
| | | |
| | | |
| | | /** |
| | | * 排行榜数量 |
| | | * |
| | | * @param activityId |
| | | * @return |
| | | */ |
| | | public long countWeightRank(Long activityId); |
| | | |
| | | |
| | | /** |
| | | * 获取我的排行 |
| | | * |
| | | * @param activityId |
| | | * @param appId |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public ActivityJoinerRankInfo getMyWeightRank(Long activityId, Long appId, String uid); |
| | | |
| | | } |