lyhzzz 4 months ago
parent
commit
44093a092f

File diff suppressed because it is too large
+ 17 - 1
doc/update-1.7.1.sql


+ 8 - 1
src/main/java/com/fdkankan/fusion/controller/AiController.java

@@ -74,6 +74,8 @@ public class AiController {
     ICaseNumService caseNumService;
     @Autowired
     IScenePlusService scenePlusService;
+    @Autowired
+    IAiContentService aiContentService;
     @GetMapping("/getFloor/{caseId}")
     public ResultData getFloor(@PathVariable Integer caseId){
         String foorPath = "/oss/4dkankan/scene_view_data/%s/user";
@@ -83,6 +85,8 @@ public class AiController {
         List<String> numList = byCaseId.stream().filter(e -> e.getNumType() != 3 && e.getNumType() != 2 && e.getNumType()!=5).map(CaseNumEntity::getNum).collect(Collectors.toList());
         List<ScenePlus> scenePluses = scenePlusService.getByNumListAndAi(numList);
 
+        AiContent aiContent = aiContentService.getById(1);
+
         List<FloorPathVo> pathVos = new ArrayList<>();
         for (ScenePlus caseNumEntity : scenePluses) {
 
@@ -108,7 +112,10 @@ public class AiController {
                             pathVo.setNum(caseNumEntity.getNum());
                             pathVo.setTitle(caseNumEntity.getTitle() + floor.getFloorsName());
                             pathVo.setParams(jsonObject);
-                            pathVo.setUrl(foorPath.replace("4dkankan/","")+"/cad-style-3-"+floor.getSubgroup()+".jpg");
+                            pathVo.setUrl(path.replace("4dkankan/","")+"/cad-style-3-"+floor.getSubgroup()+".jpg");
+                            if(aiContent!= null && StringUtils.isNotBlank(aiContent.getContent())){
+                                pathVo.setParamContent(aiContent.getContent());
+                            }
                             pathVos.add(pathVo);
                         }
                     }catch (Exception e){

+ 45 - 0
src/main/java/com/fdkankan/fusion/entity/AiContent.java

@@ -0,0 +1,45 @@
+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-04-17
+ */
+@Getter
+@Setter
+@TableName("t_ai_content")
+public class AiContent implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+
+    @TableId(value = "id", type = IdType.AUTO)
+    private Integer id;
+
+    @TableField("content")
+    private String content;
+
+    @TableField("tb_status")
+    @TableLogic
+    private Integer tbStatus;
+
+    @TableField("create_time")
+    private Date createTime;
+
+    @TableField("update_time")
+    private Date updateTime;
+
+
+}

+ 1 - 1
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_map_config"
+               "t_ai_content"
         }));
 
 //        generate(path,"goods", getTables(new String[]{

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

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

+ 16 - 0
src/main/java/com/fdkankan/fusion/service/IAiContentService.java

@@ -0,0 +1,16 @@
+package com.fdkankan.fusion.service;
+
+import com.fdkankan.fusion.entity.AiContent;
+import com.baomidou.mybatisplus.extension.service.IService;
+
+/**
+ * <p>
+ *  服务类
+ * </p>
+ *
+ * @author 
+ * @since 2025-04-17
+ */
+public interface IAiContentService extends IService<AiContent> {
+
+}

+ 20 - 0
src/main/java/com/fdkankan/fusion/service/impl/AiContentServiceImpl.java

@@ -0,0 +1,20 @@
+package com.fdkankan.fusion.service.impl;
+
+import com.fdkankan.fusion.entity.AiContent;
+import com.fdkankan.fusion.mapper.IAiContentMapper;
+import com.fdkankan.fusion.service.IAiContentService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+
+/**
+ * <p>
+ *  服务实现类
+ * </p>
+ *
+ * @author 
+ * @since 2025-04-17
+ */
+@Service
+public class AiContentServiceImpl extends ServiceImpl<IAiContentMapper, AiContent> implements IAiContentService {
+
+}

+ 5 - 0
src/main/resources/mapper/fusion/AiContentMapper.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.IAiContentMapper">
+
+</mapper>