Commit c9757056 by yangchen

实现banner功能

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