提交 d23fbe1c 编写于 作者: lakernote's avatar lakernote

优化trace

上级 fc36ae62
package com.laker.admin.module.enums;
import com.baomidou.mybatisplus.annotation.EnumValue;
import lombok.Getter;
@Getter
public enum DemoTypeEnum {
START(1, "开始"), STOP(0, "暂停");
DemoTypeEnum(int code, String descp) {
this.code = code;
this.descp = descp;
}
@EnumValue//标记数据库存的值是code
private final int code;
private final String descp;
}
package com.laker.admin.module.ext.controller;
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import com.laker.admin.module.enums.DemoTypeEnum;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;
/**
* <p>
* 日志 前端控制器
* </p>
*
* @author laker
* @since 2021-08-16
*/
@Api(tags = "示例controller")// 在doc.html中的名称
@ApiSupport(order = 0, author = "laker") // 在doc.html中的顺序
@RestController
@RequestMapping("/ext/demo")
@Slf4j
public class DemoController {
@GetMapping
@ApiOperation(value = "参数数组 - querystring")
public void pageAll(@RequestParam(required = false, defaultValue = "1") long page,
@RequestParam(required = false, defaultValue = "10") long limit,
@RequestParam(required = false) List<DemoTypeEnum> types) {
log.info(types.toString());
}
}
\ No newline at end of file
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册