浏览代码

- 解决WPS的bug
- 初步实现质控

Huanyi 3 月之前
父节点
当前提交
470a1b6474
共有 15 个文件被更改,包括 359 次插入33 次删除
  1. 3 1
      ruoyi-admin/src/main/resources/application.yml
  2. 2 0
      ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java
  3. 1 1
      ruoyi-common/yingpaipay-common-document/src/main/java/com/yingpaipay/common/file/util/PdfUtils.java
  4. 5 0
      ruoyi-modules/yingpaipay-business/pom.xml
  5. 23 3
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/controller/WpsController.java
  6. 49 25
      ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/TextInServiceImpl.java
  7. 43 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/controller/TextinSettingController.java
  8. 47 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/domain/TextinSetting.java
  9. 40 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/domain/bo/TextinSettingBo.java
  10. 50 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/domain/vo/TextinSettingVo.java
  11. 15 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/mapper/TextinSettingMapper.java
  12. 17 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/service/ITextinSettingService.java
  13. 7 3
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/service/impl/CarouselSettingServiceImpl.java
  14. 42 0
      ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/service/impl/TextinSettingServiceImpl.java
  15. 15 0
      script/sql/business/create.sql

+ 3 - 1
ruoyi-admin/src/main/resources/application.yml

@@ -130,10 +130,12 @@ tenant:
         - sys_oss
         - sys_dict_data
         - sys_dict_type
-        - applet_setting
         - sys_user_projects
         - sys_user_folders
+        - applet_setting
         - ai_setting
+        - textin_setting
+        - carousel_setting
 
 # MyBatisPlus配置
 # https://baomidou.com/config/

+ 2 - 0
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/constant/CacheNames.java

@@ -86,6 +86,8 @@ public interface CacheNames {
      */
     String ONLINE_TOKEN = "online_tokens";
 
+    String CAROUSEL_SETTING = "carousel_setting";
+
     String SETTING = "setting";
 
 }

+ 1 - 1
ruoyi-common/yingpaipay-common-document/src/main/java/com/yingpaipay/common/file/util/PdfUtils.java

@@ -17,7 +17,7 @@ import java.util.List;
 
 public class PdfUtils {
 
-    public static File watermark(File file, String remark)  throws IOException {
+    public static File watermark(File file, String remark) throws IOException {
         PDDocument document = PDDocument.load(file);
         PDType1Font font = PDType1Font.HELVETICA_BOLD;
         float fontSize = 10f;

+ 5 - 0
ruoyi-modules/yingpaipay-business/pom.xml

@@ -19,6 +19,11 @@
             <artifactId>ruoyi-system</artifactId>
         </dependency>
 
+        <dependency>
+            <groupId>com.yingpaipay</groupId>
+            <artifactId>yingpaipay-setting</artifactId>
+        </dependency>
+
         <!-- 通用工具-->
         <dependency>
             <groupId>org.dromara</groupId>

+ 23 - 3
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/controller/WpsController.java

@@ -32,6 +32,11 @@ import java.io.InputStream;
 import java.util.*;
 import java.util.concurrent.ConcurrentHashMap;
 
+/**
+ * @Author: Huanyi
+ * @Description: 由于 WPS 服务对于版本管理非常的麻烦,版本回退一直没有很好的解决方案,因此直接由我们自己负责管理版本。
+ */
+
 @RestController
 @RequestMapping("/wps/callback/v3/3rd")
 @RequiredArgsConstructor
@@ -74,13 +79,16 @@ public class WpsController extends BaseController {
             List<WpsVersionDto> versions = dto.getVersions();
             for (WpsVersionDto version : versions) {
                 if (Objects.equals(version.getVersion(), Long.valueOf(ids[1]))) {
+
+                    // FIXME 由于原始版本不能被删除,暂时先不实现: 每新增一个版本,就将原始版本上传一个全新的版本
+//                    // TODO 旧的版本可以不需要了,只需要新的版本
+//                    storage.delete(version.getUrl());
+
                     version.setFileName(uploadResult.getFilename());
                     version.setUrl(uploadResult.getUrl());
                     version.setUpdateTime(new Date());
                 }
             }
-//            dto.getVersions().get(Integer.parseInt(ids[1])).setFileName(uploadResult.getFilename());
-//            dto.getVersions().get(Integer.parseInt(ids[1])).setUrl(uploadResult.getUrl());
 
         } catch (IOException e) {
             log.error("文件写入失败, documentId={}", documentId, e);
@@ -156,6 +164,9 @@ public class WpsController extends BaseController {
         String user_id, Integer read, Integer update, Integer download, Integer rename, Integer history, Integer copy, Integer print, Integer saves, Integer comment
     ) {}
 
+    /**
+     * 随便写的,没必要划分的这么细致
+     */
     @GetMapping("/files/{documentId}/permission")
     public WpsR permission(@PathVariable String documentId) {
         return WpsR.ok(
@@ -271,9 +282,12 @@ public class WpsController extends BaseController {
         dto.setCurrentVersion(currentVersion);
         log.info("自行进行刷新版本");
         dto.getVersions().forEach(e -> log.info("{}", JsonUtils.toJsonString(e)));
-        return R.ok();
+        return R.ok(currentVersion);
     }
 
+    /**
+     * 已废弃
+     */
     @GetMapping("/files/{documentId}/versions")
     public WpsR getVersions(@PathVariable Long documentId, @RequestParam(value = "offset", required = false) Integer offset, @RequestParam(value = "limit", required = false) Integer size) {
         WpsVersionControlDto dto = DOCUMENT_MAP.get(documentId);
@@ -302,6 +316,9 @@ public class WpsController extends BaseController {
         return r;
     }
 
+    /**
+     * 已废弃
+     */
     @GetMapping("/files/{documentId}/versions/{version}")
     public WpsR getFileByVersion(@PathVariable Long documentId, @PathVariable Integer version) {
         WpsVersionControlDto dto = DOCUMENT_MAP.get(documentId);
@@ -324,9 +341,12 @@ public class WpsController extends BaseController {
         long documentId = Long.parseLong(ids[0]);
         long version = Long.parseLong(ids[1]);
 
+        log.info("文档编号为 {}, 版本号为 : {}", documentId, version);
+
         WpsVersionControlDto dto = DOCUMENT_MAP.get(documentId);
         List<WpsVersionDto> versions = dto.getVersions();
         for (WpsVersionDto versionDto : versions) {
+            log.info("当前轮询的版本号为 {}", versionDto.getVersion());
             if (versionDto.getVersion() == version) {
                 String url = versionDto.getUrl();
                 SysOssVo vo = ossService.insertByUrl(versionDto.getFileName(), dto.getFileName(), url);

+ 49 - 25
ruoyi-modules/yingpaipay-business/src/main/java/com/yingpaipay/business/service/impl/TextInServiceImpl.java

@@ -7,6 +7,8 @@ import com.yingpaipay.business.domain.bo.AppletScanBo;
 import com.yingpaipay.business.domain.dto.TextInR;
 import com.yingpaipay.business.service.ITextInService;
 import com.yingpaipay.common.file.config.TextInConfig;
+import com.yingpaipay.setting.domain.vo.TextinSettingVo;
+import com.yingpaipay.setting.service.ITextinSettingService;
 import lombok.RequiredArgsConstructor;
 import org.dromara.common.core.exception.BusinessException;
 import org.dromara.common.json.utils.JsonUtils;
@@ -15,11 +17,9 @@ import org.springframework.http.MediaType;
 import org.springframework.stereotype.Service;
 
 import java.io.*;
-import java.nio.charset.StandardCharsets;
 import java.nio.file.Files;
 import java.nio.file.Path;
 import java.util.Base64;
-import java.util.List;
 import java.util.zip.ZipEntry;
 import java.util.zip.ZipInputStream;
 
@@ -32,14 +32,22 @@ public class TextInServiceImpl implements ITextInService {
 
     private final TextInConfig config;
 
+    private final ITextinSettingService settingService;
+
+    private HttpResponse getResponse(HttpRequest request) {
+        TextinSettingVo setting = settingService.query();
+        HttpResponse response = request.header("x-ti-app-id", setting.getAppId())
+            .header("x-ti-secret-code", setting.getSecretCode())
+            .execute();
+        return response;
+    }
+
     @Override
     public String imageToPdf(AppletScanBo bo) {
 
-        HttpResponse response = HttpRequest.post(config.getImageToPdf())
-            .header("x-ti-app-id", APP_ID)
-            .header("x-ti-secret-code", SECRET_CODE)
-            .body(JsonUtils.toJsonString(bo))
-            .execute();
+        HttpResponse response = getResponse(
+            HttpRequest.post(config.getImageToPdf()).body(JsonUtils.toJsonString(bo))
+        );
 
         TextInR result = getR(response);
 
@@ -66,12 +74,17 @@ public class TextInServiceImpl implements ITextInService {
     @Override
     public String imageToWord(String image) {
 
-        HttpResponse response = HttpRequest.post(config.getImageToWord())
-            .header("x-ti-app-id", APP_ID)
-            .header("x-ti-secret-code", SECRET_CODE)
-            .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
-            .body(Base64.getDecoder().decode(image))
-            .execute();
+//        HttpResponse response = HttpRequest.post(config.getImageToWord())
+//            .header("x-ti-app-id", APP_ID)
+//            .header("x-ti-secret-code", SECRET_CODE)
+//            .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
+//            .body(Base64.getDecoder().decode(image))
+//            .execute();
+        HttpResponse response = getResponse(
+            HttpRequest.post(config.getImageToWord())
+                .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
+                .body(Base64.getDecoder().decode(image))
+        );
 
         TextInR result = getR(response);
 
@@ -81,12 +94,18 @@ public class TextInServiceImpl implements ITextInService {
     @Override
     public String wordToImage(String docx) {
 
-        HttpResponse response = HttpRequest.post(config.getWordToImage())
-            .header("x-ti-app-id", APP_ID)
-            .header("x-ti-secret-code", SECRET_CODE)
-            .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
-            .body(docx)
-            .execute();
+//        HttpResponse response = HttpRequest.post(config.getWordToImage())
+//            .header("x-ti-app-id", APP_ID)
+//            .header("x-ti-secret-code", SECRET_CODE)
+//            .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
+//            .body(docx)
+//            .execute();
+
+        HttpResponse response = getResponse(
+            HttpRequest.post(config.getWordToImage())
+                .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
+                .body(docx)
+        );
 
         TextInR result = getR(response);
         String zipBase64 = result.getResult().toString();
@@ -137,12 +156,17 @@ public class TextInServiceImpl implements ITextInService {
     @Override
     public String wordToPdf(String docx) {
 
-        HttpResponse response = HttpRequest.post(config.getWordToPdf())
-            .header("x-ti-app-id", APP_ID)
-            .header("x-ti-secret-code", SECRET_CODE)
-            .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
-            .body(Base64.getDecoder().decode(docx))
-            .execute();
+//        HttpResponse response = HttpRequest.post(config.getWordToPdf())
+//            .header("x-ti-app-id", APP_ID)
+//            .header("x-ti-secret-code", SECRET_CODE)
+//            .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
+//            .body(Base64.getDecoder().decode(docx))
+//            .execute();
+        HttpResponse response = getResponse(
+            HttpRequest.post(config.getWordToPdf())
+                .header(Header.CONTENT_TYPE, MediaType.APPLICATION_OCTET_STREAM_VALUE)
+                .body(Base64.getDecoder().decode(docx))
+        );
 
         TextInR result = getR(response);
 

+ 43 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/controller/TextinSettingController.java

@@ -0,0 +1,43 @@
+package com.yingpaipay.setting.controller;
+
+
+import cn.dev33.satoken.annotation.SaCheckPermission;
+import com.yingpaipay.setting.domain.bo.TextinSettingBo;
+import com.yingpaipay.setting.domain.vo.TextinSettingVo;
+import lombok.RequiredArgsConstructor;
+import org.dromara.common.core.domain.R;
+import org.dromara.common.log.annotation.Log;
+import org.dromara.common.log.enums.BusinessType;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.validation.annotation.Validated;
+import org.dromara.common.web.core.BaseController;
+import com.yingpaipay.setting.service.ITextinSettingService;
+
+/**
+ * TextIn
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+@Validated
+@RequiredArgsConstructor
+@RestController
+@RequestMapping("/setting/textin")
+public class TextinSettingController extends BaseController {
+
+    private final ITextinSettingService textinSettingService;
+
+    @SaCheckPermission("setting:textin:index")
+    @GetMapping()
+    public R<TextinSettingVo> query() {
+        return R.ok(textinSettingService.query());
+    }
+
+    @SaCheckPermission("setting:textin:edit")
+    @Log(title = "TextIn", businessType = BusinessType.UPDATE)
+    @PutMapping()
+    public R<Void> edit(@RequestBody TextinSettingBo bo) {
+        return toAjax(textinSettingService.update(bo));
+    }
+
+}

+ 47 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/domain/TextinSetting.java

@@ -0,0 +1,47 @@
+package com.yingpaipay.setting.domain;
+
+import org.dromara.common.tenant.core.TenantEntity;
+import com.baomidou.mybatisplus.annotation.*;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.io.Serial;
+
+/**
+ * TextIn对象 textin_setting
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@TableName("textin_setting")
+public class TextinSetting extends TenantEntity {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 序号
+     */
+    @TableId(value = "id")
+    private Long id;
+
+    /**
+     * x-ti-app-id 
+     */
+    private String appId;
+
+    /**
+     * x-ti-secret-code
+     */
+    private String secretCode;
+
+    /**
+     * 删除标志(0代表存在 1代表删除)
+     */
+    @TableLogic
+    private String delFlag;
+
+
+}

+ 40 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/domain/bo/TextinSettingBo.java

@@ -0,0 +1,40 @@
+package com.yingpaipay.setting.domain.bo;
+
+import com.yingpaipay.setting.domain.TextinSetting;
+import org.dromara.common.mybatis.core.domain.BaseEntity;
+import org.dromara.common.core.validate.AddGroup;
+import org.dromara.common.core.validate.EditGroup;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import jakarta.validation.constraints.*;
+
+/**
+ * TextIn业务对象 textin_setting
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@AutoMapper(target = TextinSetting.class, reverseConvertGenerate = false)
+public class TextinSettingBo extends BaseEntity {
+
+    /**
+     * 序号
+     */
+    @NotNull(message = "序号不能为空", groups = { EditGroup.class })
+    private Long id;
+
+    /**
+     * x-ti-app-id 
+     */
+    private String appId;
+
+    /**
+     * x-ti-secret-code
+     */
+    private String secretCode;
+
+
+}

+ 50 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/domain/vo/TextinSettingVo.java

@@ -0,0 +1,50 @@
+package com.yingpaipay.setting.domain.vo;
+
+import com.yingpaipay.setting.domain.TextinSetting;
+import cn.idev.excel.annotation.ExcelIgnoreUnannotated;
+import cn.idev.excel.annotation.ExcelProperty;
+import org.dromara.common.excel.annotation.ExcelDictFormat;
+import org.dromara.common.excel.convert.ExcelDictConvert;
+import io.github.linpeilie.annotations.AutoMapper;
+import lombok.Data;
+
+import java.io.Serial;
+import java.io.Serializable;
+import java.util.Date;
+
+
+
+/**
+ * TextIn视图对象 textin_setting
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+@Data
+@ExcelIgnoreUnannotated
+@AutoMapper(target = TextinSetting.class)
+public class TextinSettingVo implements Serializable {
+
+    @Serial
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 序号
+     */
+    @ExcelProperty(value = "序号")
+    private Long id;
+
+    /**
+     * x-ti-app-id
+     */
+    @ExcelProperty(value = "x-ti-app-id")
+    private String appId;
+
+    /**
+     * x-ti-secret-code
+     */
+    @ExcelProperty(value = "x-ti-secret-code")
+    private String secretCode;
+
+
+}

+ 15 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/mapper/TextinSettingMapper.java

@@ -0,0 +1,15 @@
+package com.yingpaipay.setting.mapper;
+
+import com.yingpaipay.setting.domain.TextinSetting;
+import com.yingpaipay.setting.domain.vo.TextinSettingVo;
+import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;
+
+/**
+ * TextInMapper接口
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+public interface TextinSettingMapper extends BaseMapperPlus<TextinSetting, TextinSettingVo> {
+
+}

+ 17 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/service/ITextinSettingService.java

@@ -0,0 +1,17 @@
+package com.yingpaipay.setting.service;
+
+import com.yingpaipay.setting.domain.bo.TextinSettingBo;
+import com.yingpaipay.setting.domain.vo.TextinSettingVo;
+
+/**
+ * TextInService接口
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+public interface ITextinSettingService {
+
+    TextinSettingVo query();
+
+    boolean update(TextinSettingBo bo);
+}

+ 7 - 3
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/service/impl/CarouselSettingServiceImpl.java

@@ -10,7 +10,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.redis.utils.CacheUtils;
 import org.springframework.cache.annotation.CacheEvict;
+import org.springframework.cache.annotation.CachePut;
 import org.springframework.cache.annotation.Cacheable;
 import org.springframework.stereotype.Service;
 import com.yingpaipay.setting.domain.bo.CarouselSettingBo;
@@ -42,6 +44,7 @@ public class CarouselSettingServiceImpl implements ICarouselSettingService {
      * @param id 主键
      * @return 轮播图设置
      */
+    @Cacheable(cacheNames = CacheNames.CAROUSEL_SETTING, key = "#id")
     @Override
     public CarouselSettingVo queryById(Long id){
         return baseMapper.selectVoById(id);
@@ -67,7 +70,7 @@ public class CarouselSettingServiceImpl implements ICarouselSettingService {
      * @param bo 查询条件
      * @return 轮播图设置列表
      */
-    @Cacheable(cacheNames = CacheNames.SETTING, key = "'carousel'")
+    @Cacheable(cacheNames = CacheNames.CAROUSEL_SETTING)
     @Override
     public List<CarouselSettingVo> queryList(CarouselSettingBo bo) {
         LambdaQueryWrapper<CarouselSetting> lqw = buildQueryWrapper(bo);
@@ -88,7 +91,7 @@ public class CarouselSettingServiceImpl implements ICarouselSettingService {
      * @param bo 轮播图设置
      * @return 是否新增成功
      */
-    @CacheEvict(cacheNames = CacheNames.SETTING, key = "'carousel'")
+    @CachePut(cacheNames = CacheNames.CAROUSEL_SETTING, key = "#bo.id")
     @Override
     public Boolean insertByBo(CarouselSettingBo bo) {
         CarouselSetting add = MapstructUtils.convert(bo, CarouselSetting.class);
@@ -106,7 +109,7 @@ public class CarouselSettingServiceImpl implements ICarouselSettingService {
      * @param bo 轮播图设置
      * @return 是否修改成功
      */
-    @CacheEvict(cacheNames = CacheNames.SETTING, key = "'carousel'")
+    @CachePut(cacheNames = CacheNames.CAROUSEL_SETTING, key = "#bo.id")
     @Override
     public Boolean updateByBo(CarouselSettingBo bo) {
         CarouselSetting update = MapstructUtils.convert(bo, CarouselSetting.class);
@@ -133,6 +136,7 @@ public class CarouselSettingServiceImpl implements ICarouselSettingService {
         if(isValid){
             //TODO 做一些业务上的校验,判断是否需要校验
         }
+        ids.forEach(id -> CacheUtils.evict(CacheNames.CAROUSEL_SETTING, id));
         return baseMapper.deleteByIds(ids) > 0;
     }
 }

+ 42 - 0
ruoyi-modules/yingpaipay-setting/src/main/java/com/yingpaipay/setting/service/impl/TextinSettingServiceImpl.java

@@ -0,0 +1,42 @@
+package com.yingpaipay.setting.service.impl;
+
+import com.yingpaipay.setting.domain.TextinSetting;
+import com.yingpaipay.setting.domain.bo.TextinSettingBo;
+import lombok.RequiredArgsConstructor;
+import lombok.extern.slf4j.Slf4j;
+import org.dromara.common.core.constant.CacheNames;
+import org.dromara.common.core.utils.MapstructUtils;
+import org.springframework.cache.annotation.CachePut;
+import org.springframework.cache.annotation.Cacheable;
+import org.springframework.stereotype.Service;
+import com.yingpaipay.setting.domain.vo.TextinSettingVo;
+import com.yingpaipay.setting.mapper.TextinSettingMapper;
+import com.yingpaipay.setting.service.ITextinSettingService;
+
+
+/**
+ * TextInService业务层处理
+ *
+ * @author Huanyi
+ * @date 2026-01-07
+ */
+@Slf4j
+@RequiredArgsConstructor
+@Service
+public class TextinSettingServiceImpl implements ITextinSettingService {
+
+    private final TextinSettingMapper baseMapper;
+
+    @Cacheable(cacheNames = CacheNames.SETTING, key = "'textin'")
+    @Override
+    public TextinSettingVo query() {
+        return baseMapper.selectVoById(1L);
+    }
+
+    @CachePut(cacheNames = CacheNames.SETTING, key = "'textin'")
+    @Override
+    public boolean update(TextinSettingBo bo) {
+        TextinSetting entity = MapstructUtils.convert(bo, TextinSetting.class);
+        return baseMapper.updateById(entity) > 0;
+    }
+}

+ 15 - 0
script/sql/business/create.sql

@@ -202,3 +202,18 @@ CREATE TABLE `carousel_setting`
     `tenant_id`   varchar(40) COMMENT '租户id'
 ) ENGINE = InnoDB
   DEFAULT CHARSET = utf8mb4 COMMENT ='轮播图设置';
+
+CREATE TABLE `textin_setting`
+(
+    `id`          bigint unsigned PRIMARY KEY NOT NULL AUTO_INCREMENT COMMENT '序号',
+    `app_id`      varchar(255) COMMENT 'x-ti-app-id ',
+    `secret_code` varchar(255) COMMENT 'x-ti-secret-code',
+    `create_dept` bigint(20) COMMENT '创建部门',
+    `create_by`   bigint(20) COMMENT '创建者',
+    `create_time` datetime COMMENT '创建时间',
+    `update_by`   bigint(20) COMMENT '更新者',
+    `update_time` datetime COMMENT '更新时间',
+    `del_flag`    char(1)                              DEFAULT '0' COMMENT '删除标志(0代表存在 1代表删除)',
+    `tenant_id`   varchar(40) COMMENT '租户id'
+) ENGINE = InnoDB
+  DEFAULT CHARSET = utf8mb4 COMMENT ='合合信息科技设置';