From 5a22de857470ed18e993260e2cf3a38a1a43de7e Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期一, 19 八月 2024 17:13:38 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/THtmlController.java |   24 ++++++++++++++++++++++--
 1 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/THtmlController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/THtmlController.java
index 1739f4d..46b995a 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/THtmlController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/THtmlController.java
@@ -1,9 +1,14 @@
 package com.ruoyi.other.controller;
 
 
-import org.springframework.web.bind.annotation.RequestMapping;
+import com.ruoyi.common.core.web.domain.AjaxResult;
+import com.ruoyi.other.api.domain.THtml;
+import com.ruoyi.other.api.domain.TNotice;
+import com.ruoyi.other.service.THtmlService;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.web.bind.annotation.*;
 
-import org.springframework.web.bind.annotation.RestController;
+import javax.annotation.Resource;
 
 /**
  * <p>
@@ -16,6 +21,21 @@
 @RestController
 @RequestMapping("/t-html")
 public class THtmlController {
+    @Resource
+    private THtmlService htmlService;
+    @ApiOperation(tags = {"后台-内容设置-协议服务"},value = "新增修改")
+    @PostMapping(value = "/saveOrUpdate")
+    public AjaxResult saveOrUpdate(@RequestBody THtml tHtml) {
+        htmlService.saveOrUpdate(tHtml);
+    return AjaxResult.success();
+    }
+
+    @ApiOperation(tags = {"后台-内容设置-协议服务"},value = "查询")
+    @PostMapping(value = "/selectByType/{type}")
+    public AjaxResult selectByType(@PathVariable Integer type) {
+        THtml one = htmlService.lambdaQuery().eq(THtml::getType, type).last("limit 1").one();
+        return AjaxResult.success(one);
+    }
 
 }
 

--
Gitblit v1.7.1