From ab0637e981ab4c85120ccde35ee24ec4abbe3e24 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Fri, 17 Oct 2025 17:20:15 +0800
Subject: [PATCH] Merge branch 'refs/heads/master' into xin
---
oying-system/src/main/java/com/oying/modules/pc/category/rest/PlatformCategoryAdminController.java | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/oying-system/src/main/java/com/oying/modules/pc/category/rest/PlatformCategoryAdminController.java b/oying-system/src/main/java/com/oying/modules/pc/category/rest/PlatformCategoryAdminController.java
index 3dba34a..a840d1a 100644
--- a/oying-system/src/main/java/com/oying/modules/pc/category/rest/PlatformCategoryAdminController.java
+++ b/oying-system/src/main/java/com/oying/modules/pc/category/rest/PlatformCategoryAdminController.java
@@ -1,5 +1,6 @@
package com.oying.modules.pc.category.rest;
+import cn.hutool.core.util.ObjectUtil;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.oying.annotation.Log;
import com.oying.modules.pc.category.converter.PlatformCategoryViewAssembler;
@@ -16,6 +17,7 @@
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.RequiredArgsConstructor;
+import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
@@ -65,9 +67,9 @@
//@PreAuthorize("@el.check('admin:platformCategory:updateById')")
public ResponseEntity<?> updateById(@PathVariable Long categoryId,
@Validated @RequestBody PlatformCategoryUpdateRequest request) {
+ request.setCategoryId(ObjectUtils.defaultIfNull(request.getCategoryId(), categoryId));
PlatformCategoryUpdateDto updateDto = new PlatformCategoryUpdateDto();
BeanUtils.copyProperties(request, updateDto);
- updateDto.setCategoryId(categoryId);
categoryService.update(updateDto);
return ResponseEntity.noContent().build();
}
--
Gitblit v1.9.3