送券任务新增活动ID字段
This commit is contained in:
parent
ac482db250
commit
bb67a73d64
@ -33,10 +33,13 @@ public class SpinsTaskRestController {
|
|||||||
* @return 任务列表
|
* @return 任务列表
|
||||||
*/
|
*/
|
||||||
@GetMapping("/list")
|
@GetMapping("/list")
|
||||||
public List<SpinsTaskCO> getTaskList(AppExtCommand cmd) {
|
public List<SpinsTaskCO> getTaskList(AppExtCommand cmd, @RequestParam(required = false) Long activityId) {
|
||||||
Long userId = cmd.getReqUserId();
|
Long userId = cmd.getReqUserId();
|
||||||
log.info("获取用户任务列表, userId={}", userId);
|
log.info("获取用户任务列表, userId={}", userId);
|
||||||
List<SpinsTaskCO> taskList = spinsTaskService.getUserTaskList(userId);
|
if (activityId == null) {
|
||||||
|
activityId = 2006671533988298666L;
|
||||||
|
}
|
||||||
|
List<SpinsTaskCO> taskList = spinsTaskService.getUserTaskList(userId, activityId);
|
||||||
return taskList;
|
return taskList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -39,11 +39,12 @@ public class SpinsTaskQueryExe {
|
|||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 任务列表
|
* @return 任务列表
|
||||||
*/
|
*/
|
||||||
public List<SpinsTaskCO> execute(Long userId) {
|
public List<SpinsTaskCO> execute(Long userId, Long activityId) {
|
||||||
// 1. 查询所有启用的任务配置
|
// 1. 查询所有启用的任务配置
|
||||||
List<SpinsTaskConfig> taskConfigs = spinsTaskConfigDAO.selectList(
|
List<SpinsTaskConfig> taskConfigs = spinsTaskConfigDAO.selectList(
|
||||||
new LambdaQueryWrapper<SpinsTaskConfig>()
|
new LambdaQueryWrapper<SpinsTaskConfig>()
|
||||||
.eq(SpinsTaskConfig::getStatus, 1)
|
.eq(SpinsTaskConfig::getStatus, 1)
|
||||||
|
.eq(SpinsTaskConfig::getLotteryActivityId, activityId)
|
||||||
.orderByAsc(SpinsTaskConfig::getSortOrder)
|
.orderByAsc(SpinsTaskConfig::getSortOrder)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
@ -69,8 +69,9 @@ public class SpinsTaskReceiveRewardExe {
|
|||||||
// 1. 查询任务配置
|
// 1. 查询任务配置
|
||||||
List<SpinsTaskConfig> spinsTaskConfigs = spinsTaskConfigDAO.selectList(
|
List<SpinsTaskConfig> spinsTaskConfigs = spinsTaskConfigDAO.selectList(
|
||||||
new LambdaQueryWrapper<SpinsTaskConfig>()
|
new LambdaQueryWrapper<SpinsTaskConfig>()
|
||||||
.eq(SpinsTaskConfig::getTaskCode, taskCode)
|
|
||||||
.eq(SpinsTaskConfig::getStatus, 1)
|
.eq(SpinsTaskConfig::getStatus, 1)
|
||||||
|
.eq(SpinsTaskConfig::getLotteryActivityId, activityId)
|
||||||
|
.eq(SpinsTaskConfig::getTaskCode, taskCode)
|
||||||
);
|
);
|
||||||
|
|
||||||
if (spinsTaskConfigs.isEmpty()) {
|
if (spinsTaskConfigs.isEmpty()) {
|
||||||
|
|||||||
@ -29,9 +29,9 @@ public class SpinsTaskServiceImpl implements SpinsTaskService {
|
|||||||
private final SpinsTaskReceiveRewardExe spinsTaskReceiveRewardExe;
|
private final SpinsTaskReceiveRewardExe spinsTaskReceiveRewardExe;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<SpinsTaskCO> getUserTaskList(Long userId) {
|
public List<SpinsTaskCO> getUserTaskList(Long userId, Long activityId) {
|
||||||
log.info("执行获取用户任务列表, userId={}", userId);
|
log.info("执行获取用户任务列表, userId={}", userId);
|
||||||
return spinsTaskQueryExe.execute(userId);
|
return spinsTaskQueryExe.execute(userId, activityId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@ -20,7 +20,7 @@ public interface SpinsTaskService {
|
|||||||
* @param userId 用户ID
|
* @param userId 用户ID
|
||||||
* @return 任务列表
|
* @return 任务列表
|
||||||
*/
|
*/
|
||||||
List<SpinsTaskCO> getUserTaskList(Long userId);
|
List<SpinsTaskCO> getUserTaskList(Long userId, Long activityId);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 领取任务奖励
|
* 领取任务奖励
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user