|
@@ -1,5 +1,7 @@
|
|
|
package cn.iocoder.yudao.module.product.controller.admin.property;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollectionUtil;
|
|
|
+import cn.hutool.crypto.symmetric.AES;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
|
|
import cn.iocoder.yudao.framework.common.pojo.PageResult;
|
|
|
import cn.iocoder.yudao.module.product.controller.admin.property.vo.value.ProductPropertyValueCreateReqVO;
|
|
@@ -18,6 +20,9 @@ import org.springframework.web.bind.annotation.*;
|
|
|
import javax.annotation.Resource;
|
|
|
import javax.validation.Valid;
|
|
|
|
|
|
+import java.util.Arrays;
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;
|
|
|
|
|
|
@Tag(name = "管理后台 - 商品属性值")
|
|
@@ -32,14 +37,14 @@ public class ProductPropertyValueController {
|
|
|
@PostMapping("/create")
|
|
|
@Operation(summary = "创建属性值")
|
|
|
@PreAuthorize("@ss.hasPermission('product:property:create')")
|
|
|
- public CommonResult<Long> createProperty(@Valid @RequestBody ProductPropertyValueCreateReqVO createReqVO) {
|
|
|
+ public CommonResult<Long> createPropertyValue(@Valid @RequestBody ProductPropertyValueCreateReqVO createReqVO) {
|
|
|
return success(productPropertyValueService.createPropertyValue(createReqVO));
|
|
|
}
|
|
|
|
|
|
@PutMapping("/update")
|
|
|
@Operation(summary = "更新属性值")
|
|
|
@PreAuthorize("@ss.hasPermission('product:property:update')")
|
|
|
- public CommonResult<Boolean> updateProperty(@Valid @RequestBody ProductPropertyValueUpdateReqVO updateReqVO) {
|
|
|
+ public CommonResult<Boolean> updatePropertyValue(@Valid @RequestBody ProductPropertyValueUpdateReqVO updateReqVO) {
|
|
|
productPropertyValueService.updatePropertyValue(updateReqVO);
|
|
|
return success(true);
|
|
|
}
|
|
@@ -48,7 +53,7 @@ public class ProductPropertyValueController {
|
|
|
@Operation(summary = "删除属性值")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
@PreAuthorize("@ss.hasPermission('product:property:delete')")
|
|
|
- public CommonResult<Boolean> deleteProperty(@RequestParam("id") Long id) {
|
|
|
+ public CommonResult<Boolean> deletePropertyValue(@RequestParam("id") Long id) {
|
|
|
productPropertyValueService.deletePropertyValue(id);
|
|
|
return success(true);
|
|
|
}
|
|
@@ -57,7 +62,7 @@ public class ProductPropertyValueController {
|
|
|
@Operation(summary = "获得属性值")
|
|
|
@Parameter(name = "id", description = "编号", required = true, example = "1024")
|
|
|
@PreAuthorize("@ss.hasPermission('product:property:query')")
|
|
|
- public CommonResult<ProductPropertyValueRespVO> getProperty(@RequestParam("id") Long id) {
|
|
|
+ public CommonResult<ProductPropertyValueRespVO> getPropertyValue(@RequestParam("id") Long id) {
|
|
|
return success(ProductPropertyValueConvert.INSTANCE.convert(productPropertyValueService.getPropertyValue(id)));
|
|
|
}
|
|
|
|