parent
7f2c6fd73e
commit
dd66f95337
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,21 @@
|
|||||||
|
package com.luojia_channel.common.config;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.models.info.Info;
|
||||||
|
import io.swagger.v3.oas.models.OpenAPI;
|
||||||
|
import org.springframework.context.annotation.Bean;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class OpenApiConfig {
|
||||||
|
@Bean
|
||||||
|
public OpenAPI customOpenAPI() {
|
||||||
|
return new OpenAPI()
|
||||||
|
.info(new Info()
|
||||||
|
.title("珞珈岛API文档")
|
||||||
|
.version("1.0")
|
||||||
|
.description("API文档")
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1,10 +1,15 @@
|
|||||||
package com.luojia_channel.modules.post.dto.req;
|
package com.luojia_channel.modules.post.dto.req;
|
||||||
|
|
||||||
import com.luojia_channel.common.domain.page.PageRequest;
|
import com.luojia_channel.common.domain.page.PageRequest;
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@Schema(title = "分页查询评论请求DTO")
|
||||||
public class CommentPageQueryDTO extends PageRequest {
|
public class CommentPageQueryDTO extends PageRequest {
|
||||||
|
@Schema(title = "帖子ID")
|
||||||
private Long postId;
|
private Long postId;
|
||||||
|
|
||||||
|
@Schema(title = "评论ID")
|
||||||
private Long commentId;
|
private Long commentId;
|
||||||
}
|
}
|
||||||
|
@ -1,20 +1,65 @@
|
|||||||
package com.luojia_channel.modules.post.dto.resp;
|
package com.luojia_channel.modules.post.dto.resp;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@Schema(description = "帖子基本信息")
|
||||||
public class PostBasicInfoDTO {
|
public class PostBasicInfoDTO {
|
||||||
|
@Schema(
|
||||||
|
description = "帖子ID"
|
||||||
|
)
|
||||||
private Long id;
|
private Long id;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "帖子封面图"
|
||||||
|
)
|
||||||
private String image;
|
private String image;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "帖子标题",
|
||||||
|
required = true,
|
||||||
|
minLength = 3,
|
||||||
|
maxLength = 16,
|
||||||
|
example = "帖子标题三个字"
|
||||||
|
)
|
||||||
private String title;
|
private String title;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "点赞数"
|
||||||
|
)
|
||||||
private Integer likeCount;
|
private Integer likeCount;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "评论数"
|
||||||
|
)
|
||||||
private Integer commentCount;
|
private Integer commentCount;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "收藏数"
|
||||||
|
)
|
||||||
private Integer favoriteCount;
|
private Integer favoriteCount;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "是否点赞,1-已点赞,0-未点赞",
|
||||||
|
allowableValues = {"0", "1"},
|
||||||
|
example = "1",
|
||||||
|
implementation = Boolean.class
|
||||||
|
)
|
||||||
private Boolean isLike;
|
private Boolean isLike;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "对应的用户ID"
|
||||||
|
)
|
||||||
private Long userId;
|
private Long userId;
|
||||||
|
|
||||||
// 对于匿名的帖子,下述字段进行了处理,如匿名默认名称,头像
|
// 对于匿名的帖子,下述字段进行了处理,如匿名默认名称,头像
|
||||||
|
@Schema(
|
||||||
|
description = "匿名情况下用户名"
|
||||||
|
)
|
||||||
private String userName;
|
private String userName;
|
||||||
|
@Schema(
|
||||||
|
description = "匿名情况下用户头像"
|
||||||
|
)
|
||||||
private String userAvatar;
|
private String userAvatar;
|
||||||
}
|
}
|
||||||
|
@ -1,11 +1,22 @@
|
|||||||
package com.luojia_channel.modules.user.dto;
|
package com.luojia_channel.modules.user.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@Schema(description = "用户登录DTO")
|
||||||
public class UserLoginDTO {
|
public class UserLoginDTO {
|
||||||
// 用户标志,支持学号,手机号,邮箱
|
// 用户标志,支持学号,手机号,邮箱
|
||||||
|
@Schema(
|
||||||
|
description = "用户登录用标志,支持用户名,手机号,邮箱"
|
||||||
|
)
|
||||||
private String userFlag;
|
private String userFlag;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "用户登陆用密码",
|
||||||
|
required = true,
|
||||||
|
minLength = 6,
|
||||||
|
maxLength = 16
|
||||||
|
)
|
||||||
private String password;
|
private String password;
|
||||||
}
|
}
|
||||||
|
@ -1,16 +1,44 @@
|
|||||||
package com.luojia_channel.modules.user.dto;
|
package com.luojia_channel.modules.user.dto;
|
||||||
|
|
||||||
|
import io.swagger.v3.oas.annotations.media.Schema;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
|
@Schema(description = "用户注册DTO")
|
||||||
public class UserRegisterDTO {
|
public class UserRegisterDTO {
|
||||||
|
@Schema(
|
||||||
|
description = "用户名",
|
||||||
|
example = "ttt",
|
||||||
|
required = true,
|
||||||
|
minLength = 1,
|
||||||
|
maxLength = 15
|
||||||
|
)
|
||||||
private String username;
|
private String username;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "密码",
|
||||||
|
example = "123456",
|
||||||
|
required = true,
|
||||||
|
minLength = 6,
|
||||||
|
maxLength = 16,
|
||||||
|
format = "password"
|
||||||
|
)
|
||||||
private String password;
|
private String password;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "手机号",
|
||||||
|
example = "12345678901",
|
||||||
|
pattern = "^1([38][0-9]|4[579]|5[0-3,5-9]|6[6]|7[0135678]|9[89])\\d{8}$"
|
||||||
|
)
|
||||||
private String phone;
|
private String phone;
|
||||||
|
|
||||||
|
@Schema(
|
||||||
|
description = "邮箱",
|
||||||
|
example = "123456@qq.com",
|
||||||
|
pattern = "^[a-zA-Z0-9_-]+@[a-zA-Z0-9_-]+(\\.[a-zA-Z0-9_-]+)+$"
|
||||||
|
)
|
||||||
private String email;
|
private String email;
|
||||||
|
|
||||||
|
@Schema(description = "学生学号,暂不需要")
|
||||||
private String studentId;
|
private String studentId;
|
||||||
}
|
}
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
# 本地开发环境
|
#本地开发环境
|
||||||
# lj:
|
lj:
|
||||||
# db:
|
db:
|
||||||
# host: localhost
|
host: localhost
|
||||||
# password: 123456
|
password: 123456
|
||||||
# redis:
|
redis:
|
||||||
# host: localhost
|
host: localhost
|
||||||
# port: 6379
|
port: 6379
|
||||||
# password: 123456
|
password: 123456
|
||||||
# rabbitmq:
|
rabbitmq:
|
||||||
# host: localhost
|
host: localhost
|
||||||
# port: 15672
|
port: 15672
|
||||||
# username: root
|
username: root
|
||||||
# password: 123456
|
password: 123456
|
||||||
# minio:
|
minio:
|
||||||
# endpoint: http://localhost:9000
|
endpoint: http://localhost:9000
|
||||||
# accessKey: minioadmin
|
accessKey: minioadmin
|
||||||
# secretKey: minioadmin
|
secretKey: minioadmin
|
||||||
|
|
||||||
lj:
|
#lj:
|
||||||
db:
|
# db:
|
||||||
host: 192.168.59.129
|
# host: 192.168.59.129
|
||||||
password: Forely123!
|
# password: Forely123!
|
||||||
redis:
|
# redis:
|
||||||
host: 192.168.59.129
|
# host: 192.168.59.129
|
||||||
port: 6379
|
# port: 6379
|
||||||
password: Forely123!
|
# password: Forely123!
|
||||||
rabbitmq:
|
# rabbitmq:
|
||||||
host: 192.168.59.129
|
# host: 192.168.59.129
|
||||||
port: 5672
|
# port: 5672
|
||||||
username: admin
|
# username: admin
|
||||||
password: Forely123!
|
# password: Forely123!
|
||||||
minio:
|
# minio:
|
||||||
endpoint: http://192.168.59.129:9000
|
# endpoint: http://192.168.59.129:9000
|
||||||
accessKey: forely
|
# accessKey: forely
|
||||||
secretKey: Forely123!
|
# secretKey: Forely123!
|
||||||
|
@ -1,36 +1,36 @@
|
|||||||
# 本地开发环境
|
#本地开发环境
|
||||||
# lj:
|
lj:
|
||||||
# db:
|
db:
|
||||||
# host: localhost
|
host: localhost
|
||||||
# password: 123456
|
password: 123456
|
||||||
# redis:
|
redis:
|
||||||
# host: localhost
|
host: localhost
|
||||||
# port: 6379
|
port: 6379
|
||||||
# password: 123456
|
password: 123456
|
||||||
# rabbitmq:
|
rabbitmq:
|
||||||
# host: localhost
|
host: localhost
|
||||||
# port: 15672
|
port: 15672
|
||||||
# username: root
|
username: root
|
||||||
# password: 123456
|
password: 123456
|
||||||
# minio:
|
minio:
|
||||||
# endpoint: http://localhost:9000
|
endpoint: http://localhost:9000
|
||||||
# accessKey: minioadmin
|
accessKey: minioadmin
|
||||||
# secretKey: minioadmin
|
secretKey: minioadmin
|
||||||
|
|
||||||
lj:
|
#lj:
|
||||||
db:
|
# db:
|
||||||
host: 192.168.59.129
|
# host: 192.168.59.129
|
||||||
password: Forely123!
|
# password: Forely123!
|
||||||
redis:
|
# redis:
|
||||||
host: 192.168.59.129
|
# host: 192.168.59.129
|
||||||
port: 6379
|
# port: 6379
|
||||||
password: Forely123!
|
# password: Forely123!
|
||||||
rabbitmq:
|
# rabbitmq:
|
||||||
host: 192.168.59.129
|
# host: 192.168.59.129
|
||||||
port: 5672
|
# port: 5672
|
||||||
username: admin
|
# username: admin
|
||||||
password: Forely123!
|
# password: Forely123!
|
||||||
minio:
|
# minio:
|
||||||
endpoint: http://192.168.59.129:9000
|
# endpoint: http://192.168.59.129:9000
|
||||||
accessKey: forely
|
# accessKey: forely
|
||||||
secretKey: Forely123!
|
# secretKey: Forely123!
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading…
Reference in new issue