From cf91af75aa24cbb168befd26d48b182d52938d3c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AC=A8=E8=9B=8B?= <14958938+qianqiao5-6-7@user.noreply.gitee.com> Date: Sat, 16 Nov 2024 06:26:17 +0800 Subject: [PATCH] =?UTF-8?q?2024-11-14=EF=BC=88=E5=B1=9E=E6=80=A7=E7=BB=84?= =?UTF-8?q?=20=E5=95=86=E5=93=81=E8=A7=84=E6=A0=BC=20=20=E5=93=81=E7=B1=BB?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=20=20=20=E7=8A=B6=E6=80=81=E6=8C=89=E9=92=AE?= =?UTF-8?q?=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../muyu/product/domain/AttributeGroup.java | 11 +-- .../com/muyu/product/domain/CategoryInfo.java | 19 ++-- .../com/muyu/product/domain/RuleAttrInfo.java | 2 + .../domain/model/AttributeGroupSaveModel.java | 10 ++ .../domain/model/CategoryInfoSaveModel.java | 1 + .../domain/req/AttributeGroupStateReq.java | 24 +++++ .../domain/req/CategoryInfoEditReq.java | 19 ++++ .../product/domain/req/RuleInfoSaveReq.java | 3 + .../domain/req/WyzRuleInfoSaveReq.java | 15 +++ .../domain/resp/AttributeGroupPageResp.java | 3 + .../domain/resp/CategoryInfoUpdResp.java | 63 +++++++++++++ .../controller/AttributeGroupController.java | 13 +++ .../controller/CategoryInfoController.java | 48 +++++----- .../controller/RuleAttrInfoController.java | 18 +++- .../AsCategoryAttributeGroupMapper.java | 19 +++- .../mapper/AsCategoryAttributeMapper.java | 23 ++++- .../product/mapper/AsCategoryBrandMapper.java | 20 +++- .../product/mapper/CategoryInfoMapper.java | 6 +- .../muyu/product/mapper/RuleInfoMapper.java | 2 + .../service/AttributeGroupService.java | 7 +- .../product/service/CategoryInfoService.java | 21 ++++- .../product/service/RuleAttrInfoService.java | 7 ++ .../impl/AttributeGroupServiceImpl.java | 29 ++++++ .../service/impl/CategoryInfoServiceImpl.java | 91 +++++++++++++++++++ .../service/impl/RuleAttrInfoServiceImpl.java | 25 +++++ .../service/impl/RuleInfoServiceImpl.java | 7 +- .../AsCategoryAttributeGroupMapper.xml | 13 +++ .../product/AsCategoryAttributeMapper.xml | 44 ++++++--- .../mapper/product/CategoryInfoMapper.xml | 55 ++++++++--- 29 files changed, 532 insertions(+), 86 deletions(-) create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/AttributeGroupStateReq.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/WyzRuleInfoSaveReq.java create mode 100644 muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryInfoUpdResp.java diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java index ea8fc3d..9d7e518 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/AttributeGroup.java @@ -5,10 +5,8 @@ import com.fasterxml.jackson.annotation.JsonFormat; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; -import lombok.EqualsAndHashCode; -import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; +import com.muyu.product.domain.req.AttributeGroupStateReq; +import lombok.*; import lombok.experimental.SuperBuilder; import io.swagger.annotations.*; import com.muyu.common.core.annotation.Excel; @@ -74,9 +72,8 @@ public class AttributeGroup extends BaseEntity { * 修改构造器 */ public static AttributeGroup editBuild(Long id, AttributeGroupEditReq attributeGroupEditReq){ - - - return AttributeGroup.builder().id(id).name(attributeGroupEditReq.getName()) + return AttributeGroup.builder() + .id(id) .states(attributeGroupEditReq.getStates()) .build(); } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java index 73cf0ca..7845253 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/CategoryInfo.java @@ -3,21 +3,21 @@ package com.muyu.product.domain; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.muyu.common.core.annotation.Excel; +import com.muyu.common.core.web.domain.TreeEntity; import com.muyu.product.domain.model.CategoryInfoSaveModel; +import com.muyu.product.domain.req.CategoryInfoEditReq; +import com.muyu.product.domain.req.CategoryInfoQueryReq; +import com.muyu.product.domain.req.CategoryInfoSaveReq; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; import lombok.NoArgsConstructor; -import lombok.AllArgsConstructor; import lombok.experimental.SuperBuilder; -import io.swagger.annotations.*; -import com.muyu.common.core.annotation.Excel; -import com.muyu.product.domain.req.CategoryInfoQueryReq; -import com.muyu.product.domain.req.CategoryInfoSaveReq; -import com.muyu.product.domain.req.CategoryInfoEditReq; -import com.muyu.common.core.web.domain.TreeEntity; import java.util.Date; -import java.util.function.Function; import java.util.function.Supplier; /** @@ -62,7 +62,8 @@ public class CategoryInfo extends TreeEntity { @ApiModelProperty(name = "介绍", value = "介绍") private String introduction; - + + /** * 查询构造器 diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java index 660d062..d5ba1d5 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/RuleAttrInfo.java @@ -55,6 +55,8 @@ public class RuleAttrInfo extends BaseEntity { @Excel(name = "规格值") @ApiModelProperty(name = "规格值", value = "规格值") private String attrValue; + + /** * 查询构造器 */ diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/AttributeGroupSaveModel.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/AttributeGroupSaveModel.java index eecfb3f..502b42f 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/AttributeGroupSaveModel.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/AttributeGroupSaveModel.java @@ -3,6 +3,7 @@ package com.muyu.product.domain.model; import com.muyu.common.core.web.domain.BaseEntity; import com.muyu.product.domain.AttributeGroup; import com.muyu.product.domain.req.AttributeGroupSaveReq; +import com.muyu.product.domain.req.AttributeGroupStateReq; import lombok.AllArgsConstructor; import lombok.Data; import lombok.EqualsAndHashCode; @@ -27,6 +28,8 @@ public class AttributeGroupSaveModel extends BaseEntity { private static final long serialVersionUID = 1L; + /** 状态 id */ + private Long id; /** 组名称 */ private String name; @@ -46,6 +49,13 @@ public class AttributeGroupSaveModel extends BaseEntity { .build(); } + public static AttributeGroupStateReq updateState(AttributeGroupStateReq attributeGroupStateReq) { + return AttributeGroupStateReq.builder() + .id(attributeGroupStateReq.getId()) + .states(attributeGroupStateReq.getStates()) + .build(); + } + public AttributeGroup buildAttributeGroup () { return AttributeGroup.builder() .name(this.getName()) diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java index 8a77303..c228d5b 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/model/CategoryInfoSaveModel.java @@ -31,6 +31,7 @@ public class CategoryInfoSaveModel extends TreeEntity { private static final long serialVersionUID = 1L; + /** 品类名称 */ private String name; diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/AttributeGroupStateReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/AttributeGroupStateReq.java new file mode 100644 index 0000000..23e5ab4 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/AttributeGroupStateReq.java @@ -0,0 +1,24 @@ +package com.muyu.product.domain.req; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +/** + * 修改 属性状态 + */ +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class AttributeGroupStateReq { + + /** 属性id */ + @ApiModelProperty(name = "属性id", value = "属性id", required = true) + private Long id; + /** 状态 */ + @ApiModelProperty(name = "状态", value = "状态", required = true) + private String states; +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryInfoEditReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryInfoEditReq.java index 023446a..29080fc 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryInfoEditReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/CategoryInfoEditReq.java @@ -8,6 +8,8 @@ import lombok.experimental.SuperBuilder; import io.swagger.annotations.*; import com.muyu.common.core.web.domain.TreeEntity; +import java.util.List; + /** * 品类信息对象 category_info * @@ -39,4 +41,21 @@ public class CategoryInfoEditReq extends TreeEntity { @ApiModelProperty(name = "介绍", value = "介绍") private String introduction; + /** + * 商品属性组关联ID + */ + @ApiModelProperty(name = "商品属性组关联ID", value = "商品属性组关联ID") + private List attributeGroupIdList; + /** + * 商品属性关联ID + */ + @ApiModelProperty(name = "商品属性关联ID", value = "商品属性关联ID") + private List attributeIdList; + + /** + * 商品品牌组关联ID + */ + @ApiModelProperty(name = "商品品牌组关联ID", value = "商品品牌组关联ID") + private List brandIdList; + } diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/RuleInfoSaveReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/RuleInfoSaveReq.java index c6ef9ff..6b61f19 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/RuleInfoSaveReq.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/RuleInfoSaveReq.java @@ -26,6 +26,9 @@ public class RuleInfoSaveReq extends BaseEntity { private static final long serialVersionUID = 1L; + /** 规格名称 */ + @ApiModelProperty(name = "规格id", value = "规格id") + private Long id; /** 规格名称 */ @ApiModelProperty(name = "规格名称", value = "规格名称") private String name; diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/WyzRuleInfoSaveReq.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/WyzRuleInfoSaveReq.java new file mode 100644 index 0000000..a2b9890 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/req/WyzRuleInfoSaveReq.java @@ -0,0 +1,15 @@ +package com.muyu.product.domain.req; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +@Data +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class WyzRuleInfoSaveReq { + public Long id; + public String status; +} diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/AttributeGroupPageResp.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/AttributeGroupPageResp.java index 7936caf..8d8bc40 100644 --- a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/AttributeGroupPageResp.java +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/AttributeGroupPageResp.java @@ -34,6 +34,9 @@ public class AttributeGroupPageResp extends BaseEntity { /** 状态 */ private String states; + /** 备注*/ + private String remark; + /** * 属性对象集合 diff --git a/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryInfoUpdResp.java b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryInfoUpdResp.java new file mode 100644 index 0000000..b6642a5 --- /dev/null +++ b/muyu-modules/muyu-product/muyu-product-common/src/main/java/com/muyu/product/domain/resp/CategoryInfoUpdResp.java @@ -0,0 +1,63 @@ +package com.muyu.product.domain.resp; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.muyu.common.core.annotation.Excel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.util.List; + +@AllArgsConstructor +@Builder +@NoArgsConstructor +@Data +/** 品类信息*/ +public class CategoryInfoUpdResp { + /** 主键 */ + @TableId(value = "id",type = IdType.AUTO) + @ApiModelProperty(name = "主键", value = "主键") + private Long id; + + /** 品类名称 */ + @Excel(name = "品类名称") + @ApiModelProperty(name = "品类名称", value = "品类名称", required = true) + private String name; + + /** 图片 */ + @Excel(name = "图片") + @ApiModelProperty(name = "图片", value = "图片", required = true) + private String image; + + /** 是否启用 */ + @Excel(name = "是否启用") + @ApiModelProperty(name = "是否启用", value = "是否启用", required = true) + private String start; + + /** 介绍 */ + @Excel(name = "介绍") + @ApiModelProperty(name = "介绍", value = "介绍") + private String introduction; + + /** + * 商品属性 组 关联ID + * AttributeGroup + */ + /** + * 属性集合 + */ + private List attributeInfoList; + + /** + * 属性组集合 + */ + private List attributeGroupList; + + /** + * 品牌集合 + */ + private List brandInfoList; +} diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java index 4502c93..aa4f6ea 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/AttributeGroupController.java @@ -4,6 +4,7 @@ import java.util.List; import javax.servlet.http.HttpServletResponse; import com.muyu.product.domain.model.AttributeGroupSaveModel; +import com.muyu.product.domain.req.AttributeGroupStateReq; import com.muyu.product.domain.resp.AttributeGroupPageResp; import com.muyu.product.domain.resp.AttributeGroupUpd; import io.swagger.annotations.*; @@ -104,6 +105,18 @@ public class AttributeGroupController extends BaseController { return Result.success("修改成功"); } + /*** + * 修改属性 状态 + */ + @RequiresPermissions("product:attributeGroup:edit") + @Log(title = "属性状态", businessType = BusinessType.UPDATE) + @PutMapping("/updateState") + @ApiOperation("修改属性状态") + public Result updateState(@RequestBody AttributeGroupStateReq attributeGroupStateReq) { + attributeGroupService.updateState(attributeGroupStateReq); + return Result.success("修改成功"); + } + /** * 删除属性组 */ diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java index 55dbaef..2d674b0 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/CategoryInfoController.java @@ -1,37 +1,28 @@ package com.muyu.product.controller; -import java.util.List; -import java.util.function.Supplier; -import javax.servlet.http.HttpServletResponse; - -import com.muyu.common.security.utils.SecurityUtils; -import com.muyu.product.domain.AttributeGroup; -import com.muyu.product.domain.AttributeInfo; -import com.muyu.product.domain.BrandInfo; -import com.muyu.product.domain.model.CategoryInfoSaveModel; -import com.muyu.product.domain.resp.CategoryCommonElementResp; -import com.muyu.product.domain.resp.CategoryParentCommonElementResp; -import io.swagger.annotations.*; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.web.bind.annotation.GetMapping; -import org.springframework.web.bind.annotation.PostMapping; -import org.springframework.web.bind.annotation.PutMapping; -import org.springframework.web.bind.annotation.DeleteMapping; -import org.springframework.web.bind.annotation.PathVariable; -import org.springframework.web.bind.annotation.RequestBody; -import org.springframework.web.bind.annotation.RequestMapping; -import org.springframework.web.bind.annotation.RestController; import com.muyu.common.core.domain.Result; import com.muyu.common.core.utils.poi.ExcelUtil; import com.muyu.common.core.web.controller.BaseController; import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; import com.muyu.common.security.annotation.RequiresPermissions; +import com.muyu.common.security.utils.SecurityUtils; import com.muyu.product.domain.CategoryInfo; -import com.muyu.product.domain.req.CategoryInfoQueryReq; -import com.muyu.product.domain.req.CategoryInfoSaveReq; +import com.muyu.product.domain.model.CategoryInfoSaveModel; import com.muyu.product.domain.req.CategoryInfoEditReq; +import com.muyu.product.domain.req.CategoryInfoSaveReq; +import com.muyu.product.domain.resp.CategoryCommonElementResp; +import com.muyu.product.domain.resp.CategoryInfoUpdResp; +import com.muyu.product.domain.resp.CategoryParentCommonElementResp; import com.muyu.product.service.CategoryInfoService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.util.List; /** * 品类信息Controller @@ -77,8 +68,8 @@ public class CategoryInfoController extends BaseController { @RequiresPermissions("product:category:query") @GetMapping(value = "/{id}") @ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class) - public Result getInfo(@PathVariable("id") Long id) { - return Result.success(categoryInfoService.getById(id)); + public Result getInfo(@PathVariable("id") Long id) { + return Result.success(categoryInfoService.getByIdUpd(id)); } /** @@ -104,7 +95,6 @@ public class CategoryInfoController extends BaseController { CategoryInfoSaveModel.saveBuild(categoryInfoSaveReq, SecurityUtils::getUsername) )); } - /** * 修改品类信息 */ @@ -113,7 +103,11 @@ public class CategoryInfoController extends BaseController { @PutMapping("/{id}") @ApiOperation("修改品类信息") public Result edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) { - return toAjax(categoryInfoService.updateById(CategoryInfo.editBuild(id,categoryInfoEditReq))); + boolean b = categoryInfoService.updateUpdById(id, categoryInfoEditReq); + if (b){ + return Result.success("修改成功"); + } + return Result.success("......"); } /** diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleAttrInfoController.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleAttrInfoController.java index 422428b..b7a3d11 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleAttrInfoController.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/controller/RuleAttrInfoController.java @@ -3,6 +3,7 @@ package com.muyu.product.controller; import java.util.List; import javax.servlet.http.HttpServletResponse; +import com.muyu.product.domain.req.*; import io.swagger.annotations.*; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; @@ -20,9 +21,6 @@ import com.muyu.common.log.annotation.Log; import com.muyu.common.log.enums.BusinessType; import com.muyu.common.security.annotation.RequiresPermissions; import com.muyu.product.domain.RuleAttrInfo; -import com.muyu.product.domain.req.RuleAttrInfoQueryReq; -import com.muyu.product.domain.req.RuleAttrInfoSaveReq; -import com.muyu.product.domain.req.RuleAttrInfoEditReq; import com.muyu.product.service.RuleAttrInfoService; import com.muyu.common.core.web.page.TableDataInfo; @@ -105,6 +103,20 @@ public class RuleAttrInfoController extends BaseController { return toAjax(ruleAttrInfoService.updateById(RuleAttrInfo.editBuild(id,ruleAttrInfoEditReq))); } + /** + * 修改规格 状态 wyz + */ + @RequiresPermissions("product:ruleAttr:edit") + @Log(title = "规格xuigai", businessType = BusinessType.UPDATE) + @PutMapping("/ruleInfoStateReq") + @ApiOperation("修改规格 属性") + public Result ruleInfoStateReq(@RequestBody WyzRuleInfoSaveReq wyzRuleInfoSaveReq) { + ruleAttrInfoService.updateSaveById(wyzRuleInfoSaveReq); + return Result.success("修改成功"); + + } + + /** * 删除规格详情 */ diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeGroupMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeGroupMapper.java index b09e788..7780867 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeGroupMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeGroupMapper.java @@ -1,8 +1,11 @@ package com.muyu.product.mapper; -import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.product.domain.AsCategoryAttributeGroup; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 品类属性组中间Mapper接口 @@ -10,6 +13,20 @@ import com.muyu.product.domain.AsCategoryAttributeGroup; * @author DongZeLiang * @date 2024-02-27 */ +@Mapper public interface AsCategoryAttributeGroupMapper extends BaseMapper { + /**删除 品类 属性组 中间表 */ + void deleteAsCategoryAttributeGroup(Long id); + /** + * 添加 品类 属性组 中间表 + * categoryId:品类id + * attributeGroupId:属性id + */ + void addAsCategoryAttributeGroup(@Param("categoryId") Long categoryId, @Param("attributeGroupId") Long attributeGroupId); + + /** + * 查询 品类 属性组 中间表 + */ + List selectAsCategoryAttributeGroupList(@Param("id") Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeMapper.java index 66c2e87..0689dba 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryAttributeMapper.java @@ -1,8 +1,11 @@ package com.muyu.product.mapper; -import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.product.domain.AsCategoryAttribute; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 品类属性中间Mapper接口 @@ -10,6 +13,22 @@ import com.muyu.product.domain.AsCategoryAttribute; * @author DongZeLiang * @date 2024-02-27 */ +@Mapper public interface AsCategoryAttributeMapper extends BaseMapper { -} + /**删除 品类 属性 中间表 */ + void deleteAsCategoryAttribute(Long id); + + + /** + * 添加 品类 属性 中间表 + * categoryId:品类id + * attributeId:属性id + */ + void addAsCategoryAttribute(@Param("categoryId") Long categoryId, @Param("attributeId") Long attributeId); + + /** + * 查询 品类 属性组 中间表 + */ + List selectAsCategoryAttributeList(@Param("id") Long id); + } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryBrandMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryBrandMapper.java index 3e8c164..115458e 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryBrandMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/AsCategoryBrandMapper.java @@ -1,8 +1,11 @@ package com.muyu.product.mapper; -import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.product.domain.AsCategoryBrand; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; /** * 品类品牌中间Mapper接口 @@ -10,6 +13,21 @@ import com.muyu.product.domain.AsCategoryBrand; * @author DongZeLiang * @date 2024-02-27 */ +@Mapper public interface AsCategoryBrandMapper extends BaseMapper { + /**删除 品类 品牌 中间表 */ + void deleteAsCategoryBrandMapper(Long id); + + /** + * 添加 品类 品牌 中间表 + * categoryId:品类id + * brandId:品牌id + */ + void addAsCategoryBrandMapper(@Param("categoryId") Long categoryId, @Param("brandId") Long brandId); + + /** + * 查询 品类 属性组 中间表 + */ + List selectAsCategoryBrandList(@Param("id") Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java index 6ed8f75..3518d3d 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/CategoryInfoMapper.java @@ -1,8 +1,8 @@ package com.muyu.product.mapper; -import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.product.domain.CategoryInfo; +import org.apache.ibatis.annotations.Mapper; /** * 品类信息Mapper接口 @@ -10,6 +10,10 @@ import com.muyu.product.domain.CategoryInfo; * @author DongZeLiang * @date 2024-02-27 */ +@Mapper public interface CategoryInfoMapper extends BaseMapper { + + //修改 品类 + boolean updateCategoryInfo( CategoryInfo categoryInfo ); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleInfoMapper.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleInfoMapper.java index 497a29a..f7e2b93 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleInfoMapper.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/mapper/RuleInfoMapper.java @@ -3,6 +3,7 @@ package com.muyu.product.mapper; import java.util.List; import com.baomidou.mybatisplus.core.mapper.BaseMapper; import com.muyu.product.domain.RuleInfo; +import org.apache.ibatis.annotations.Mapper; /** * 商品规格Mapper接口 @@ -10,6 +11,7 @@ import com.muyu.product.domain.RuleInfo; * @author DongZeLiang * @date 2024-02-27 */ +@Mapper public interface RuleInfoMapper extends BaseMapper { } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java index 05521a2..8bcc15f 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java @@ -5,6 +5,7 @@ import com.muyu.common.core.web.page.TableDataInfo; import com.muyu.product.domain.AttributeGroup; import com.muyu.product.domain.model.AttributeGroupSaveModel; import com.muyu.product.domain.req.AttributeGroupEditReq; +import com.muyu.product.domain.req.AttributeGroupStateReq; import com.muyu.product.domain.resp.AttributeGroupPageResp; import com.muyu.product.domain.resp.AttributeGroupUpd; @@ -51,5 +52,9 @@ public interface AttributeGroupService extends IService { */ AttributeGroupUpd getByIdUpd(Long id); - + /** + * 修改 属性 状态 (wyz) + * @param attributeGroupStateReq + */ + void updateState(AttributeGroupStateReq attributeGroupStateReq); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryInfoService.java index 9b99d9d..d8c5e1e 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryInfoService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/CategoryInfoService.java @@ -1,16 +1,18 @@ package com.muyu.product.service; -import java.util.List; - +import com.baomidou.mybatisplus.extension.service.IService; import com.muyu.product.domain.AttributeGroup; import com.muyu.product.domain.AttributeInfo; import com.muyu.product.domain.BrandInfo; import com.muyu.product.domain.CategoryInfo; -import com.baomidou.mybatisplus.extension.service.IService; import com.muyu.product.domain.model.CategoryInfoSaveModel; +import com.muyu.product.domain.req.CategoryInfoEditReq; import com.muyu.product.domain.resp.CategoryCommonElementResp; +import com.muyu.product.domain.resp.CategoryInfoUpdResp; import com.muyu.product.domain.resp.CategoryParentCommonElementResp; +import java.util.List; + /** * 品类信息Service接口 * @@ -69,4 +71,17 @@ public interface CategoryInfoService extends IService { CategoryCommonElementResp getTemplateAttributeByCateGoryId (Long cateGoryId); public List getCommon (Long categoryId, IService iService, IService bsiService); + + /** + * 修改品类信息 吴彦祖 + * @param id + * @param categoryInfoEditReq + * @return + */ + + boolean updateUpdById(Long id, CategoryInfoEditReq categoryInfoEditReq); + + + /** 获取品类信息详细信息 wyz*/ + CategoryInfoUpdResp getByIdUpd(Long id); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/RuleAttrInfoService.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/RuleAttrInfoService.java index 2623202..6133340 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/RuleAttrInfoService.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/RuleAttrInfoService.java @@ -3,6 +3,8 @@ package com.muyu.product.service; import java.util.List; import com.muyu.product.domain.RuleAttrInfo; import com.baomidou.mybatisplus.extension.service.IService; +import com.muyu.product.domain.req.RuleInfoSaveReq; +import com.muyu.product.domain.req.WyzRuleInfoSaveReq; /** * 规格详情Service接口 @@ -25,4 +27,9 @@ public interface RuleAttrInfoService extends IService { * @return 规格详情集合 */ List getInfoByRuleId (Long ruleId); + + /** + * 修改 规格 状态 + */ + void updateSaveById(WyzRuleInfoSaveReq wyzRuleInfoSaveReq); } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java index 77554cd..fb40f73 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/AttributeGroupServiceImpl.java @@ -1,6 +1,8 @@ package com.muyu.product.service.impl; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; +import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.github.pagehelper.PageInfo; import com.muyu.common.core.utils.ObjUtils; @@ -10,6 +12,7 @@ import com.muyu.product.domain.AttributeGroup; import com.muyu.product.domain.AttributeInfo; import com.muyu.product.domain.model.AttributeGroupSaveModel; import com.muyu.product.domain.req.AttributeGroupEditReq; +import com.muyu.product.domain.req.AttributeGroupStateReq; import com.muyu.product.domain.resp.AttributeGroupPageResp; import com.muyu.product.domain.resp.AttributeGroupUpd; import com.muyu.product.mapper.AsAttributeGroupMapper; @@ -43,9 +46,15 @@ public class AttributeGroupServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(AttributeGroup ::getId ,attributeGroupStateReq.getId()); + + AttributeGroup attributeGroup = new AttributeGroup(); + attributeGroup.setStates(attributeGroupStateReq.getStates()); + + mapper.update(attributeGroup,queryWrapper); + } /** * 吴彦祖 的 回显属性组 @@ -169,4 +195,7 @@ public class AttributeGroupServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(CategoryInfo::getId,id); + + //修改 品类信息 + CategoryInfo info = CategoryInfo.editBuild(id, categoryInfoEditReq); + if (info != null){ + //修改 品类中 的 商品属性 attributeIdList + updateAttributeIdList(id, categoryInfoEditReq); + //修改 品类中 的 商品属性组 (attributeGroupIdList) + updateAttributeGroupIdList(id, categoryInfoEditReq); + //修改 品类中 的 商品品牌组 brandIdList + updateAsCategoryBrandMapper(id, categoryInfoEditReq); + return true; + } + + return false; + + + } + + /** 获取品类信息详细信息 wyz*/ + @Override + public CategoryInfoUpdResp getByIdUpd(Long id) { + LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(CategoryInfo::getId,id); + CategoryInfo byId = this.getById(id); + //查询 品类信息 + return CategoryInfoUpdResp.builder() + .id(byId.getId()) + .name(byId.getName()) + .image(byId.getImage()) + .start(byId.getStart()) + .introduction(byId.getIntroduction()) + .attributeInfoList(attributeGroupMapper.selectAsCategoryAttributeGroupList(id)) + .attributeGroupList(attributeGroupMapper.selectAsCategoryAttributeGroupList(id)) + .brandInfoList(asCategoryBrandMapper.selectAsCategoryBrandList(id)) + .build(); + } + + /**修改 品类中 的 商品品牌组 brandIdList**/ + private void updateAsCategoryBrandMapper(Long id, CategoryInfoEditReq categoryInfoEditReq) { + //修改 品类中 的 商品属性 attributeIdList + /** 删除商品品牌组*/ + asCategoryBrandMapper.deleteAsCategoryBrandMapper(id); + //获取 入参中的 商品品牌组 id 集合 + List list = categoryInfoEditReq.getBrandIdList(); + for (Long aLong : list) { + //添加 品类 商品品牌组 中间 表 + asCategoryBrandMapper.addAsCategoryBrandMapper(id,aLong); + } + } + + /**修改 品类中 的 商品属性 attributeIdList**/ + private void updateAttributeIdList(Long id, CategoryInfoEditReq categoryInfoEditReq) { + //修改 品类中 的 商品属性 attributeIdList + /** 删除属性*/ + asCategoryAttributeMapper.deleteAsCategoryAttribute(id); + //获取 入参中的 属性 id 集合 + List list = categoryInfoEditReq.getAttributeIdList(); + for (Long aLong : list) { + //添加 品类 属性 中间 表 + asCategoryAttributeMapper.addAsCategoryAttribute(id,aLong); + } + } + + /**修改 品类中 的 商品属性组 updateAttributeGroupIdList**/ + private void updateAttributeGroupIdList(Long id, CategoryInfoEditReq categoryInfoEditReq) { + /** 删除 属性组*/ + attributeGroupMapper.deleteAsCategoryAttributeGroup(id); + /** 添加 属性组*/ + List list = categoryInfoEditReq.getAttributeGroupIdList(); + for (Long aLong : list) { + attributeGroupMapper.addAsCategoryAttributeGroup(id,aLong); + } + } + /** * 通过品类ID获取父级以上的属性、属性组、品牌集合 * diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleAttrInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleAttrInfoServiceImpl.java index 4b7b712..3870a52 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleAttrInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleAttrInfoServiceImpl.java @@ -3,7 +3,14 @@ package com.muyu.product.service.impl; import java.util.List; import com.muyu.common.core.utils.ObjUtils; +import com.muyu.product.domain.AttributeGroup; +import com.muyu.product.domain.RuleInfo; +import com.muyu.product.domain.req.AttributeGroupStateReq; +import com.muyu.product.domain.req.RuleInfoSaveReq; +import com.muyu.product.domain.req.WyzRuleInfoSaveReq; +import com.muyu.product.mapper.RuleInfoMapper; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.muyu.product.mapper.RuleAttrInfoMapper; import com.muyu.product.domain.RuleAttrInfo; @@ -21,6 +28,8 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; @Service public class RuleAttrInfoServiceImpl extends ServiceImpl implements RuleAttrInfoService { + @Autowired + private RuleInfoMapper ruleInfoMapper; /** * 查询规格详情列表 * @@ -64,4 +73,20 @@ public class RuleAttrInfoServiceImpl extends ServiceImpl queryWrapper = new LambdaQueryWrapper<>(); + queryWrapper.eq(RuleInfo ::getId ,wyzRuleInfoSaveReq.getId()); + + RuleInfo ruleInfo = new RuleInfo(); + ruleInfo.setStatus(wyzRuleInfoSaveReq.getStatus()); + + ruleInfoMapper.update(ruleInfo,queryWrapper); + } + } diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java index dc922e5..769738a 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java @@ -53,8 +53,6 @@ public class RuleInfoServiceImpl extends ServiceImpl public List list(RuleInfo ruleInfo) { LambdaQueryWrapper queryWrapper = new LambdaQueryWrapper<>(); - - if (ObjUtils.notNull(ruleInfo.getName())){ queryWrapper.like(RuleInfo::getName, ruleInfo.getName()); } @@ -63,10 +61,6 @@ public class RuleInfoServiceImpl extends ServiceImpl queryWrapper.eq(RuleInfo::getStatus, ruleInfo.getStatus()); } - - - - return list(queryWrapper); } @@ -137,6 +131,7 @@ public class RuleInfoServiceImpl extends ServiceImpl } + /** * 商品规格 修改(wyz) * @return diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeGroupMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeGroupMapper.xml index 7196d03..07cb6f3 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeGroupMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeGroupMapper.xml @@ -18,4 +18,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" select id, category_id, attribute_group_id, remark, create_by, create_time, update_by, update_time from as_category_attribute_group + + + delete from `as_category_attribute_group` where category_id=#{id} + + + + + INSERT INTO `as_category_attribute_group` (`id`, `category_id`, `attribute_group_id`, `remark`, + `create_by`, `create_time`, `update_by`, `update_time`) + VALUES (0, #{categoryId}, #{attributeGroupId}, NULL, NULL, NULL, NULL, NULL); + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeMapper.xml index d5544af..aef9300 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/AsCategoryAttributeMapper.xml @@ -1,21 +1,43 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - + + + + + + + + - select id, category_id, attribute_id, remark, create_by, create_time, update_by, update_time from as_category_attribute + select id, + category_id, + attribute_id, + remark, + create_by, + create_time, + update_by, + update_time + from as_category_attribute + + INSERT INTO `as_category_attribute` (`id`, `category_id`, `attribute_id`, `remark`, `create_by`, + `create_time`, `update_by`, `update_time`) + VALUES (0, #{categoryId}, #{attributeId}, NULL, NULL, NULL, NULL, NULL); + + + delete + from `as_category_attribute` + where category_id = #{id} + + + diff --git a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml index 99be65b..c41677a 100644 --- a/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml +++ b/muyu-modules/muyu-product/muyu-product-server/src/main/resources/mapper/product/CategoryInfoMapper.xml @@ -1,24 +1,51 @@ + PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> - - - - - - - - - - - + + + + + + + + + + + - select id, name, image, parent_id, start, introduction, remark, create_by, create_time, update_by, update_time from category_info + select id, + name, + image, + parent_id, + start, + introduction, + remark, + create_by, + create_time, + update_by, + update_time + from category_info + + UPDATE `category_info` + SET `name` = #{name}, + `image` = #{image}, + `parent_id` = #{parentId}, + `start` = #{start}, + `introduction` = #{introduction}, + `remark` = #{remark}, + `create_by` = #{createBy}, + `create_time` = #{createTime}, + `update_by` = #{updateBy}, + `update_time` = #{updateTime} + WHERE `id` = #{id}; + + +