| | |
| | | |
| | | import com.ks.lucky.exception.LuckyActivityException; |
| | | import com.ks.lucky.exception.LuckyActivityJoinAssistException; |
| | | import com.ks.lucky.pojo.DO.ActivityJoinAssistEvent; |
| | | import com.ks.lucky.pojo.DO.LuckyActivityJoinAssist; |
| | | import com.ks.lucky.pojo.DTO.ActivityAssistFriend; |
| | | import com.ks.lucky.pojo.DTO.ActivityFriendAssistInfo; |
| | | import io.lettuce.core.dynamic.annotation.Param; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * 活动助力 |
| | | * |
| | | * @param activityId |
| | | * @param appKey |
| | | * @param appId |
| | | * @param uid |
| | | * @param targetUid |
| | | * @throws LuckyActivityJoinAssistException |
| | | */ |
| | | public void assist(Long activityId, String appKey, String uid, String targetUid) throws LuckyActivityException, LuckyActivityJoinAssistException; |
| | | public void assist(@NotNull Long activityId, @NotEmpty Long appId, @NotEmpty String uid, @NotEmpty String targetUid, @NotNull ActivityJoinAssistEvent eventKey, int weight) throws LuckyActivityException, LuckyActivityJoinAssistException; |
| | | |
| | | |
| | | /** |
| | | * 是否已经助力过 |
| | | * |
| | | * @param joinId |
| | | * @param appId |
| | | * @param uid |
| | | * @param eventKey |
| | | * @return |
| | | */ |
| | | public boolean isAssisted(@NotNull Long joinId, @NotNull Long appId, @NotEmpty String uid, @NotNull ActivityJoinAssistEvent eventKey); |
| | | |
| | | |
| | | /** |
| | | * 获取助力记录 |
| | | * |
| | | * @param joinId |
| | | * @param appId |
| | | * @param uid |
| | | * @param eventKey |
| | | * @return |
| | | */ |
| | | public LuckyActivityJoinAssist getRecord(@NotNull Long joinId, @NotNull Long appId, @NotEmpty String uid, @NotNull ActivityJoinAssistEvent eventKey); |
| | | |
| | | |
| | | /** |
| | | * 获取助力列表 |
| | | * |
| | | * @param activityId |
| | | * @param appKey |
| | | * @param appId |
| | | * @param uid |
| | | * @param page |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | public List<LuckyActivityJoinAssist> getAssistRecordList(Long activityId, String appKey, String uid, int page, int pageSize); |
| | | public List<LuckyActivityJoinAssist> getAssistRecordList(Long activityId, Long appId, String uid, int page, int pageSize); |
| | | |
| | | |
| | | /** |
| | | * 助力列表计数 |
| | | * |
| | | * @param activityId |
| | | * @param appKey |
| | | * @param appId |
| | | * @param uid |
| | | * @return |
| | | */ |
| | | public long countAssistRecord(Long activityId, String appKey, String uid); |
| | | public long countAssistRecord(Long activityId, Long appId, String uid); |
| | | |
| | | |
| | | /** |
| | | * 获取助力好友 |
| | | * |
| | | * @param appId |
| | | * @param targetUid |
| | | * @param page |
| | | * @param pageSize |
| | | */ |
| | | public List<ActivityAssistFriend> getAssistFriendsList(Long appId, String targetUid, int page, int pageSize); |
| | | |
| | | /** |
| | | * 获取助力好友数量 |
| | | * |
| | | * @param appId |
| | | * @param targetUid |
| | | */ |
| | | public long countAssistFriends(Long appId, String targetUid); |
| | | |
| | | |
| | | /** |
| | | * 获取活动的助力信息 |
| | | * |
| | | * @param activityId |
| | | * @param appId |
| | | * @param uid |
| | | * @param page |
| | | * @param pageSize |
| | | * @return |
| | | */ |
| | | public List<ActivityFriendAssistInfo> getActivityFriendAssistInfoList(Long activityId, Long appId, String uid, int page, int pageSize); |
| | | |
| | | long countyActivityFriendAssistInfo(Long activityId, Long appId, String uid); |
| | | |
| | | |
| | | } |