Commit c9757056 by yangchen

实现banner功能

parent fb777398
...@@ -74,7 +74,7 @@ public class BannerInfoController { ...@@ -74,7 +74,7 @@ public class BannerInfoController {
@GetMapping("/get") @GetMapping("/get")
@Operation(summary = "获得banner页管理") @Operation(summary = "获得banner页管理")
@Parameter(name = "id", description = "编号", required = true, example = "1024") @Parameter(name = "id", description = "编号", required = true, example = "1024")
@PreAuthorize("@ss.hasPermission('biz:banner-info:query')") //@PreAuthorize("@ss.hasPermission('biz:banner-info:query')")
public CommonResult<BannerInfoRespVO> getBannerInfo(@RequestParam("id") Long id) { public CommonResult<BannerInfoRespVO> getBannerInfo(@RequestParam("id") Long id) {
BannerInfoDO bannerInfo = bannerInfoService.getBannerInfo(id); BannerInfoDO bannerInfo = bannerInfoService.getBannerInfo(id);
return success(BeanUtils.toBean(bannerInfo, BannerInfoRespVO.class)); return success(BeanUtils.toBean(bannerInfo, BannerInfoRespVO.class));
......
...@@ -13,6 +13,9 @@ import static com.luhu.computility.framework.common.util.date.DateUtils.FORMAT_Y ...@@ -13,6 +13,9 @@ import static com.luhu.computility.framework.common.util.date.DateUtils.FORMAT_Y
@Data @Data
public class BannerInfoPageReqVO extends PageParam { public class BannerInfoPageReqVO extends PageParam {
@Schema(description = "Id")
private Long id;
@Schema(description = "内容") @Schema(description = "内容")
private String information; private String information;
...@@ -26,7 +29,7 @@ public class BannerInfoPageReqVO extends PageParam { ...@@ -26,7 +29,7 @@ public class BannerInfoPageReqVO extends PageParam {
private Integer orderNum; private Integer orderNum;
@Schema(description = "状态:0-已隐藏,1-已显示", example = "1") @Schema(description = "状态:0-已隐藏,1-已显示", example = "1")
private Boolean showStatus; private Integer showStatus;
@Schema(description = "创建时间") @Schema(description = "创建时间")
@DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND) @DateTimeFormat(pattern = FORMAT_YEAR_MONTH_DAY_HOUR_MINUTE_SECOND)
......
...@@ -12,6 +12,9 @@ import com.alibaba.excel.annotation.*; ...@@ -12,6 +12,9 @@ import com.alibaba.excel.annotation.*;
@ExcelIgnoreUnannotated @ExcelIgnoreUnannotated
public class BannerInfoRespVO { public class BannerInfoRespVO {
@Schema(description = "编号", requiredMode = Schema.RequiredMode.REQUIRED, example = "1024")
private Long id;
@Schema(description = "轮播图地址") @Schema(description = "轮播图地址")
@ExcelProperty("轮播图地址") @ExcelProperty("轮播图地址")
private String image; private String image;
...@@ -38,7 +41,7 @@ public class BannerInfoRespVO { ...@@ -38,7 +41,7 @@ public class BannerInfoRespVO {
@Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@ExcelProperty("状态:0-已隐藏,1-已显示") @ExcelProperty("状态:0-已隐藏,1-已显示")
private Boolean showStatus; private Integer showStatus;
@Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED) @Schema(description = "创建时间", requiredMode = Schema.RequiredMode.REQUIRED)
@ExcelProperty("创建时间") @ExcelProperty("创建时间")
......
...@@ -34,7 +34,7 @@ public class BannerInfoSaveReqVO { ...@@ -34,7 +34,7 @@ public class BannerInfoSaveReqVO {
@Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1") @Schema(description = "状态:0-已隐藏,1-已显示", requiredMode = Schema.RequiredMode.REQUIRED, example = "1")
@NotNull(message = "状态:0-已隐藏,1-已显示不能为空") @NotNull(message = "状态:0-已隐藏,1-已显示不能为空")
private Boolean showStatus; private Integer showStatus;
@Schema(description = "备注", example = "你说的对") @Schema(description = "备注", example = "你说的对")
private String remark; private String remark;
......
...@@ -54,7 +54,7 @@ public class BannerInfoDO extends BaseDO { ...@@ -54,7 +54,7 @@ public class BannerInfoDO extends BaseDO {
/** /**
* 状态:0-已隐藏,1-已显示 * 状态:0-已隐藏,1-已显示
*/ */
private Boolean showStatus; private Integer showStatus;
/** /**
* 备注 * 备注
*/ */
......
...@@ -20,6 +20,7 @@ public interface BannerInfoMapper extends BaseMapperX<BannerInfoDO> { ...@@ -20,6 +20,7 @@ public interface BannerInfoMapper extends BaseMapperX<BannerInfoDO> {
default PageResult<BannerInfoDO> selectPage(BannerInfoPageReqVO reqVO) { default PageResult<BannerInfoDO> selectPage(BannerInfoPageReqVO reqVO) {
return selectPage(reqVO, new LambdaQueryWrapperX<BannerInfoDO>() return selectPage(reqVO, new LambdaQueryWrapperX<BannerInfoDO>()
.eqIfPresent(BannerInfoDO::getId, reqVO.getId())
.eqIfPresent(BannerInfoDO::getInformation, reqVO.getInformation()) .eqIfPresent(BannerInfoDO::getInformation, reqVO.getInformation())
.eqIfPresent(BannerInfoDO::getTitle, reqVO.getTitle()) .eqIfPresent(BannerInfoDO::getTitle, reqVO.getTitle())
.eqIfPresent(BannerInfoDO::getDescription, reqVO.getDescription()) .eqIfPresent(BannerInfoDO::getDescription, reqVO.getDescription())
......
...@@ -3,6 +3,12 @@ server: ...@@ -3,6 +3,12 @@ server:
--- #################### 数据库相关配置 #################### --- #################### 数据库相关配置 ####################
spring: spring:
# web:
# resources:
# static-locations:
# - "classpath:/static/"
# - "file:D:/study/profile/"
# -
autoconfigure: autoconfigure:
# noinspection SpringBootApplicationYaml # noinspection SpringBootApplicationYaml
exclude: exclude:
...@@ -49,9 +55,10 @@ spring: ...@@ -49,9 +55,10 @@ spring:
primary: master primary: master
datasource: datasource:
master: master:
url: jdbc:mysql://43.139.100.220:13306/new_computility?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例 # url: jdbc:mysql://43.139.100.220:13306/new_computility?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
url: jdbc:mysql://localhost/new_computility?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true&nullCatalogMeansCurrent=true # MySQL Connector/J 8.X 连接的示例
username: root username: root
password: D7kaJdNdLsjzXGhD password: 159357 # D7kaJdNdLsjzXGhD
# Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优 # Redis 配置。Redisson 默认的配置足够使用,一般不需要进行调优
redis: redis:
host: 127.0.0.1 # 地址 host: 127.0.0.1 # 地址
......
...@@ -190,6 +190,7 @@ spring: ...@@ -190,6 +190,7 @@ spring:
api-key: sk-abc api-key: sk-abc
computility: computility:
# profile: D:/study/uploadPath
ai: ai:
deep-seek: # DeepSeek deep-seek: # DeepSeek
enable: true enable: true
......
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 sign in to comment