From 76a23fa933c32ea14f04d8a127c61f1b1a8cf5e0 Mon Sep 17 00:00:00 2001 From: ChenYan <3139166962@qq.com> Date: Thu, 2 Jan 2025 14:18:31 +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 --- mcwl-admin/pom.xml | 6 ++++++ .../resource/MallProductController.java | 20 ++++++++++--------- mcwl-admin/src/main/resources/application.yml | 4 ++-- .../mcwl/common/core/domain/BaseEntity.java | 6 +++++- .../com/mcwl/resource/domain/MallProduct.java | 1 - .../service/impl/MallProductServiceImpl.java | 2 +- 6 files changed, 25 insertions(+), 14 deletions(-) diff --git a/mcwl-admin/pom.xml b/mcwl-admin/pom.xml index 453838b..af2344c 100644 --- a/mcwl-admin/pom.xml +++ b/mcwl-admin/pom.xml @@ -67,6 +67,12 @@ mcwl-myInvitation 3.8.8 + + + com.mcwl + mcwl-common + 3.8.8 + com.mcwl 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 44f6cab..313166a 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 @@ -1,4 +1,5 @@ package com.mcwl.web.controller.resource; +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; @@ -16,6 +17,7 @@ import java.util.List; * @Description 商品 * @Date:2024/12/31 10:48 */ + @RestController @RequestMapping("/MallProduct") public class MallProductController extends BaseController { @@ -41,7 +43,7 @@ public class MallProductController extends BaseController { /** - * 获取定时任务详细信息 + * 获取详细信息 */ @GetMapping(value = "/{jobId}") public AjaxResult getInfo(@PathVariable("jobId") Long jobId) @@ -50,9 +52,9 @@ public class MallProductController extends BaseController { } /** - * 新增定时任务 + * 新增 */ - @PostMapping + @PostMapping("/add") public AjaxResult add(@RequestBody MallProduct mallProduct) { mallProduct.setCreateBy(getUsername()); @@ -60,9 +62,9 @@ public class MallProductController extends BaseController { } /** - * 修改定时任务 + * 修改 */ - @PutMapping + @PutMapping("/upda") public AjaxResult edit(@RequestBody MallProduct mallProduct) { mallProduct.setUpdateBy(getUsername()); @@ -71,12 +73,12 @@ public class MallProductController extends BaseController { /** - * 删除定时任务 + * 删除定 */ - @DeleteMapping("/{Ids}") - public AjaxResult remove(@PathVariable Long[] Ids) + @DeleteMapping("/{ids}") + public AjaxResult remove(@RequestBody Long[] ids) { - mallProductRuleInfoService.deleteMallProductByIds(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 62ab799..cd7e1b9 100644 --- a/mcwl-admin/src/main/resources/application.yml +++ b/mcwl-admin/src/main/resources/application.yml @@ -116,11 +116,11 @@ mybatis-plus: autoMappingBehavior: PARTIAL # MyBatis 自动映射时未知列或未知属性处理策 # NONE:不做处理 WARNING:打印相关警告 FAILING:抛出异常和详细信息 - autoMappingUnknownColumnBehavior: NONE + autoMappingUnknownColumnBehavior: FAILING # 更详细的日志输出 会有性能损耗 org.apache.ibatis.logging.stdout.StdOutImpl # 关闭日志记录 (可单纯使用 p6spy 分析) org.apache.ibatis.logging.nologging.NoLoggingImpl # 默认日志输出 org.apache.ibatis.logging.slf4j.Slf4jImpl - logImpl: org.apache.ibatis.logging.slf4j.Slf4jImpl + logImpl: org.apache.ibatis.logging.stdout.StdOutImpl global-config: # 是否打印 Logo banner banner: false diff --git a/mcwl-common/src/main/java/com/mcwl/common/core/domain/BaseEntity.java b/mcwl-common/src/main/java/com/mcwl/common/core/domain/BaseEntity.java index 3b6064a..235a7a6 100644 --- a/mcwl-common/src/main/java/com/mcwl/common/core/domain/BaseEntity.java +++ b/mcwl-common/src/main/java/com/mcwl/common/core/domain/BaseEntity.java @@ -4,13 +4,15 @@ import java.io.Serializable; import java.util.Date; import java.util.HashMap; import java.util.Map; + +import com.baomidou.mybatisplus.annotation.TableField; import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonIgnore; import com.fasterxml.jackson.annotation.JsonInclude; /** * Entity基类 - * + * * @author mcwl */ public class BaseEntity implements Serializable @@ -18,6 +20,7 @@ public class BaseEntity implements Serializable private static final long serialVersionUID = 1L; /** 搜索值 */ + @TableField(exist = false) @JsonIgnore private String searchValue; @@ -39,6 +42,7 @@ public class BaseEntity implements Serializable private String remark; /** 请求参数 */ + @TableField(exist = false) @JsonInclude(JsonInclude.Include.NON_EMPTY) private Map params; 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 48e6b3c..055ded9 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 @@ -24,7 +24,6 @@ import java.math.BigDecimal; public class MallProduct extends BaseEntity { private static final long serialVersionUID = 1L; - /** * ID */ 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 5152e10..e36d39c 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 @@ -55,7 +55,7 @@ public class MallProductServiceImpl extends ServiceImpl