diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java index ffb8ca3fb..a9cfa0aae 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeNewlyweds/controller/ActiveNewlywedsRecordsController.java @@ -4,12 +4,15 @@ package com.fuint.business.marketingActivity.activeNewlyweds.controller; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; import com.baomidou.mybatisplus.extension.api.ApiController; import com.baomidou.mybatisplus.extension.api.R; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.fuint.business.marketingActivity.activeNewlyweds.controller.vo.ActiveNewlywedsVO; import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlyweds; import com.fuint.business.marketingActivity.activeNewlyweds.entity.ActiveNewlywedsRecords; import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsRecordsService; +import com.fuint.business.marketingActivity.activeNewlyweds.service.ActiveNewlywedsService; import com.fuint.common.dto.AccountInfo; import com.fuint.common.util.TokenUtil; import com.fuint.framework.web.BaseController; @@ -35,6 +38,8 @@ public class ActiveNewlywedsRecordsController extends BaseController { */ @Resource private ActiveNewlywedsRecordsService activeNewlywedsRecordsService; + @Resource + private ActiveNewlywedsService activeNewlywedsService; /** * 分页查询所有数据 @@ -58,8 +63,19 @@ public class ActiveNewlywedsRecordsController extends BaseController { */ @GetMapping("applet") public ResponseObject isJoined(@Param("activeNewlywedsRecords") ActiveNewlywedsRecords activeNewlywedsRecords) { + + //在线活动 + LambdaQueryWrapper queryWrapper1 = new LambdaQueryWrapper<>(); + queryWrapper1.eq(ActiveNewlyweds::getStoreId,activeNewlywedsRecords.getStoreId()); + queryWrapper1.eq(ActiveNewlyweds::getStatus,0); + ActiveNewlyweds activeNewlyweds = activeNewlywedsService.getOne(queryWrapper1); + if (ObjectUtils.isEmpty(activeNewlyweds)){ + return getFailureResult("0"); + } + //活动记录 LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); queryWrapper.eq(ActiveNewlywedsRecords::getUserId,TokenUtil.getNowAccountInfo().getId()); + queryWrapper.eq(ActiveNewlywedsRecords::getActiveNewlywedsId,activeNewlyweds.getId()); List list = this.activeNewlywedsRecordsService.list(queryWrapper); if (list.size() == 0){ return getSuccessResult("1");