|
|
@ -16,6 +16,7 @@ import com.digiwin.athena.app.infra.service.CpsQuestionInfoService; |
|
|
|
import com.digiwin.athena.opt.common.eai.EAIRequest; |
|
|
|
import com.digiwin.athena.opt.common.eai.EAIUtil; |
|
|
|
import com.digiwin.athena.opt.common.eai.service.AbsEAIService; |
|
|
|
import com.digiwin.athena.opt.common.security.SecurityUtil; |
|
|
|
import com.digiwin.athena.opt.persistence.domain.BaseMgrEntity; |
|
|
|
import org.apache.commons.collections.MapUtils; |
|
|
|
import org.apache.commons.lang3.StringUtils; |
|
|
@ -52,10 +53,12 @@ public class CpsQuestionGetService extends AbsEAIService { |
|
|
|
|
|
|
|
String option = eaiRequest.getString("option"); |
|
|
|
|
|
|
|
Long tenantSid = SecurityUtil.getUserProfile().getTenantSid(); |
|
|
|
|
|
|
|
// 侦测 |
|
|
|
if (StringUtils.isBlank(option)) { |
|
|
|
|
|
|
|
List<CpsQuestionInfo> list = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getStatus, 0).list(); |
|
|
|
List<CpsQuestionInfo> list = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getStatus, 0).eq(CpsQuestionInfo::getTenantSid,tenantSid).list(); |
|
|
|
list.forEach(o -> { |
|
|
|
o.setStatus(1); |
|
|
|
}); |
|
|
@ -71,7 +74,7 @@ public class CpsQuestionGetService extends AbsEAIService { |
|
|
|
} |
|
|
|
|
|
|
|
List<Long> collectIds = questionInfo.stream().map(o -> MapUtils.getLong(o, "id")).collect(Collectors.toList()); |
|
|
|
LambdaQueryChainWrapper<CpsQuestionInfo> lambdaQuery = cpsQuestionInfoService.lambdaQuery().in(CpsQuestionInfo::getId, collectIds); |
|
|
|
LambdaQueryChainWrapper<CpsQuestionInfo> lambdaQuery = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getTenantSid,tenantSid).in(CpsQuestionInfo::getId, collectIds); |
|
|
|
|
|
|
|
String status = eaiRequest.getString("status"); |
|
|
|
|
|
|
|