Merge remote-tracking branch 'refs/remotes/origin/REQ-2324' into feature/merged_all_req
This commit is contained in:
commit
27939442b2
@ -238,11 +238,11 @@ public class PendingMessageNewController implements PendingMessageClient {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResponse<Boolean> batchSetProcessing(List<String> identityCodes) {
|
||||
public CommonResponse<Boolean> batchSetProcessing(List<String> identityCodes, List<String> subBizCodes) {
|
||||
log.info("setProcessing, request={}", JSON.toJSONString(identityCodes));
|
||||
Boolean result = null;
|
||||
try {
|
||||
result = todoManager.batchSetProcessing(identityCodes);
|
||||
result = todoManager.batchSetProcessing(identityCodes, subBizCodes);
|
||||
return CommonResponse.success(result);
|
||||
} finally {
|
||||
log.info("setProcessing. request={}, response={}", identityCodes, result);
|
||||
|
||||
@ -386,10 +386,10 @@ public class TodoManager {
|
||||
* 将待办设置为执行中
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean batchSetProcessing(List<String> identityCodes) {
|
||||
public Boolean batchSetProcessing(List<String> identityCodes, List<String> subBizCodes) {
|
||||
log.info("batch set processing...,request:{}", JSONUtil.toJsonStr(identityCodes));
|
||||
BizAssertions.assertTrue(CollectionUtils.isNotEmpty(identityCodes), "identityCodes列表不能为空");
|
||||
Boolean updated = todoDao.batchSetExecutableProcessing(identityCodes);
|
||||
Boolean updated = todoDao.batchSetExecutableProcessing(identityCodes, subBizCodes);
|
||||
if (updated) {
|
||||
List<Todo> updatedTodos = todoDao.getByIdentityCodes(identityCodes);
|
||||
TodoRequestContext ctx = TodoRequestContext.create("batchSetProcessing", identityCodes);
|
||||
|
||||
@ -274,7 +274,7 @@ public interface PendingMessageClient {
|
||||
* 批量将待办设置为处理中
|
||||
*/
|
||||
@PostMapping(value = "/pending-message/update/batchSetProcessing", produces = {MediaType.APPLICATION_JSON_VALUE})
|
||||
CommonResponse<Boolean> batchSetProcessing(@RequestBody @Valid List<String> identityCodes);
|
||||
CommonResponse<Boolean> batchSetProcessing(@RequestBody @Valid List<String> identityCodes, List<String> subBizCodes);
|
||||
|
||||
/**
|
||||
* 通过BizCode获取最新代办
|
||||
|
||||
@ -105,10 +105,14 @@ public class TodoDao extends ServiceImpl<TodoMapper, Todo> {
|
||||
return new SampleTodos(todos);
|
||||
}
|
||||
|
||||
public Boolean batchSetExecutableProcessing(List<String> identityCodes) {
|
||||
public Boolean batchSetExecutableProcessing(List<String> identityCodes, List<String> subBizCodes) {
|
||||
if (CollectionUtils.isEmpty(identityCodes) && CollectionUtils.isEmpty(subBizCodes)) {
|
||||
throw new IllegalArgumentException("identityCodes and subBizCodes can't be empty");
|
||||
}
|
||||
return lambdaUpdate()
|
||||
.eq(Todo::getType, TodoType.EXECUTABLE)
|
||||
.in(Todo::getIdentityCode, identityCodes)
|
||||
.in(CollectionUtils.isNotEmpty(identityCodes), Todo::getIdentityCode, identityCodes)
|
||||
.in(CollectionUtils.isNotEmpty(subBizCodes), Todo::getSubBizCode, subBizCodes)
|
||||
.in(Todo::getState, PendingMessageStateEnum.HAS_BEEN_SENT, PendingMessageStateEnum.PROCESSING)
|
||||
.set(Todo::getState, PendingMessageStateEnum.PROCESSING)
|
||||
.update();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user