lyhzzz 3 年之前
父節點
當前提交
530d86a405

+ 3 - 3
src/main/java/com/fdkankan/fusion/controller/FusionGuideController.java

@@ -27,11 +27,11 @@ public class FusionGuideController {
     IFusionGuideService fusionGuideService;
 
     @GetMapping("/allList")
-    public ResultData allList(@RequestParam(required = false) Integer fusionId){
-        if(fusionId == null){
+    public ResultData allList(@RequestParam(required = false) Integer caseId){
+        if(caseId == null){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        return ResultData.ok(fusionGuideService.getAllList(fusionId));
+        return ResultData.ok(fusionGuideService.getAllList(caseId));
     }
 
     @PostMapping("/add")

+ 6 - 5
src/main/java/com/fdkankan/fusion/entity/CaseTagPoint.java

@@ -1,9 +1,7 @@
 package com.fdkankan.fusion.entity;
 
-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 com.baomidou.mybatisplus.annotation.*;
+
 import java.io.Serializable;
 import java.util.Date;
 import lombok.Getter;
@@ -27,7 +25,7 @@ public class CaseTagPoint implements Serializable {
     /**
      * 标注位置表
      */
-    @TableId("tag_point_id")
+    @TableId(value = "tag_point_id", type = IdType.AUTO)
     private Integer tagPointId;
 
     /**
@@ -53,6 +51,9 @@ public class CaseTagPoint implements Serializable {
     @TableField("sort")
     private Integer sort;
 
+    @TableField("fusionId")
+    private Integer fusionId;
+
     @TableField("tb_status")
     @TableLogic
     private Integer tbStatus;

+ 3 - 3
src/main/java/com/fdkankan/fusion/entity/FusionGuide.java

@@ -32,10 +32,10 @@ public class FusionGuide implements Serializable {
     private Integer fusionGuideId;
 
     /**
-     * 融合场景id
+     * 案件id
      */
-    @TableField("fusion_id")
-    private Integer fusionId;
+    @TableField("case_id")
+    private Integer caseId;
 
     /**
      * 封面图

+ 3 - 4
src/main/java/com/fdkankan/fusion/entity/FusionNum.java

@@ -1,9 +1,7 @@
 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.TableName;
+import com.baomidou.mybatisplus.annotation.*;
+
 import java.io.Serializable;
 import java.util.Date;
 
@@ -72,6 +70,7 @@ public class FusionNum implements Serializable {
     private String updateTime;
 
     @TableField("tb_status")
+    @TableLogic
     private Integer tbStatus;
 
 }

+ 2 - 2
src/main/java/com/fdkankan/fusion/service/IFusionGuideService.java

@@ -15,9 +15,9 @@ import java.util.List;
  */
 public interface IFusionGuideService extends IService<FusionGuide> {
 
-    List<FusionGuide> getAllList(Integer fusionId);
+    List<FusionGuide> getAllList(Integer caseId);
 
     FusionGuide add(FusionGuide fusionGuide);
 
-    Long getCountByFusionId(Integer fusionId);
+    Long getCountByCaseId(Integer caseId);
 }

+ 5 - 5
src/main/java/com/fdkankan/fusion/service/impl/FusionGuideServiceImpl.java

@@ -26,26 +26,26 @@ public class FusionGuideServiceImpl extends ServiceImpl<IFusionGuideMapper, Fusi
     @Override
     public List<FusionGuide> getAllList(Integer fusionId) {
         LambdaQueryWrapper<FusionGuide> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(FusionGuide::getFusionId,fusionId);
+        wrapper.eq(FusionGuide::getCaseId,fusionId);
         wrapper.orderByAsc(FusionGuide::getSort);
         wrapper.orderByAsc(FusionGuide::getCreateTime);
         return this.list(wrapper);
     }
 
     @Override
-    public Long getCountByFusionId(Integer fusionId) {
+    public Long getCountByCaseId(Integer caseId) {
         LambdaQueryWrapper<FusionGuide> wrapper = new LambdaQueryWrapper<>();
-        wrapper.eq(FusionGuide::getFusionId,fusionId);
+        wrapper.eq(FusionGuide::getCaseId,caseId);
         return this.count(wrapper);
     }
 
     @Override
     public FusionGuide add(FusionGuide fusionGuide) {
-        if(fusionGuide.getFusionId() == null || StringUtils.isEmpty(fusionGuide.getTitle())
+        if(fusionGuide.getCaseId() == null || StringUtils.isEmpty(fusionGuide.getTitle())
             || StringUtils.isEmpty(fusionGuide.getCover())){
             throw new BusinessException(ResultCode.MISSING_REQUIRED_PARAMETERS);
         }
-        Long count = this.getCountByFusionId(fusionGuide.getFusionId());
+        Long count = this.getCountByCaseId(fusionGuide.getCaseId());
         fusionGuide.setSort(count + 1);
         this.save(fusionGuide);
         return fusionGuide;

+ 3 - 0
src/main/java/com/fdkankan/fusion/service/impl/FusionNumServiceImpl.java

@@ -162,6 +162,9 @@ public class FusionNumServiceImpl extends ServiceImpl<IFusionNumMapper, FusionNu
         if(param.getBottom()!=null){
             wrapper.set(FusionNum::getBottom,param.getBottom());
         }
+        if(param.getHide()!=null){
+            wrapper.set(FusionNum::getHide,param.getHide());
+        }
         this.update(wrapper);
     }