From b27efc697f2f81e0d0f247a2708e58af52a5df9b Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 23 十月 2025 15:14:33 +0800
Subject: [PATCH] bug修改,后台新增修改用户积分
---
cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/AdvertisementController.java | 25 +++++++++++++++++++++----
1 files changed, 21 insertions(+), 4 deletions(-)
diff --git a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/AdvertisementController.java b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/AdvertisementController.java
index e9c5f0b..99c1429 100644
--- a/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/AdvertisementController.java
+++ b/cloud-server-management/src/main/java/com/dsh/guns/modular/system/controller/code/AdvertisementController.java
@@ -13,13 +13,13 @@
import com.dsh.guns.modular.system.service.ICityService;
import com.dsh.guns.modular.system.service.IStoreService;
import com.dsh.guns.modular.system.util.ResultUtil;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiImplicitParams;
+import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.ResponseBody;
+import org.springframework.web.bind.annotation.*;
import java.util.*;
@@ -150,6 +150,8 @@
return PREFIX + "advertisement_benefits.html";
}
+
+
/**
* 跳转到广告编辑页面
*/
@@ -187,6 +189,12 @@
@ResponseBody
@RequestMapping(value = "/addAdvertisement")
public ResultUtil addAdvertisement(@RequestBody Banner banner) {
+ if (banner.getType().equals("请选择")){
+ banner.setType(null);
+ }
+ if (banner.getPage().equals("请选择")){
+ banner.setPage(null);
+ }
banner.setInsertTime(new Date());
bannerClient.addAdvertisement(banner);
return ResultUtil.success("添加成功");
@@ -202,6 +210,15 @@
if (banner.getImg().equals("")||banner==null){
banner.setImg(byId.getImg());
}
+
+ if (banner.getType().equals("请选择")){
+ banner.setType(null);
+ }
+ if (banner.getPage().equals("请选择")){
+ banner.setPage(null);
+ }
+
+
bannerClient.updateAdvertisement(banner);
return ResultUtil.success("添加成功");
}
--
Gitblit v1.7.1