Browse Source

Merge branch 'sprint/S1' into develop

develop
董书康 1 year ago
parent
commit
1fbeb7b66f
1 changed files with 6 additions and 7 deletions
  1. +6
    -7
      demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java

+ 6
- 7
demo-athenaopt_backend/develop/src/main/java/com/digiwin/athena/app/service/cps/CpsQuestionGetService.java View File

@ -21,6 +21,7 @@ import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import java.util.stream.Collectors;
/**
@ -51,11 +52,10 @@ public class CpsQuestionGetService extends AbsEAIService {
if (StringUtils.isBlank(option)) {
List<CpsQuestionInfo> list = cpsQuestionInfoService.lambdaQuery().eq(CpsQuestionInfo::getStatus, 0).list();
List<Long> ids = list.stream().map(BaseMgrEntity::getId).collect(Collectors.toList());
cpsQuestionInfoService.lambdaUpdate().set(CpsQuestionInfo::getStatus, 1).in(CpsQuestionInfo::getId, ids).update();
list.forEach(o -> {
o.setStatus(1);
});
cpsQuestionInfoService.updateBatchById(list);
return buildOK("change_objects", list);
}
@ -65,10 +65,9 @@ public class CpsQuestionGetService extends AbsEAIService {
List<Long> collectIds = questionInfo.stream().map(BaseMgrEntity::getId).collect(Collectors.toList());
String status = eaiRequest.getString("status");
LambdaQueryChainWrapper<CpsQuestionInfo> lambdaQuery = cpsQuestionInfoService.lambdaQuery().in(CpsQuestionInfo::getId, collectIds);
String status = eaiRequest.getString("status");
switch (option) {
case "1":
lambdaQuery.eq(CpsQuestionInfo::getStatus1, status);


Loading…
Cancel
Save