From 1a1803b9918a91c1845ffaef199fa648b729e075 Mon Sep 17 00:00:00 2001 From: ChenYan <3139166962@qq.com> Date: Thu, 2 Jan 2025 14:52:02 +0800 Subject: [PATCH] =?UTF-8?q?build:=E4=BE=9D=E8=B5=96=20=E5=B7=A5=E5=85=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../resource/MallProductController.java | 5 +++-- mcwl-admin/src/main/resources/application.yml | 16 ++++++++-------- .../java/com/mcwl/common/domain/IdsParam.java | 4 +++- .../com/mcwl/resource/domain/MallProduct.java | 5 +++++ .../resource/service/MallProductService.java | 3 ++- .../service/impl/MallProductServiceImpl.java | 5 +++-- .../mapper/resource/MallProductMapper.xml | 1 + 7 files changed, 25 insertions(+), 14 deletions(-) diff --git a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java index 313166a..e7e4623 100644 --- a/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java +++ b/mcwl-admin/src/main/java/com/mcwl/web/controller/resource/MallProductController.java @@ -3,6 +3,7 @@ import com.mcwl.common.annotation.Anonymous; import com.mcwl.common.core.controller.BaseController; import com.mcwl.common.core.domain.AjaxResult; import com.mcwl.common.core.page.TableDataInfo; +import com.mcwl.common.domain.IdsParam; import com.mcwl.resource.domain.MallProduct; import com.mcwl.resource.service.MallProductService; import org.springframework.web.bind.annotation.*; @@ -75,8 +76,8 @@ public class MallProductController extends BaseController { /** * 删除定 */ - @DeleteMapping("/{ids}") - public AjaxResult remove(@RequestBody Long[] ids) + @PostMapping + public AjaxResult remove(@RequestBody IdsParam ids) { mallProductRuleInfoService.deleteMallProductByIds(ids); return success(); diff --git a/mcwl-admin/src/main/resources/application.yml b/mcwl-admin/src/main/resources/application.yml index f62228c..8e36ea5 100644 --- a/mcwl-admin/src/main/resources/application.yml +++ b/mcwl-admin/src/main/resources/application.yml @@ -167,12 +167,12 @@ xss: #aliyun-oss - aliyun: - oss: - file: - endPoint: "http://oss-cn-beijing.aliyuncs.com" // 一般不用改,选择自己的地址即可 - keyid: "保存的key" - keyecrets: "保存的secret" - #bucket可以在控制台创建,也可以使用java代码创建 - bucketname: "实例名称" +# aliyun: +# oss: +# file: +# endPoint: "http://oss-cn-beijing.aliyuncs.com" // 一般不用改,选择自己的地址即可 +# keyid: "保存的key" +# keyecrets: "保存的secret" +# #bucket可以在控制台创建,也可以使用java代码创建 +# bucketname: "实例名称" diff --git a/mcwl-common/src/main/java/com/mcwl/common/domain/IdsParam.java b/mcwl-common/src/main/java/com/mcwl/common/domain/IdsParam.java index 213047f..66041d1 100644 --- a/mcwl-common/src/main/java/com/mcwl/common/domain/IdsParam.java +++ b/mcwl-common/src/main/java/com/mcwl/common/domain/IdsParam.java @@ -2,7 +2,9 @@ package com.mcwl.common.domain; import lombok.Data; +import java.util.List; + @Data public class IdsParam { - private Long[] ids; + private List ids; } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/domain/MallProduct.java b/mcwl-resource/src/main/java/com/mcwl/resource/domain/MallProduct.java index 055ded9..cb0fe36 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/domain/MallProduct.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/domain/MallProduct.java @@ -53,6 +53,11 @@ public class MallProduct extends BaseEntity { * 金额 */ private BigDecimal amount; + + /** + * 状态(0未审核 1公开 2隐私 3未通过) + */ + private String status; /** * 图片名称 */ diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/MallProductService.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/MallProductService.java index 61bbd97..c52210e 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/MallProductService.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/MallProductService.java @@ -1,6 +1,7 @@ package com.mcwl.resource.service; import com.baomidou.mybatisplus.extension.service.IService; +import com.mcwl.common.domain.IdsParam; import com.mcwl.resource.domain.MallProduct; import kotlin.Result; @@ -26,6 +27,6 @@ public interface MallProductService extends IService { int updateMallProduct(MallProduct mallProduct); - void deleteMallProductByIds(Long[] ids); + void deleteMallProductByIds(IdsParam ids); } diff --git a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/MallProductServiceImpl.java b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/MallProductServiceImpl.java index e36d39c..84f7cd8 100644 --- a/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/MallProductServiceImpl.java +++ b/mcwl-resource/src/main/java/com/mcwl/resource/service/impl/MallProductServiceImpl.java @@ -2,6 +2,7 @@ package com.mcwl.resource.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; +import com.mcwl.common.domain.IdsParam; import com.mcwl.resource.domain.MallProduct; import com.mcwl.resource.mapper.MallProductMapper; import com.mcwl.resource.service.MallProductService; @@ -54,8 +55,8 @@ public class MallProductServiceImpl extends ServiceImpl