对齐 boot 与 cloud 的代码
This commit is contained in:
parent
0feb865ef0
commit
9ba06ec07e
@ -14,8 +14,8 @@ import cn.iocoder.yudao.framework.operatelog.core.service.OperateLog;
|
||||
import cn.iocoder.yudao.framework.operatelog.core.service.OperateLogFrameworkService;
|
||||
import cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils;
|
||||
import com.google.common.collect.Maps;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import io.swagger.v3.oas.annotations.Operation;
|
||||
import io.swagger.v3.oas.annotations.tags.Tag;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
@ -73,11 +73,13 @@ public interface BpmTaskConvert {
|
||||
|
||||
BpmTaskDonePageItemRespVO convert2(HistoricTaskInstance bean);
|
||||
|
||||
@Mappings({@Mapping(source = "processInstance.id", target = "id"),
|
||||
@Mappings({
|
||||
@Mapping(source = "processInstance.id", target = "id"),
|
||||
@Mapping(source = "processInstance.name", target = "name"),
|
||||
@Mapping(source = "processInstance.startUserId", target = "startUserId"),
|
||||
@Mapping(source = "processInstance.processDefinitionId", target = "processDefinitionId"),
|
||||
@Mapping(source = "startUser.nickname", target = "startUserNickname")})
|
||||
@Mapping(source = "startUser.nickname", target = "startUserNickname")
|
||||
})
|
||||
BpmTaskTodoPageItemRespVO.ProcessInstance convert(ProcessInstance processInstance, AdminUserRespDTO startUser);
|
||||
|
||||
default List<BpmTaskRespVO> convertList3(List<HistoricTaskInstance> tasks,
|
||||
|
@ -220,11 +220,11 @@ public class BpmTaskAssignRuleServiceImpl implements BpmTaskAssignRuleService {
|
||||
} else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.POST.getType())) {
|
||||
postApi.validPostList(options);
|
||||
} else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER.getType())) {
|
||||
adminUserApi.validUserList(options);
|
||||
adminUserApi.validateUserList(options);
|
||||
} else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.USER_GROUP.getType())) {
|
||||
userGroupService.validUserGroups(options);
|
||||
} else if (Objects.equals(type, BpmTaskAssignRuleTypeEnum.SCRIPT.getType())) {
|
||||
dictDataApi.validateDictDatas(DictTypeConstants.TASK_ASSIGN_SCRIPT,
|
||||
dictDataApi.validateDictDataList(DictTypeConstants.TASK_ASSIGN_SCRIPT,
|
||||
CollectionUtils.convertSet(options, String::valueOf));
|
||||
} else {
|
||||
throw new IllegalArgumentException(format("未知的规则类型({})", type));
|
||||
|
@ -15,7 +15,6 @@ import org.junit.jupiter.api.Test;
|
||||
import org.springframework.context.annotation.Import;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime;
|
||||
|
@ -25,7 +25,7 @@ public interface DictDataApi {
|
||||
@Parameter(name = "dictType", description = "字典类型", example = "SEX", required = true),
|
||||
@Parameter(name = "descriptions", description = "字典数据值的数组", example = "1,2", required = true)
|
||||
})
|
||||
CommonResult<Boolean> validateDictDatas(@RequestParam("dictType") String dictType,
|
||||
CommonResult<Boolean> validateDictDataList(@RequestParam("dictType") String dictType,
|
||||
@RequestParam("values") Collection<String> values);
|
||||
|
||||
@GetMapping(PREFIX + "/get")
|
||||
|
@ -55,6 +55,6 @@ public interface AdminUserApi {
|
||||
@GetMapping(PREFIX + "/valid")
|
||||
@Operation(summary = "校验用户们是否有效")
|
||||
@Parameter(name = "ids", description = "用户编号数组", example = "3,5", required = true)
|
||||
CommonResult<Boolean> validUserList(@RequestParam("ids") Set<Long> ids);
|
||||
CommonResult<Boolean> validateUserList(@RequestParam("ids") Set<Long> ids);
|
||||
|
||||
}
|
||||
|
@ -24,7 +24,7 @@ public class DictDataApiImpl implements DictDataApi {
|
||||
private DictDataService dictDataService;
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> validateDictDatas(String dictType, Collection<String> values) {
|
||||
public CommonResult<Boolean> validateDictDataList(String dictType, Collection<String> values) {
|
||||
dictDataService.validateDictDataList(dictType, values);
|
||||
return success(true);
|
||||
}
|
||||
|
@ -51,7 +51,7 @@ public class AdminUserApiImpl implements AdminUserApi {
|
||||
}
|
||||
|
||||
@Override
|
||||
public CommonResult<Boolean> validUserList(Set<Long> ids) {
|
||||
public CommonResult<Boolean> validateUserList(Set<Long> ids) {
|
||||
userService.validateUserList(ids);
|
||||
return success(true);
|
||||
}
|
||||
|
@ -27,7 +27,8 @@ public interface AuthConvert {
|
||||
|
||||
default AuthPermissionInfoRespVO convert(AdminUserDO user, List<RoleDO> roleList, List<MenuDO> menuList) {
|
||||
return AuthPermissionInfoRespVO.builder()
|
||||
.user(AuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).nickname(user.getNickname()).avatar(user.getAvatar()).build())
|
||||
.user(AuthPermissionInfoRespVO.UserVO.builder().id(user.getId()).nickname(user.getNickname())
|
||||
.avatar(user.getAvatar()).build())
|
||||
.roles(convertSet(roleList, RoleDO::getCode))
|
||||
.permissions(convertSet(menuList, MenuDO::getPermission))
|
||||
.build();
|
||||
|
@ -17,8 +17,8 @@ import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
import static cn.hutool.core.util.RandomUtil.randomEle;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildBetweenTime;
|
||||
import static cn.iocoder.yudao.framework.common.util.date.LocalDateTimeUtils.buildTime;
|
||||
import static cn.iocoder.yudao.framework.common.util.object.ObjectUtils.cloneIgnoreId;
|
||||
import static cn.iocoder.yudao.framework.test.core.util.AssertUtils.assertPojoEquals;
|
||||
import static cn.iocoder.yudao.framework.test.core.util.RandomUtils.*;
|
||||
|
Loading…
Reference in New Issue
Block a user