Commit 9fd2e622 authored by mlchun's avatar mlchun

1.用户个人信息接口

parent 391cca25
...@@ -27,7 +27,7 @@ public class SwaggerConfig { ...@@ -27,7 +27,7 @@ public class SwaggerConfig {
@Bean @Bean
public Docket createRestApi() { public Docket createRestApi() {
return new Docket(DocumentationType.SWAGGER_2) return new Docket(DocumentationType.SWAGGER_2)
// .host("byyl.zjhmit.com") .host("byyl.zjhmit.com")
.apiInfo(apiInfo()) .apiInfo(apiInfo())
.select() .select()
//加了ApiOperation注解的类,才生成接口文档 //加了ApiOperation注解的类,才生成接口文档
......
package io.hmit.controller;
import ch.qos.logback.core.pattern.ConverterUtil;
import io.hmit.annotation.Login;
import io.hmit.annotation.LoginUser;
import io.hmit.common.utils.ConvertUtils;
import io.hmit.common.utils.Result;
import io.hmit.dto.UserInfoDTO;
import io.hmit.entity.UserEntity;
import io.hmit.modules.serviceOrder.dto.PensionOrderDTO;
import io.hmit.service.UserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;
/**
* @Description :
* @Author : Shen Yuanfeng
* @Date: 2021/3/17 16:35
*/
@Slf4j
@RestController
@RequestMapping("api/user")
@Api(tags = "用户接口")
public class UserController {
@Autowired
private UserService userService;
@Login
@GetMapping("myinfo")
@ApiOperation("信息")
public Result<UserEntity> get(@ApiIgnore @LoginUser UserEntity user){
user.setPassword(null);
return new Result<UserEntity>().ok(user);
}
}
...@@ -72,7 +72,7 @@ mybatis-plus: ...@@ -72,7 +72,7 @@ mybatis-plus:
jdbc-type-for-null: 'null' jdbc-type-for-null: 'null'
QR: QR:
# download-path: D:/123/ /home/websoft/java_jar/pension_service/myfile/ # download-path: D:/123/ /home/websoft/java_jar/pension_service/myfile/
download-path: D:/123/ download-path: /home/websoft/java_jar/pension_service/myfile/
wechat: wechat:
mpAppId: wx6e3288074243a47f mpAppId: wx6e3288074243a47f
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment