lyhzzz 3 mesiacov pred
rodič
commit
8f0b5e3afc

+ 44 - 0
src/main/java/com/fdkankan/fusion/controller/CaseOverviewController.java

@@ -0,0 +1,44 @@
+package com.fdkankan.fusion.controller;
+
+
+import com.fdkankan.fusion.common.ResultData;
+import com.fdkankan.fusion.entity.CaseOverview;
+import com.fdkankan.fusion.service.ICaseOverviewService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@RestController
+@RequestMapping("/caseOverview")
+public class CaseOverviewController {
+
+    @Autowired
+    ICaseOverviewService caseOverviewService;
+
+
+    @GetMapping("/getByCaseId")
+    public ResultData getByCaseId (@RequestParam (required = false) String caseId){
+
+        return ResultData.ok(caseOverviewService.getByCaseId(caseId));
+    }
+
+    @PostMapping("/addOrUpdate")
+    public ResultData addOrUpdate (@RequestBody CaseOverview caseOverview){
+        caseOverviewService.saveOrUpdate(caseOverview);
+        return ResultData.ok();
+    }
+
+    @PostMapping("/del")
+    public ResultData del (@RequestBody CaseOverview caseOverview){
+        caseOverviewService.removeById(caseOverview.getId());
+        return ResultData.ok();
+    }
+}
+

+ 45 - 0
src/main/java/com/fdkankan/fusion/controller/CaseTabulationController.java

@@ -0,0 +1,45 @@
+package com.fdkankan.fusion.controller;
+
+
+import com.fdkankan.fusion.common.ResultData;
+import com.fdkankan.fusion.entity.CaseTabulation;
+import com.fdkankan.fusion.service.ICaseTabulationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+/**
+ * <p>
+ *  前端控制器
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@RestController
+@RequestMapping("/caseTabulation")
+public class CaseTabulationController {
+
+
+    @Autowired
+    ICaseTabulationService caseTabulationService;
+
+
+    @GetMapping("/getByCaseId")
+    public ResultData getByCaseId (@RequestParam(required = false) String caseId){
+
+        return ResultData.ok(caseTabulationService.getByCaseId(caseId));
+    }
+
+    @PostMapping("/addOrUpdate")
+    public ResultData addOrUpdate (@RequestBody CaseTabulation caseTabulation){
+        caseTabulationService.saveOrUpdate(caseTabulation);
+        return ResultData.ok();
+    }
+
+    @PostMapping("/del")
+    public ResultData del (@RequestBody CaseTabulation caseTabulation){
+        caseTabulationService.removeById(caseTabulation.getId());
+        return ResultData.ok();
+    }
+}
+

+ 57 - 0
src/main/java/com/fdkankan/fusion/entity/CaseOverview.java

@@ -0,0 +1,57 @@
+package com.fdkankan.fusion.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@Getter
+@Setter
+@TableName("t_case_overview")
+public class CaseOverview implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("case_id")
+    private Integer caseId;
+
+    /**
+     * 数据
+     */
+    @TableField("store")
+    private String store;
+
+    /**
+     * 视口
+     */
+    @TableField("viewport")
+    private String viewport;
+
+    @TableField("tb_status")
+    @TableLogic
+    private Integer tbStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 69 - 0
src/main/java/com/fdkankan/fusion/entity/CaseTabulation.java

@@ -0,0 +1,69 @@
+package com.fdkankan.fusion.entity;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * <p>
+ * 
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@Getter
+@Setter
+@TableName("t_case_tabulation")
+public class CaseTabulation implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("case_id")
+    private Integer caseId;
+
+    /**
+     * 数据
+     */
+    @TableField("store")
+    private String store;
+
+    /**
+     * 视口
+     */
+    @TableField("viewport")
+    private String viewport;
+
+    /**
+     * 封面图
+     */
+    @TableField("cover")
+    private String cover;
+
+    /**
+     * 纸张
+     */
+    @TableField("paper_key")
+    private String paperKey;
+
+    @TableField("tb_status")
+    @TableLogic
+    private Integer tbStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 5 - 5
src/main/java/com/fdkankan/fusion/generate/AutoGenerate.java

@@ -18,7 +18,7 @@ public class AutoGenerate {
         String path =System.getProperty("user.dir") ;
 
         generate(path,"fusion", getTables(new String[]{
-               "t_scene_pro"
+               "t_case_tabulation"
         }));
 
 //        generate(path,"goods", getTables(new String[]{
@@ -46,10 +46,10 @@ public class AutoGenerate {
 
 
     public static void  generate(String path,String moduleName,  List<String> tables){
-//        FastAutoGenerator.create("jdbc:mysql://192.168.0.25:3306/fd_fusion_xj",
-//                "root","mysql123!ROOT.")
-        FastAutoGenerator.create("jdbc:mysql://120.24.144.164:3306/4dkankan_v4",
-                "root","4Dage@4Dage#@168")
+        FastAutoGenerator.create("jdbc:mysql://120.25.146.52:13306/fd_fusion",
+                "root","JK123456%JIK")
+//        FastAutoGenerator.create("jdbc:mysql://120.24.144.164:3306/4dkankan_v4",
+//                "root","4Dage@4Dage#@168")
                 .globalConfig(builder -> {
                     builder.author("")               //作者
                             .outputDir(path+"\\src\\main\\java")    //输出路径(写到java目录)

+ 18 - 0
src/main/java/com/fdkankan/fusion/mapper/ICaseOverviewMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.fusion.mapper;
+
+import com.fdkankan.fusion.entity.CaseOverview;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@Mapper
+public interface ICaseOverviewMapper extends BaseMapper<CaseOverview> {
+
+}

+ 18 - 0
src/main/java/com/fdkankan/fusion/mapper/ICaseTabulationMapper.java

@@ -0,0 +1,18 @@
+package com.fdkankan.fusion.mapper;
+
+import com.fdkankan.fusion.entity.CaseTabulation;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import org.apache.ibatis.annotations.Mapper;
+
+/**
+ * <p>
+ *  Mapper 接口
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@Mapper
+public interface ICaseTabulationMapper extends BaseMapper<CaseTabulation> {
+
+}

+ 19 - 0
src/main/java/com/fdkankan/fusion/service/ICaseOverviewService.java

@@ -0,0 +1,19 @@
+package com.fdkankan.fusion.service;
+
+import com.fdkankan.fusion.entity.CaseOverview;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+public interface ICaseOverviewService extends IService<CaseOverview> {
+
+    List<CaseOverview> getByCaseId(String caseId);
+}

+ 19 - 0
src/main/java/com/fdkankan/fusion/service/ICaseTabulationService.java

@@ -0,0 +1,19 @@
+package com.fdkankan.fusion.service;
+
+import com.fdkankan.fusion.entity.CaseTabulation;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+public interface ICaseTabulationService extends IService<CaseTabulation> {
+
+    List<CaseTabulation> getByCaseId(String caseId);
+}

+ 31 - 0
src/main/java/com/fdkankan/fusion/service/impl/CaseOverviewServiceImpl.java

@@ -0,0 +1,31 @@
+package com.fdkankan.fusion.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.fusion.entity.CaseOverview;
+import com.fdkankan.fusion.mapper.ICaseOverviewMapper;
+import com.fdkankan.fusion.service.ICaseOverviewService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@Service
+public class CaseOverviewServiceImpl extends ServiceImpl<ICaseOverviewMapper, CaseOverview> implements ICaseOverviewService {
+
+
+    @Override
+    public List<CaseOverview> getByCaseId(String caseId) {
+        LambdaQueryWrapper<CaseOverview> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(CaseOverview::getCaseId,caseId);
+        wrapper.orderByDesc(CaseOverview::getId);
+        return this.list(wrapper);
+    }
+}

+ 30 - 0
src/main/java/com/fdkankan/fusion/service/impl/CaseTabulationServiceImpl.java

@@ -0,0 +1,30 @@
+package com.fdkankan.fusion.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fdkankan.fusion.entity.CaseTabulation;
+import com.fdkankan.fusion.mapper.ICaseTabulationMapper;
+import com.fdkankan.fusion.service.ICaseTabulationService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-05-13
+ */
+@Service
+public class CaseTabulationServiceImpl extends ServiceImpl<ICaseTabulationMapper, CaseTabulation> implements ICaseTabulationService {
+
+    @Override
+    public List<CaseTabulation> getByCaseId(String caseId) {
+        LambdaQueryWrapper<CaseTabulation> wrapper = new LambdaQueryWrapper<>();
+        wrapper.eq(CaseTabulation::getCaseId,caseId);
+        wrapper.orderByDesc(CaseTabulation::getId);
+        return this.list(wrapper);
+    }
+}

+ 5 - 0
src/main/resources/mapper/fusion/CaseOverviewMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fdkankan.fusion.mapper.ICaseOverviewMapper">
+
+</mapper>

+ 5 - 0
src/main/resources/mapper/fusion/CaseTabulationMapper.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.fdkankan.fusion.mapper.ICaseTabulationMapper">
+
+</mapper>