|
|
@ -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); |
|
|
|