From 912d2e62391b1459952375a60ba87cfa842f1c41 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期二, 17 十二月 2024 10:26:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'

---
 ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java
index 18a4626..2e4356d 100644
--- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java
+++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/BaseSettingController.java
@@ -1,10 +1,13 @@
 package com.ruoyi.other.controller;
 
 
+import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson2.JSONObject;
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
 import com.ruoyi.common.core.domain.R;
 import com.ruoyi.other.api.domain.BaseSetting;
 import com.ruoyi.other.service.BaseSettingService;
+import com.ruoyi.other.vo.RefundPassSettingVo;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import org.springframework.web.bind.annotation.*;
@@ -56,7 +59,33 @@
 	}
 	
 	
+	@PostMapping("/setRefundPassSetting")
+	@ApiOperation(value = "保存售后设置", tags = {"管理后台-售后管理"})
+	public R setRefundPassSetting(@RequestBody RefundPassSettingVo settingVo){
+		BaseSetting one = baseSettingService.getOne(new LambdaQueryWrapper<BaseSetting>().eq(BaseSetting::getId, 5));
+		if(null == one){
+			one = new BaseSetting();
+			one.setId(5);
+			one.setContent(JSON.toJSONString(settingVo));
+			baseSettingService.save(one);
+		}else{
+			one.setContent(JSON.toJSONString(settingVo));
+			baseSettingService.updateById(one);
+		}
+		return R.ok();
+	}
 	
 	
+	
+	@PostMapping("/getRefundPassSetting")
+	@ApiOperation(value = "获取售后设置", tags = {"管理后台-售后管理"})
+	public R<RefundPassSettingVo> getRefundPassSetting(){
+		BaseSetting one = baseSettingService.getOne(new LambdaQueryWrapper<BaseSetting>().eq(BaseSetting::getId, 5));
+		if(null != one){
+			RefundPassSettingVo refundPassSettingVo = JSON.parseObject(one.getContent(), RefundPassSettingVo.class);
+			return R.ok(refundPassSettingVo);
+		}
+		return R.ok();
+	}
 }
 

--
Gitblit v1.7.1