From bf1b072b6af7de878fb5750bc14db7a2e2258f0c Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 31 十二月 2025 15:46:30 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOtherConfigController.java | 42 ++++++++++++++++++++++++++++++++++++++++--
1 files changed, 40 insertions(+), 2 deletions(-)
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOtherConfigController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOtherConfigController.java
index 3df5bf2..90a1735 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOtherConfigController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/api/TOtherConfigController.java
@@ -1,8 +1,18 @@
package com.ruoyi.web.controller.api;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
+import com.ruoyi.common.annotation.Log;
+import com.ruoyi.common.core.domain.R;
+import com.ruoyi.common.enums.BusinessType;
+import com.ruoyi.system.model.TOtherConfig;
+import com.ruoyi.system.model.TPartyBuilding;
+import com.ruoyi.system.service.TOtherConfigService;
+import com.ruoyi.system.service.TPartyBuildingService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
/**
* <p>
@@ -12,9 +22,37 @@
* @author xiaochen
* @since 2025-11-06
*/
+@Api(tags = "系统其他设置")
@RestController
@RequestMapping("/t-other-config")
public class TOtherConfigController {
+ private final TOtherConfigService otherConfigService;
+ @Autowired
+ public TOtherConfigController(TOtherConfigService otherConfigService) {
+ this.otherConfigService = otherConfigService;
+ }
+
+ /**
+ * 修改系统其他设置
+ */
+ @Log(title = "系统其他设置管理信息-修改系统其他设置", businessType = BusinessType.UPDATE)
+ @ApiOperation(value = "修改系统其他设置-通知阈值管理")
+ @PostMapping(value = "/update")
+ public R<Boolean> update(@Validated @RequestBody TOtherConfig dto) {
+ if(dto.getDays()!=null && dto.getDays()>=365){
+ return R.fail("天数不能超过365天");
+ }
+ return R.ok(otherConfigService.updateById(dto));
+ }
+
+ /**
+ * 查看系统其他设置详情
+ */
+ @ApiOperation(value = "查看系统其他设置详情")
+ @GetMapping(value = "/getDetailById")
+ public R<TOtherConfig> getDetailById() {
+ return R.ok(otherConfigService.getById(1));
+ }
}
--
Gitblit v1.7.1