LiRong 3 mēneši atpakaļ
vecāks
revīzija
a5ef658be9

+ 5 - 3
leromro-core/src/main/java/com/leromro/core/controller/LSlideshowController.java

@@ -6,6 +6,7 @@ import javax.servlet.http.HttpServletResponse;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
 import com.leromro.common.core.domain.R;
+import lombok.val;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.GetMapping;
@@ -83,7 +84,7 @@ public class LSlideshowController extends BaseController
     @ApiOperation("web新增主页轮播图图片,传入图片 前端分割")
     /*@PreAuthorize("@ss.hasPermi('core:slideshow:add')")*/
     @Log(title = "主页轮播图或后续其他广告图片", businessType = BusinessType.INSERT)
-    @PostMapping
+    @PutMapping
     public AjaxResult add(@RequestBody Slideshow slideshow)
     {
         return toAjax(lSlideshowService.save(slideshow));
@@ -95,10 +96,11 @@ public class LSlideshowController extends BaseController
     @ApiOperation("web修改主页轮播图或后续其他广告图片")
   //  @PreAuthorize("@ss.hasPermi('core:slideshow:edit')")
     @Log(title = "主页轮播图或后续其他广告图片", businessType = BusinessType.UPDATE)
-    @PutMapping
+    @PostMapping
     public AjaxResult edit(@RequestBody Slideshow slideshow)
     {
-        return toAjax(lSlideshowService.updateLSlideshow(slideshow));
+        lSlideshowService.updateLSlideshow(slideshow);
+        return toAjax(true);
     }
 
     /**

+ 2 - 1
leromro-core/src/main/java/com/leromro/core/service/impl/LSlideshowServiceImpl.java

@@ -65,7 +65,8 @@ public class LSlideshowServiceImpl extends ServiceImpl<LSlideshowMapper, Slidesh
     @Override
     public Boolean updateLSlideshow(Slideshow slideshow)
     {
-        return this.updateById(slideshow);
+        boolean b = this.updateById(slideshow);
+        return b;
     }
 
     /**