kelei před 6 měsíci
rodič
revize
756de184a5

+ 3 - 3
admin/src/main/java/com/flyer/foster/config/SaTokenConfigure.java

@@ -25,9 +25,9 @@ public class SaTokenConfigure implements WebMvcConfigurer {
                     .notMatch("/admin/user/login", "/admin/user/generate-key")
                     .check(r -> StpUtil.checkLogin());
 
-            SaRouter.match("/app/**")
-                    .notMatch("/app/user/login")
-                    .check(r -> StpAppUtil.checkLogin());
+//            SaRouter.match("/app/**")
+//                    .notMatch("/app/user/login")
+//                    .check(r -> StpAppUtil.checkLogin());
 
 
         })).addPathPatterns("/**");

+ 1 - 0
admin/src/main/java/com/flyer/foster/controller/PosterLibController.java

@@ -58,6 +58,7 @@ public class PosterLibController {
     public R updatePosterLib(@Valid @RequestBody PosterLibUpdateDTO updateDTO) {
         return R.ok().result(
                 iPosterLibService.lambdaUpdate()
+                        .set(StrUtil.isNotBlank(updateDTO.getContent()), PosterLib::getContent, updateDTO.getContent())
                         .set(StrUtil.isNotBlank(updateDTO.getName()), PosterLib::getName, updateDTO.getName())
                         .set(StrUtil.isNotBlank(updateDTO.getUrl()), PosterLib::getUrl, updateDTO.getUrl())
                         .set(StrUtil.isNotBlank(updateDTO.getStartTime()), PosterLib::getStartTime, updateDTO.getStartTime())

+ 43 - 5
admin/src/main/java/com/flyer/foster/controller/app/AppTreePosterContentController.java

@@ -1,11 +1,19 @@
 package com.flyer.foster.controller.app;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.flyer.foster.dto.AreaRespDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentAddDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentQueryDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentRespDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentUpdateDTO;
+import com.flyer.foster.entity.TreePosterContent;
 import com.flyer.foster.service.ITreePosterContentService;
 import com.flyer.util.R;
 import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.PostMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
 
 /**
  * 小程序果树海报悄悄话
@@ -19,8 +27,38 @@ public class AppTreePosterContentController {
     @Autowired
     private ITreePosterContentService iTreePosterContentService;
 
+    /**
+     * 海报悄悄话列表-分页
+     *
+     * @return
+     */
+    @GetMapping("/list/{current}/{size}")
+    public R getPageList(@PathVariable Integer current, @PathVariable Integer size, AppTreePosterContentQueryDTO queryDTO) {
+        IPage<TreePosterContent> page = new Page<>(current, size);
+        return R.ok().result(iTreePosterContentService.getPageList(page, queryDTO));
+    }
+
+    /**
+     * 新增果树海报悄悄话(小程序)
+     *
+     * @param addDTO
+     * @return
+     */
     @PostMapping("")
-    public R addTreePosterContent() {
-        return R.ok();
+    public R addTreePosterContent(@Valid @RequestBody AppTreePosterContentAddDTO addDTO) {
+        return R.ok().result(iTreePosterContentService.addTreePosterContent(addDTO));
+    }
+
+    /**
+     * 修改海报悄悄话状态
+     *
+     * @param treePosterContentId
+     * @param updateDTO
+     * @return
+     */
+    @PutMapping("/{treePosterContentId}")
+    public R updateTreePosterContent(@PathVariable Integer treePosterContentId, @RequestBody AppTreePosterContentUpdateDTO updateDTO) {
+        updateDTO.setId(treePosterContentId);
+        return R.ok().result(iTreePosterContentService.updateTreePosterContent(treePosterContentId, updateDTO));
     }
 }

+ 3 - 0
admin/src/main/java/com/flyer/foster/dto/PosterLibAddDTO.java

@@ -26,6 +26,9 @@ public class PosterLibAddDTO {
     @NotBlank(message = "海报url不能为空")
     private String url;
 
+    @NotBlank(message = "悄悄话内容不能为空")
+    private String content;
+
     /**
      * 开始时间
      */

+ 6 - 0
admin/src/main/java/com/flyer/foster/dto/PosterLibRespDTO.java

@@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.FieldFill;
 import com.baomidou.mybatisplus.annotation.TableField;
 import com.baomidou.mybatisplus.annotation.TableLogic;
 import com.baomidou.mybatisplus.annotation.Version;
+import com.flyer.foster.entity.Role;
 import lombok.Data;
 
 import javax.validation.constraints.NotBlank;
@@ -30,6 +31,11 @@ public class PosterLibRespDTO {
     private String url;
 
     /**
+     * 悄悄话内容
+     */
+    private String content;
+
+    /**
      * 开始时间
      */
     private String startTime;

+ 5 - 0
admin/src/main/java/com/flyer/foster/dto/PosterLibUpdateDTO.java

@@ -27,6 +27,11 @@ public class PosterLibUpdateDTO {
     private String url;
 
     /**
+     * 悄悄话内容
+     */
+    private String content;
+
+    /**
      * 开始时间
      */
     private String startTime;

+ 20 - 0
admin/src/main/java/com/flyer/foster/dto/app/AppTreePosterContentAddDTO.java

@@ -0,0 +1,20 @@
+package com.flyer.foster.dto.app;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * AppTreePosterContentAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/15/11:23
+ */
+@Data
+public class AppTreePosterContentAddDTO {
+    @NotNull(message = "用户id不能为空")
+    private Integer appUserId;
+
+    @NotNull(message = "树id不能为空")
+    private Integer treeId;
+}

+ 22 - 0
admin/src/main/java/com/flyer/foster/dto/app/AppTreePosterContentQueryDTO.java

@@ -0,0 +1,22 @@
+package com.flyer.foster.dto.app;
+
+import lombok.Data;
+
+/**
+ * AppTreePosterContentAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/15/11:23
+ */
+@Data
+public class AppTreePosterContentQueryDTO {
+    private Integer id;
+
+    private String posterUrl;
+
+    private String content;
+
+    private Integer appUserId;
+
+    private Integer treeId;
+}

+ 24 - 0
admin/src/main/java/com/flyer/foster/dto/app/AppTreePosterContentRespDTO.java

@@ -0,0 +1,24 @@
+package com.flyer.foster.dto.app;
+
+import lombok.Data;
+
+/**
+ * AppTreePosterContentAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/15/11:23
+ */
+@Data
+public class AppTreePosterContentRespDTO {
+    private Integer id;
+
+    private String posterUrl;
+
+    private String content;
+
+    private Integer appUserId;
+
+    private Integer treeId;
+
+    private Integer status;
+}

+ 19 - 0
admin/src/main/java/com/flyer/foster/dto/app/AppTreePosterContentUpdateDTO.java

@@ -0,0 +1,19 @@
+package com.flyer.foster.dto.app;
+
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * AppTreePosterContentAddDTO
+ *
+ * @author kelei
+ * @since 2024/5/15/11:23
+ */
+@Data
+public class AppTreePosterContentUpdateDTO {
+    private Integer id;
+
+    @NotNull(message = "status不能为空")
+    private Integer status;
+}

+ 5 - 0
admin/src/main/java/com/flyer/foster/entity/PosterLib.java

@@ -44,6 +44,11 @@ public class PosterLib implements Serializable {
     private String url;
 
     /**
+     * 悄悄话内容
+     */
+    private String content;
+
+    /**
      * 开始时间
      */
     private String startTime;

+ 5 - 0
admin/src/main/java/com/flyer/foster/entity/TreePosterContent.java

@@ -34,6 +34,11 @@ public class TreePosterContent implements Serializable {
     private Integer id;
 
     /**
+     * 海报库表主键id
+     */
+    private Integer posterLibId;
+
+    /**
      * 海报url
      */
     private String posterUrl;

+ 10 - 0
admin/src/main/java/com/flyer/foster/service/ITreePosterContentService.java

@@ -1,5 +1,10 @@
 package com.flyer.foster.service;
 
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.flyer.foster.dto.app.AppTreePosterContentAddDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentQueryDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentRespDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentUpdateDTO;
 import com.flyer.foster.entity.TreePosterContent;
 import com.baomidou.mybatisplus.extension.service.IService;
 
@@ -13,4 +18,9 @@ import com.baomidou.mybatisplus.extension.service.IService;
  */
 public interface ITreePosterContentService extends IService<TreePosterContent> {
 
+    AppTreePosterContentRespDTO addTreePosterContent(AppTreePosterContentAddDTO addDTO);
+
+    boolean updateTreePosterContent(Integer treePosterContentId, AppTreePosterContentUpdateDTO updateDTO);
+
+    IPage<AppTreePosterContentRespDTO> getPageList(IPage<TreePosterContent> page, AppTreePosterContentQueryDTO queryDTO);
 }

+ 88 - 0
admin/src/main/java/com/flyer/foster/service/impl/TreePosterContentServiceImpl.java

@@ -1,10 +1,30 @@
 package com.flyer.foster.service.impl;
 
+import cn.hutool.core.bean.BeanUtil;
+import cn.hutool.core.util.StrUtil;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.flyer.foster.dto.PosterLibRespDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentAddDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentQueryDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentRespDTO;
+import com.flyer.foster.dto.app.AppTreePosterContentUpdateDTO;
+import com.flyer.foster.entity.PosterLib;
 import com.flyer.foster.entity.TreePosterContent;
+import com.flyer.foster.entity.Whisper;
 import com.flyer.foster.mapper.ITreePosterContentMapper;
+import com.flyer.foster.pojo.StpAppUtil;
+import com.flyer.foster.service.IPosterLibService;
 import com.flyer.foster.service.ITreePosterContentService;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.flyer.foster.service.IWhisperService;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.time.LocalDateTime;
+import java.util.ArrayList;
+import java.util.List;
 
 /**
  * <p>
@@ -17,4 +37,72 @@ import org.springframework.stereotype.Service;
 @Service
 public class TreePosterContentServiceImpl extends ServiceImpl<ITreePosterContentMapper, TreePosterContent> implements ITreePosterContentService {
 
+    @Autowired
+    private IPosterLibService iPosterLibService;
+
+    @Transactional
+    @Override
+    public AppTreePosterContentRespDTO addTreePosterContent(AppTreePosterContentAddDTO addDTO) {
+        int tenantId = StpAppUtil.getTokenSession().getInt("tenantId");
+        AppTreePosterContentRespDTO respDTO = new AppTreePosterContentRespDTO();
+        LocalDateTime now = LocalDateTime.now();
+        // 1.获取海报,取最新一张
+        PosterLib posterLib = iPosterLibService.lambdaQuery()
+                .le(PosterLib::getStartTime, now)
+                .ge(PosterLib::getEndTime, now)
+                .orderByDesc(PosterLib::getId)
+                .last("limit 1")
+                .one();
+
+        if (posterLib != null) {
+            // 查询该时间段是否已经插入海报悄悄话
+            TreePosterContent treePosterContent = this.lambdaQuery().eq(TreePosterContent::getPosterLibId, posterLib.getId()).one();
+            if (treePosterContent == null) {
+                // 2.获取悄悄话,取最新一条记录
+                treePosterContent = new TreePosterContent();
+                BeanUtil.copyProperties(addDTO, treePosterContent);
+                treePosterContent.setTenantId(tenantId);
+                treePosterContent.setPosterLibId(posterLib.getId());
+                treePosterContent.setPosterUrl(posterLib.getUrl());
+                treePosterContent.setContent(posterLib.getContent());
+                treePosterContent.setCreatedBy("kelei");
+                treePosterContent.setCreatedTime(now);
+                treePosterContent.setUpdatedBy("kelei");
+                treePosterContent.setUpdatedTime(now);
+                treePosterContent.setStatus(1);
+                // 新增
+                this.save(treePosterContent);
+            }
+            BeanUtil.copyProperties(treePosterContent, respDTO);
+        }
+        return respDTO;
+    }
+
+    @Override
+    public boolean updateTreePosterContent(Integer treePosterContentId, AppTreePosterContentUpdateDTO updateDTO) {
+        return this.lambdaUpdate()
+                .set(TreePosterContent::getStatus, updateDTO.getStatus())
+                .eq(TreePosterContent::getId, updateDTO.getId())
+                .update();
+    }
+
+    @Override
+    public IPage<AppTreePosterContentRespDTO> getPageList(IPage<TreePosterContent> page, AppTreePosterContentQueryDTO queryDTO) {
+        IPage<AppTreePosterContentRespDTO> pageResult = new Page<>(page.getCurrent(), page.getSize());
+
+        IPage<TreePosterContent> pageInfo = this.lambdaQuery()
+                .eq(TreePosterContent::getAppUserId, queryDTO.getAppUserId())
+                .eq(TreePosterContent::getAppUserId, queryDTO.getAppUserId())
+                .page(page);
+        List<AppTreePosterContentRespDTO> list = new ArrayList<>();
+        AppTreePosterContentRespDTO respDTO;
+        for (TreePosterContent record : pageInfo.getRecords()) {
+            respDTO = new AppTreePosterContentRespDTO();
+            BeanUtil.copyProperties(record, respDTO);
+            list.add(respDTO);
+        }
+        pageResult.setRecords(list);
+        pageResult.setTotal(pageInfo.getTotal());
+        return pageResult;
+    }
 }

+ 81 - 116
admin/src/main/resources/mysql/ddl/init-table.sql

@@ -1,8 +1,8 @@
-drop table if exists tb_app_user;
 create table tb_app_user
 (
     id           int auto_increment comment '主键'
         primary key,
+    garden_id    int default 0 null comment '最新进入果园id',
     union_id     varchar(255)  null,
     tel          varchar(15)   null comment '手机号',
     name         varchar(32)   null comment '用户名',
@@ -21,14 +21,13 @@ create table tb_app_user
 )
     comment '小程序用户';
 
-drop table if exists tb_area;
 create table tb_area
 (
     id           int auto_increment comment '主键'
         primary key,
     garden_id    int           null comment '果园id',
     name         varchar(255)  null comment '区域名称',
-    wkt          varchar(255)  null comment '坐标',
+    wkt          text          null comment '坐标',
     status       int default 1 null comment '状态-{0.不可用 1.可用}',
     tenant_id    int default 0 null comment '租户号',
     version      int default 1 null comment '乐观锁',
@@ -40,44 +39,55 @@ create table tb_area
 )
     comment '区域';
 
-drop table if exists tb_foster_record;
 create table tb_foster_record
 (
-    id           int auto_increment comment '主键'
+    id               int auto_increment comment '主键'
         primary key,
-    app_user_id  int           null comment '小程序用户id',
-    tree_id      int           null comment '树id',
-    status       int default 1 null comment '状态-{0.不可用 1.可用}',
-    tenant_id    int default 0 null comment '租户号',
-    version      int default 1 null comment '乐观锁',
-    is_deleted   int default 0 null comment '是否删除',
-    created_by   varchar(32)   null comment '创建人',
-    created_time datetime      null comment '创建时间',
-    updated_by   varchar(32)   null comment '更新人',
-    updated_time datetime      null comment '更新时间'
+    app_user_id      int           null comment '小程序用户id',
+    garden_id        int default 0 null comment '果园id',
+    tree_id          int           null comment '树id',
+    birdseye_tree_id int default 0 null comment '飞鸟看园树id',
+    status           int default 1 null comment '状态-{0.不可用 1.可用}',
+    tenant_id        int default 0 null comment '租户号',
+    version          int default 1 null comment '乐观锁',
+    is_deleted       int default 0 null comment '是否删除',
+    created_by       varchar(32)   null comment '创建人',
+    created_time     datetime      null comment '创建时间',
+    updated_by       varchar(32)   null comment '更新人',
+    updated_time     datetime      null comment '更新时间'
 )
     comment '领养记录';
 
-DROP TABLE IF EXISTS tb_garden;
-CREATE TABLE tb_garden
+create table tb_garden
 (
-    `id`           INT NOT NULL AUTO_INCREMENT COMMENT '主键',
-    `name`         VARCHAR(32) COMMENT '果园名称',
-    `user_id`      INT COMMENT '用户id',
-    `base_map_url` VARCHAR(255) COMMENT '底图',
-    `qr_code`      VARCHAR(255) COMMENT '二维码',
-    `status`       INT DEFAULT 1 COMMENT '状态-{0.不可用 1.可用}',
-    `tenant_id`    INT DEFAULT 0 COMMENT '租户号',
-    `version`      INT DEFAULT 1 COMMENT '乐观锁',
-    `is_deleted`   INT DEFAULT 0 COMMENT '是否删除',
-    `created_by`   VARCHAR(32) COMMENT '创建人',
-    `created_time` DATETIME COMMENT '创建时间',
-    `updated_by`   VARCHAR(32) COMMENT '更新人',
-    `updated_time` DATETIME COMMENT '更新时间',
-    PRIMARY KEY (id)
-) COMMENT = '果园';
+    id                 int auto_increment comment '主键'
+        primary key,
+    name               varchar(32)             null comment '果园名称',
+    day_bg             varchar(255) default '' null comment '果园白天背景',
+    night_bg           varchar(255) default '' null comment '果园夜晚背景',
+    birdseye_garden_id int          default 0  null comment '飞鸟看园果园id',
+    user_id            int                     null comment '用户id',
+    base_map_url       varchar(255)            null comment '底图',
+    qr_code            varchar(255)            null comment '二维码',
+    cover_url1         varchar(255) default '' null comment '封面图片1',
+    cover_url1_content text                    null comment '描述1',
+    cover_url2         varchar(255) default '' null comment '封面图片2',
+    cover_url2_content text                    null comment '描述2',
+    cover_url3         varchar(255) default '' null comment '封面图片3',
+    cover_url3_content text                    null comment '描述3',
+    cover_url4         varchar(255) default '' null comment '封面图片4',
+    cover_url4_content text                    null comment '描述4',
+    status             int          default 1  null comment '状态-{0.不可用 1.可用}',
+    tenant_id          int          default 0  null comment '租户号',
+    version            int          default 1  null comment '乐观锁',
+    is_deleted         int          default 0  null comment '是否删除',
+    created_by         varchar(32)             null comment '创建人',
+    created_time       datetime                null comment '创建时间',
+    updated_by         varchar(32)             null comment '更新人',
+    updated_time       datetime                null comment '更新时间'
+)
+    comment '果园';
 
-drop table if exists tb_menu;
 create table tb_menu
 (
     id           int auto_increment comment '主键'
@@ -100,24 +110,26 @@ create table tb_menu
 )
     comment '菜单表';
 
-drop table if exists tb_poster_lib;
 create table tb_poster_lib
 (
     id           int auto_increment comment '主键'
         primary key,
-    url          varchar(255)  null comment '海报url',
-    status       int default 1 null comment '状态-{0.不可用 1.可用}',
-    tenant_id    int default 0 null comment '租户号',
-    version      int default 1 null comment '乐观锁',
-    is_deleted   int default 0 null comment '是否删除',
-    created_by   varchar(32)   null comment '创建人',
-    created_time datetime      null comment '创建时间',
-    updated_by   varchar(32)   null comment '更新人',
-    updated_time datetime      null comment '更新时间'
+    name         varchar(32)            not null comment '海报名称',
+    url          varchar(255)           null comment '海报url',
+    content      text                   null comment '悄悄话内容',
+    start_time   varchar(20) default '' null comment '开始时间',
+    end_time     varchar(20) default '' null comment '结束时间',
+    status       int         default 1  null comment '状态-{0.不可用 1.可用}',
+    tenant_id    int         default 0  null comment '租户号',
+    version      int         default 1  null comment '乐观锁',
+    is_deleted   int         default 0  null comment '是否删除',
+    created_by   varchar(32)            null comment '创建人',
+    created_time datetime               null comment '创建时间',
+    updated_by   varchar(32)            null comment '更新人',
+    updated_time datetime               null comment '更新时间'
 )
     comment '海报库';
 
-drop table if exists tb_role;
 create table tb_role
 (
     id           int auto_increment comment '主键'
@@ -136,7 +148,6 @@ create table tb_role
 )
     comment '角色表';
 
-drop table if exists tb_role_menu;
 create table tb_role_menu
 (
     id           int auto_increment comment '主键'
@@ -153,7 +164,6 @@ create table tb_role_menu
 )
     comment '角色菜单关系表';
 
-drop table if exists tb_tenant;
 create table tb_tenant
 (
     id           int auto_increment comment '主键'
@@ -170,7 +180,6 @@ create table tb_tenant
 )
     comment '系统租户表';
 
-drop table if exists tb_tree;
 create table tb_tree
 (
     id           int auto_increment comment '主键'
@@ -189,7 +198,6 @@ create table tb_tree
 )
     comment '树';
 
-drop table if exists tb_tree_image;
 create table tb_tree_image
 (
     id           int auto_increment comment '主键'
@@ -207,27 +215,26 @@ create table tb_tree_image
 )
     comment '树照片';
 
-drop table if exists tb_tree_poster_content;
 create table tb_tree_poster_content
 (
-    id           int auto_increment comment '主键'
+    id            int auto_increment comment '主键'
         primary key,
-    poster_url   varchar(255)  null comment '海报url',
-    content      varchar(255)  null comment '悄悄话内容',
-    app_user_id  int           null comment '小程序用户id',
-    tree_id      int           null comment '树id',
-    status       int default 1 null comment '状态-{0.不可用 1.可用}',
-    tenant_id    int default 0 null comment '租户号',
-    version      int default 1 null comment '乐观锁',
-    is_deleted   int default 0 null comment '是否删除',
-    created_by   varchar(32)   null comment '创建人',
-    created_time datetime      null comment '创建时间',
-    updated_by   varchar(32)   null comment '更新人',
-    updated_time datetime      null comment '更新时间'
+    poster_lib_id int default 0 null comment '海报库表主键id',
+    poster_url    varchar(255)  null comment '海报url',
+    content       varchar(255)  null comment '悄悄话内容',
+    app_user_id   int           null comment '小程序用户id',
+    tree_id       int           null comment '树id',
+    status        int default 1 null comment '状态-{0.不可用 1.可用}',
+    tenant_id     int default 0 null comment '租户号',
+    version       int default 1 null comment '乐观锁',
+    is_deleted    int default 0 null comment '是否删除',
+    created_by    varchar(32)   null comment '创建人',
+    created_time  datetime      null comment '创建时间',
+    updated_by    varchar(32)   null comment '更新人',
+    updated_time  datetime      null comment '更新时间'
 )
     comment '果树海报悄悄话';
 
-drop table if exists tb_user;
 create table tb_user
 (
     id           int auto_increment comment '主键'
@@ -247,7 +254,6 @@ create table tb_user
 )
     comment '用户表';
 
-drop table if exists tb_user_role;
 create table tb_user_role
 (
     id           int auto_increment comment '主键'
@@ -265,62 +271,21 @@ create table tb_user_role
 )
     comment '用户角色表';
 
-drop table if exists tb_whisper;
 create table tb_whisper
 (
     id           int auto_increment comment '主键'
         primary key,
-    content      varchar(255)  null comment '文案内容',
-    status       int default 1 null comment '状态-{0.不可用 1.可用}',
-    tenant_id    int default 0 null comment '租户号',
-    version      int default 1 null comment '乐观锁',
-    is_deleted   int default 0 null comment '是否删除',
-    created_by   varchar(32)   null comment '创建人',
-    created_time datetime      null comment '创建时间',
-    updated_by   varchar(32)   null comment '更新人',
-    updated_time datetime      null comment '更新时间'
+    content      varchar(255)           null comment '文案内容',
+    start_time   varchar(20) default '' null comment '开始时间',
+    end_time     varchar(20) default '' null comment '结束时间',
+    status       int         default 1  null comment '状态-{0.不可用 1.可用}',
+    tenant_id    int         default 0  null comment '租户号',
+    version      int         default 1  null comment '乐观锁',
+    is_deleted   int         default 0  null comment '是否删除',
+    created_by   varchar(32)            null comment '创建人',
+    created_time datetime               null comment '创建时间',
+    updated_by   varchar(32)            null comment '更新人',
+    updated_time datetime               null comment '更新时间'
 )
     comment '悄悄话';
 
-alter table tb_poster_lib
-    add column name       varchar(32) not null comment '海报名称' after id,
-    add column start_time varchar(10) comment '开始时间' after url,
-    add column end_time   varchar(10) comment '结束时间' after start_time;
-
-alter table tb_whisper
-    add column start_time varchar(10) comment '开始时间' after content,
-    add column end_time   varchar(10) comment '结束时间' after start_time;
-
-alter table tb_app_user
-    add column garden_id int default 0 comment '最新进入果园id' after id;
-
-alter table tb_foster_record
-    add column garden_id int default 0 comment '果园id' after app_user_id;
-
-alter table tb_garden
-    add column birdseye_garden_id int default 0 comment '飞鸟看园果园id' after name;
-
-alter table tb_garden
-    add column cover_url1         varchar(255) default '' comment '封面图片1' after qr_code,
-    add column cover_url1_content varchar(500) default '' comment '描述1' after cover_url1,
-    add column cover_url2         varchar(255) default '' comment '封面图片2' after cover_url1_content,
-    add column cover_url2_content varchar(500) default '' comment '描述2' after cover_url2,
-    add column cover_url3         varchar(255) default '' comment '封面图片3' after cover_url2_content,
-    add column cover_url3_content varchar(500) default '' comment '描述3' after cover_url3,
-    add column cover_url4         varchar(255) default '' comment '封面图片4' after cover_url3_content,
-    add column cover_url4_content varchar(500) default '' comment '描述4' after cover_url4;
-
-alter table tb_foster_record
-    add column birdseye_tree_id int default 0 comment '飞鸟看园树id' after tree_id;
-
-alter table tb_poster_lib
-    modify start_time varchar(20) default '' comment '开始时间',
-    modify end_time varchar(20) default '' comment '结束时间';
-
-alter table tb_whisper
-    modify start_time varchar(20) default '' comment '开始时间',
-    modify end_time varchar(20) default '' comment '结束时间';
-
-alter table tb_garden
-    add column day_bg   varchar(255) default '' comment '果园白天背景' after name,
-    add column night_bg varchar(255) default '' comment '果园夜晚背景' after day_bg;