修复 swagger 接口文档不展示的问题

This commit is contained in:
YunaiV 2022-02-04 00:07:35 +08:00
parent f2f36bd617
commit 4890cf05de
62 changed files with 72 additions and 67 deletions

View File

@ -8,6 +8,7 @@ import org.springframework.boot.context.properties.EnableConfigurationProperties
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpHeaders;
import springfox.documentation.RequestHandler;
import springfox.documentation.builders.ApiInfoBuilder;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.service.ApiInfo;
@ -23,6 +24,7 @@ import springfox.documentation.swagger2.annotations.EnableSwagger2;
import java.util.Collections;
import java.util.List;
import java.util.function.Predicate;
import static springfox.documentation.builders.RequestHandlerSelectors.basePackage;
@ -56,6 +58,7 @@ public class YudaoSwaggerAutoConfiguration {
// 设置扫描指定 package 包下的
.select()
.apis(basePackage(properties.getBasePackage()))
// .apis(basePackage("cn.iocoder.yudao.module.infra")) // 可用于 swagger 无法展示时使用
.paths(PathSelectors.any())
.build()
.securitySchemes(securitySchemes())

View File

@ -19,7 +19,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "动态表单")
@Api(tags = "管理后台 - 动态表单")
@RestController
@RequestMapping("/bpm/form")
@Validated

View File

@ -23,7 +23,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "用户组")
@Api(tags = "管理后台 - 用户组")
@RestController
@RequestMapping("/bpm/user-group")
@Validated

View File

@ -6,7 +6,7 @@ import io.swagger.annotations.*;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("动态表单创建 Request VO")
@ApiModel("管理后台 - 动态表单创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -7,7 +7,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("动态表单分页 Request VO")
@ApiModel("管理后台 - 动态表单分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotNull;
import java.util.Date;
import java.util.List;
@ApiModel("动态表单 Response VO")
@ApiModel("管理后台 - 动态表单 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -4,7 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ApiModel("流程表单精简 Response VO")
@ApiModel("管理后台 - 流程表单精简 Response VO")
@Data
public class BpmFormSimpleRespVO {

View File

@ -5,7 +5,7 @@ import io.swagger.annotations.*;
import javax.validation.constraints.*;
import java.util.List;
@ApiModel("动态表单更新 Request VO")
@ApiModel("管理后台 - 动态表单更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -3,7 +3,7 @@ package cn.iocoder.yudao.module.bpm.controller.admin.definition.vo.group;
import lombok.*;
import io.swagger.annotations.*;
@ApiModel("用户组创建 Request VO")
@ApiModel("管理后台 - 用户组创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -11,7 +11,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import java.util.Date;
@ApiModel("用户组分页 Request VO")
@ApiModel("管理后台 - 用户组分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -4,7 +4,7 @@ import lombok.*;
import java.util.*;
import io.swagger.annotations.*;
@ApiModel("用户组 Response VO")
@ApiModel("管理后台 - 用户组 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -6,7 +6,7 @@ import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
@ApiModel("用户组精简信息 Response VO")
@ApiModel("管理后台 - 用户组精简信息 Response VO")
@Data
@NoArgsConstructor
@AllArgsConstructor

View File

@ -4,7 +4,7 @@ import lombok.*;
import io.swagger.annotations.*;
import javax.validation.constraints.*;
@ApiModel("用户组更新 Request VO")
@ApiModel("管理后台 - 用户组更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -9,7 +9,7 @@ import org.springframework.web.multipart.MultipartFile;
import javax.validation.constraints.NotNull;
@ApiModel(value = "流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
@ApiModel(value = "管理后台 - 流程模型的导入 Request VO", description = "相比流程模型的新建来说,只是多了一个 bpmnFile 文件")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import javax.validation.constraints.NotEmpty;
@ApiModel("流程模型的创建 Request VO")
@ApiModel("管理后台 - 流程模型的创建 Request VO")
@Data
public class BpmModelCreateReqVO {

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import java.util.Date;
@ApiModel("流程模型的分页的每一项 Response VO")
@ApiModel("管理后台 - 流程模型的分页的每一项 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -8,11 +8,11 @@ import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("流程模型分页 Request VO")
@ApiModel("管理后台 - 流程模型分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class ModelPageReqVO extends PageParam {
public class BpmModelPageReqVO extends PageParam {
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")
private String key;

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import java.util.Date;
@ApiModel("流程模型的创建 Request VO")
@ApiModel("管理后台 - 流程模型的创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -6,7 +6,7 @@ import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ApiModel("流程模型的更新 Request VO")
@ApiModel("管理后台 - 流程模型的更新 Request VO")
@Data
public class BpmModelUpdateReqVO {

View File

@ -6,7 +6,7 @@ import lombok.Data;
import javax.validation.constraints.NotNull;
@ApiModel("流程模型更新状态 Request VO")
@ApiModel("管理后台 - 流程模型更新状态 Request VO")
@Data
public class BpmModelUpdateStateReqVO {

View File

@ -7,10 +7,10 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程定义列表 Request VO")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel("流程定义列表 Request VO")
public class BpmProcessDefinitionListReqVO extends PageParam {
@ApiModelProperty(value = "中断状态", example = "1", notes = "参见 SuspensionState 枚举")

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import java.util.Date;
@ApiModel("流程定义的分页的每一项 Response VO")
@ApiModel("管理后台 - 流程定义的分页的每一项 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -7,10 +7,10 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("管理后台 - 流程定义分页 Request VO")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
@ApiModel("流程定义分页 Request VO")
public class BpmProcessDefinitionPageReqVO extends PageParam {
@ApiModelProperty(value = "标识", example = "process1641042089407", notes = "精准匹配")

View File

@ -8,7 +8,7 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.List;
@ApiModel("流程定义 Response VO")
@ApiModel("管理后台 - 流程定义 Response VO")
@Data
public class BpmProcessDefinitionRespVO {

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import javax.validation.constraints.NotEmpty;
@ApiModel("流程任务分配规则的创建 Request VO")
@ApiModel("管理后台 - 流程任务分配规则的创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -6,7 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("流程任务分配规则的 Response VO")
@ApiModel("管理后台 - 流程任务分配规则的 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import javax.validation.constraints.NotNull;
@ApiModel("流程任务分配规则的更新 Request VO")
@ApiModel("管理后台 - 流程任务分配规则的更新 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -27,7 +27,7 @@ import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUti
* @author jason
* @author 芋道源码
*/
@Api(tags = "OA 请假申请")
@Api(tags = "管理后台 - OA 请假申请")
@RestController
@RequestMapping("/bpm/oa/leave")
@Validated

View File

@ -7,7 +7,7 @@ import lombok.ToString;
import javax.validation.constraints.AssertTrue;
@ApiModel("请假申请创建 Request VO")
@ApiModel("管理后台 - 请假申请创建 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -8,7 +8,7 @@ import org.springframework.format.annotation.DateTimeFormat;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("请假申请分页 Request VO")
@ApiModel("管理后台 - 请假申请分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -9,7 +9,7 @@ import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("请假申请 Response VO")
@ApiModel("管理后台 - 请假申请 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -6,7 +6,7 @@ import lombok.Data;
import java.util.Date;
@ApiModel("流程活动的 Response VO")
@ApiModel("管理后台 - 流程活动的 Response VO")
@Data
public class BpmActivityRespVO {

View File

@ -8,7 +8,7 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
@ApiModel("流程实例的取消 Request VO")
@ApiModel("管理后台 - 流程实例的取消 Request VO")
@Data
public class BpmProcessInstanceCancelReqVO {

View File

@ -7,7 +7,7 @@ import lombok.Data;
import javax.validation.constraints.NotEmpty;
import java.util.Map;
@ApiModel("流程实例的创建 Request VO")
@ApiModel("管理后台 - 流程实例的创建 Request VO")
@Data
public class BpmProcessInstanceCreateReqVO {

View File

@ -12,7 +12,7 @@ import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("流程实例的分页 Item Response VO")
@ApiModel("管理后台 - 流程实例的分页 Item Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -7,7 +7,7 @@ import lombok.Data;
import java.util.Date;
import java.util.List;
@ApiModel("流程实例的分页 Item Response VO")
@ApiModel("管理后台 - 流程实例的分页 Item Response VO")
@Data
public class BpmProcessInstancePageItemRespVO {

View File

@ -8,7 +8,7 @@ import java.util.Date;
import java.util.List;
import java.util.Map;
@ApiModel("流程实例的 Response VO")
@ApiModel("管理后台 - 流程实例的 Response VO")
@Data
public class BpmProcessInstanceRespVO {

View File

@ -10,7 +10,7 @@ import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import java.util.Map;
@ApiModel("通过流程任务的 Request VO")
@ApiModel("管理后台 - 通过流程任务的 Request VO")
@Data
public class BpmTaskApproveReqVO {

View File

@ -8,7 +8,7 @@ import lombok.ToString;
import java.util.Date;
@ApiModel("流程任务的 Done 已完成的分页项 Response VO")
@ApiModel("管理后台 - 流程任务的 Done 已完成的分页项 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -12,7 +12,7 @@ import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("流程任务的 Done 已办的分页 Request VO")
@ApiModel("管理后台 - 流程任务的 Done 已办的分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -6,7 +6,7 @@ import lombok.Data;
import javax.validation.constraints.NotEmpty;
@ApiModel("不通过流程任务的 Request VO")
@ApiModel("管理后台 - 不通过流程任务的 Request VO")
@Data
public class BpmTaskRejectReqVO {

View File

@ -6,7 +6,7 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
@ApiModel("流程任务的 Response VO")
@ApiModel("管理后台 - 流程任务的 Response VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -6,7 +6,7 @@ import lombok.Data;
import java.util.Date;
@ApiModel("流程任务的 Running 进行中的分页项 Response VO")
@ApiModel("管理后台 - 流程任务的 Running 进行中的分页项 Response VO")
@Data
public class BpmTaskTodoPageItemRespVO {

View File

@ -12,7 +12,7 @@ import java.util.Date;
import static cn.iocoder.yudao.framework.common.util.date.DateUtils.FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND;
@ApiModel("流程任务的 TODO 待办的分页 Request VO")
@ApiModel("管理后台 - 流程任务的 TODO 待办的分页 Request VO")
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)

View File

@ -10,7 +10,7 @@ import net.bytebuddy.implementation.bind.annotation.Empty;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
@ApiModel("流程任务的更新负责人的 Request VO")
@ApiModel("管理后台 - 流程任务的更新负责人的 Request VO")
@Data
public class BpmTaskUpdateAssigneeReqVO {

View File

@ -19,7 +19,7 @@ import java.io.IOException;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "流程模型")
@Api(tags = "管理后台 - 流程模型")
@RestController
@RequestMapping("/bpm/model")
@Validated
@ -30,7 +30,7 @@ public class BpmModelController {
@GetMapping("/page")
@ApiOperation(value = "获得模型分页")
public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(ModelPageReqVO pageVO) {
public CommonResult<PageResult<BpmModelPageItemRespVO>> getModelPage(BpmModelPageReqVO pageVO) {
return success(bpmModelService.getModelPage(pageVO));
}

View File

@ -23,7 +23,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "流程定义")
@Api(tags = "管理后台 - 流程定义")
@RestController
@RequestMapping("/bpm/process-definition")
@Validated

View File

@ -19,7 +19,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "任务分配规则")
@Api(tags = "管理后台 - 任务分配规则")
@RestController
@RequestMapping("/bpm/task-assign-rule")
@Validated

View File

@ -22,7 +22,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
@Api(tags = "流程活动实例")
@Api(tags = "管理后台 - 流程活动实例")
@RestController
@RequestMapping("/bpm/activity")
@Validated
@ -34,7 +34,7 @@ public class BpmActivityController {
@GetMapping("/list")
@ApiOperation(value = "生成指定流程实例的高亮流程图",
notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成")
@ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public CommonResult<List<BpmActivityRespVO>> getActivityList(
@RequestParam("processInstanceId") String processInstanceId) {
@ -44,7 +44,7 @@ public class BpmActivityController {
@GetMapping("/generate-highlight-diagram")
@ApiOperation(value = "生成指定流程实例的高亮流程图",
notes = "只高亮进行中的任务。不过要注意,该接口暂时没用,通过前端的 ProcessViewer.vue 界面的 highlightDiagram 方法生成")
@ApiImplicitParam(name = "id", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@ApiImplicitParam(name = "processInstanceId", value = "流程实例的编号", required = true, dataTypeClass = String.class)
@PreAuthorize("@ss.hasPermission('bpm:task:query')")
public void generateHighlightDiagram(@RequestParam("processInstanceId") String processInstanceId,
HttpServletResponse response) throws IOException {

View File

@ -17,7 +17,7 @@ import javax.validation.Valid;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.security.core.util.SecurityFrameworkUtils.getLoginUserId;
@Api(tags = "流程实例") // 流程实例通过流程定义创建的一次申请
@Api(tags = "管理后台 - 流程实例") // 流程实例通过流程定义创建的一次申请
@RestController
@RequestMapping("/bpm/process-instance")
@Validated

View File

@ -18,7 +18,7 @@ import java.util.List;
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
import static cn.iocoder.yudao.framework.web.core.util.WebFrameworkUtils.getLoginUserId;
@Api(tags = "流程任务实例")
@Api(tags = "管理后台 - 流程任务实例")
@RestController
@RequestMapping("/bpm/task")
@Validated

View File

@ -19,7 +19,7 @@ public interface BpmModelService {
* @param pageVO 分页查询
* @return 流程模型分页
*/
PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO);
PageResult<BpmModelPageItemRespVO> getModelPage(BpmModelPageReqVO pageVO);
/**
* 获得流程模块

View File

@ -60,7 +60,7 @@ public class BpmModelServiceImpl implements BpmModelService {
private BpmTaskAssignRuleService taskAssignRuleService;
@Override
public PageResult<BpmModelPageItemRespVO> getModelPage(ModelPageReqVO pageVO) {
public PageResult<BpmModelPageItemRespVO> getModelPage(BpmModelPageReqVO pageVO) {
ModelQuery modelQuery = repositoryService.createModelQuery();
if (StrUtil.isNotBlank(pageVO.getKey())) {
modelQuery.modelKey(pageVO.getKey());

View File

@ -155,7 +155,7 @@ public class PayAppController {
@ApiOperation("根据商户 ID 查询支付应用信息")
@ApiImplicitParam(name = "merchantId", value = "商户ID", required = true, example = "1", dataTypeClass = Long.class)
@PreAuthorize("@ss.hasPermission('pay:merchant:query')")
public CommonResult<List<PayAppRespVO>> getMerchantListByName(@RequestParam String merchantId) {
public CommonResult<List<PayAppRespVO>> getMerchantListByName(@RequestParam Long merchantId) {
List<PayAppDO> appListDO = appService.getListByMerchantId(merchantId);
return success(PayAppConvert.INSTANCE.convertList(appListDO));
}

View File

@ -77,7 +77,7 @@ public class PayMerchantController {
@GetMapping("/list-by-name")
@ApiOperation("根据商户名称获得支付商户信息列表")
@ApiImplicitParam(name = "name", value = "商户名称", example = "芋道", dataTypeClass = Long.class)
@ApiImplicitParam(name = "name", value = "商户名称", example = "芋道", dataTypeClass = String.class)
@PreAuthorize("@ss.hasPermission('pay:merchant:query')")
public CommonResult<List<PayMerchantRespVO>> getMerchantListByName(@RequestParam(required = false) String name) {
List<PayMerchantDO> merchantListDO = merchantService.getMerchantListByName(name);

View File

@ -39,7 +39,7 @@ public interface PayAppMapper extends BaseMapperX<PayAppDO> {
.orderByDesc("id"));
}
default List<PayAppDO> getListByMerchantId(String merchantId) {
default List<PayAppDO> getListByMerchantId(Long merchantId) {
return selectList(new LambdaQueryWrapper<PayAppDO>()
.select(PayAppDO::getId, PayAppDO::getName)
.eq(PayAppDO::getMerchantId, merchantId));

View File

@ -89,7 +89,7 @@ public interface PayAppService {
* @param merchantId 商户 ID
* @return 支付应用信息列表
*/
List<PayAppDO> getListByMerchantId(String merchantId);
List<PayAppDO> getListByMerchantId(Long merchantId);
/**
* 获得指定编号的商户 Map

View File

@ -136,7 +136,7 @@ public class PayAppServiceImpl implements PayAppService {
}
@Override
public List<PayAppDO> getListByMerchantId(String merchantId) {
public List<PayAppDO> getListByMerchantId(Long merchantId) {
return appMapper.getListByMerchantId(merchantId);
}

View File

@ -29,7 +29,7 @@ public class SmsCallbackController {
@PostMapping("/sms/yunpian")
@ApiOperation(value = "云片短信的回调", notes = "参见 https://www.yunpian.com/official/document/sms/zh_cn/domestic_push_report 文档")
@ApiImplicitParam(name = "sms_status", value = "发送状态", required = true, example = "[{具体内容}]", dataTypeClass = Long.class)
@ApiImplicitParam(name = "sms_status", value = "发送状态", required = true, example = "[{具体内容}]", dataTypeClass = String.class)
@OperateLog(enable = false)
public String receiveYunpianSmsStatus(@RequestParam("sms_status") String smsStatus) throws Throwable {
String text = URLUtil.decode(smsStatus); // decode 解码参数因为它被 encode

View File

@ -34,7 +34,7 @@ public class TenantController {
@GetMapping("/get-id-by-name")
@ApiOperation(value = "使用租户名,获得租户编号", notes = "登录界面,根据用户的租户名,获得租户编号")
@ApiImplicitParam(name = "name", value = "租户名", required = true, example = "芋道源码", dataTypeClass = Long.class)
@ApiImplicitParam(name = "name", value = "租户名", required = true, example = "1024", dataTypeClass = Long.class)
public CommonResult<Long> getTenantIdByName(@RequestParam("name") String name) {
TenantDO tenantDO = tenantService.getTenantByName(name);
return success(tenantDO != null ? tenantDO.getId() : null);
@ -57,7 +57,7 @@ public class TenantController {
@DeleteMapping("/delete")
@ApiOperation("删除租户")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@ApiImplicitParam(name = "id", value = "编号", required = true, example = "1024", dataTypeClass = Long.class)
@PreAuthorize("@ss.hasPermission('system:tenant:delete')")
public CommonResult<Boolean> deleteTenant(@RequestParam("id") Long id) {
tenantService.deleteTenant(id);

View File

@ -51,7 +51,8 @@ public class TestDemoController {
@DeleteMapping("/delete")
@ApiOperation("删除字典类型")
@ApiImplicitParam(name = "id", value = "编号", required = true, dataTypeClass = Long.class)
@PreAuthorize("@ss.hasPermission('tool:test-demo:delete')") public CommonResult<Boolean> deleteTestDemo(@RequestParam("id") Long id) {
@PreAuthorize("@ss.hasPermission('tool:test-demo:delete')")
public CommonResult<Boolean> deleteTestDemo(@RequestParam("id") Long id) {
testDemoService.deleteTestDemo(id);
return success(true);
}
@ -68,7 +69,8 @@ public class TestDemoController {
@GetMapping("/list")
@ApiOperation("获得字典类型列表")
@ApiImplicitParam(name = "ids", value = "编号列表", required = true, example = "1024,2048", dataTypeClass = List.class)
@PreAuthorize("@ss.hasPermission('tool:test-demo:query')") public CommonResult<List<TestDemoRespVO>> getTestDemoList(@RequestParam("ids") Collection<Long> ids) {
@PreAuthorize("@ss.hasPermission('tool:test-demo:query')")
public CommonResult<List<TestDemoRespVO>> getTestDemoList(@RequestParam("ids") Collection<Long> ids) {
List<TestDemoDO> list = testDemoService.getTestDemoList(ids);
return success(TestDemoConvert.INSTANCE.convertList(list));
}

View File

@ -61,7 +61,7 @@ yudao:
title: 管理后台
description: 提供管理员管理的所有功能
version: ${yudao.info.version}
base-package: ${yudao.info.base-package}.modules
base-package: ${yudao.info.base-package}
captcha:
timeout: 5m
width: 160