2204A-cyj
parent
f91f2c5340
commit
7eaf458690
|
@ -11,7 +11,6 @@ import lombok.EqualsAndHashCode;
|
|||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,8 +3,6 @@ package com.muyu.marketing.domain.model;
|
|||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.resp.TeamProjectSkuInfoResp;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -2,18 +2,13 @@ package com.muyu.marketing.domain.model;
|
|||
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuInfoUpdReq;
|
||||
import com.muyu.marketing.domain.req.ActivityTeamProductUpdCheckReq;
|
||||
import com.muyu.marketing.domain.req.TeamProjectSkuInfoAddReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 团购活动修改模型
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.resp.ProjectFindSkuInfoResp;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
|
||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuSettingReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 团购商品规格一键设置
|
||||
|
|
|
@ -8,7 +8,6 @@ import lombok.Data;
|
|||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 拼团活动商品SKU修改模型
|
||||
|
|
|
@ -1,14 +1,12 @@
|
|||
package com.muyu.marketing.domain.model;
|
||||
|
||||
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.req.ActivityTeamProductUpdCheckReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,16 +1,12 @@
|
|||
package com.muyu.marketing.domain.req;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuUpdModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 活动商品规格修改入参
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.marketing.domain.req;
|
||||
|
||||
|
||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -1,7 +1,5 @@
|
|||
package com.muyu.marketing.domain.resp;
|
||||
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuAddModel;
|
||||
import com.muyu.marketing.domain.model.ActivityTeamProductSkuModel;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
|
|
@ -16,6 +16,7 @@ import com.muyu.marketing.domain.resp.TeamInfoListResp;
|
|||
import com.muyu.marketing.team.service.ActivityTeamInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.marketing.team.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
package com.muyu.marketing.team.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.TeamStrategyExemption;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
|
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.service.IService;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.model.*;
|
||||
import com.muyu.marketing.domain.req.ActivityTeamProductSkuInfoUpdReq;
|
||||
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||
import com.muyu.marketing.domain.resp.ActivityTeamInfoResp;
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@ package com.muyu.marketing.team.service;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.common.core.enums.market.team.TeamOpenTypeEnum;
|
||||
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
|
||||
public interface ActivityTeamOpenInfoService extends IService<ActivityTeamOpenInfo> {
|
||||
|
||||
|
|
|
@ -6,8 +6,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|||
import com.muyu.common.core.utils.StringUtils;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamOpenInfo;
|
||||
import com.muyu.marketing.domain.ActivityTeamProductSkuInfo;
|
||||
import com.muyu.marketing.domain.model.*;
|
||||
import com.muyu.marketing.domain.req.TeamInfoListReq;
|
||||
import com.muyu.marketing.domain.resp.ActivityTeamInfoResp;
|
||||
|
|
|
@ -13,10 +13,6 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.math.RoundingMode;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Comparator;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
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.fasterxml.jackson.annotation.JsonFormat;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@AllArgsConstructor
|
||||
@TableName("mall_product_category")
|
||||
public class ProductCategory {
|
||||
/**
|
||||
* 主键自增
|
||||
*/
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Integer id;
|
||||
/**
|
||||
* 名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 父级id
|
||||
*/
|
||||
private Integer parentId;
|
||||
/**
|
||||
* 排序
|
||||
*/
|
||||
private Integer sort;
|
||||
/**
|
||||
* 等级
|
||||
*/
|
||||
private String level;
|
||||
/**
|
||||
* 类型
|
||||
*/
|
||||
private String type;
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date createTime;
|
||||
/**
|
||||
* 修改时间
|
||||
*/
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
|
||||
private Date updateTime;
|
||||
|
||||
}
|
|
@ -34,6 +34,8 @@ public class TemplateAttributeModel extends BaseEntity {
|
|||
* 编码
|
||||
*/
|
||||
private String code;
|
||||
private String value;
|
||||
|
||||
|
||||
public static TemplateAttributeModel attributeInfoBuild(AttributeInfo attributeInfo){
|
||||
return TemplateAttributeModel.builder()
|
||||
|
|
|
@ -1,7 +1,10 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.muyu.product.domain.AttributeInfo;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
@ -33,5 +36,9 @@ public class AttributeGroupEditReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "状态", value = "状态", required = true)
|
||||
private String states;
|
||||
|
||||
/** 属性id 集合 */
|
||||
@ApiModelProperty(name = "属性集合", value = "属性集合", required = true)
|
||||
private List<AttributeInfo> attributeList;
|
||||
private List<Long> attributeIdList;
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -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<Long> attributeGroupIdList;
|
||||
/**
|
||||
* 商品属性关联ID
|
||||
*/
|
||||
@ApiModelProperty(name = "商品属性关联ID", value = "商品属性关联ID")
|
||||
private List<Long> attributeIdList;
|
||||
|
||||
/**
|
||||
* 商品品牌组关联ID
|
||||
*/
|
||||
@ApiModelProperty(name = "商品品牌组关联ID", value = "商品品牌组关联ID")
|
||||
private List<Long> brandIdList;
|
||||
|
||||
}
|
||||
|
|
|
@ -48,7 +48,6 @@ public class CategoryInfoSaveReq extends TreeEntity {
|
|||
private String start;
|
||||
|
||||
/** 介绍 */
|
||||
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
|
@ -56,6 +55,7 @@ public class CategoryInfoSaveReq extends TreeEntity {
|
|||
* 商品属性组关联ID
|
||||
*/
|
||||
private List<Long> attributeGroupIdList;
|
||||
|
||||
/**
|
||||
* 商品属性关联ID
|
||||
*/
|
||||
|
|
|
@ -1,12 +1,13 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
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.web.domain.BaseEntity;
|
||||
import com.muyu.product.domain.ProjectInfo;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
/**
|
||||
* 商品信息对象 project_info
|
||||
|
@ -63,4 +64,18 @@ public class ProjectInfoEditReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "品牌", value = "品牌")
|
||||
private Long brandId;
|
||||
|
||||
|
||||
public static ProjectInfoEditReq convertToReq(ProjectInfoUpdReq projectInfoUpdReq){
|
||||
ProjectInfo projectInfo = projectInfoUpdReq.getProjectInfo();
|
||||
return ProjectInfoEditReq.builder()
|
||||
.name(projectInfo.getName())
|
||||
.introduction(projectInfo.getIntroduction())
|
||||
.mianType(projectInfo.getMianType())
|
||||
.parentType(projectInfo.getParentType())
|
||||
.type(projectInfo.getType())
|
||||
.image(projectInfo.getImage())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,37 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import com.muyu.product.domain.ProjectInfo;
|
||||
import com.muyu.product.domain.ProjectSkuInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 修改商品
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProjectInfoUpdReq {
|
||||
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private List<Long> attrValueList;
|
||||
|
||||
/**
|
||||
* 商品 规格
|
||||
*/
|
||||
private ProjectSkuInfo productSkuList;
|
||||
/**
|
||||
* 商品信息
|
||||
*/
|
||||
private ProjectInfo projectInfo;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.product.domain.resp;
|
||||
|
||||
import com.muyu.product.domain.AttributeInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class AttributeGroupUpd {
|
||||
/** 属性组编号 */
|
||||
private Long id;
|
||||
|
||||
/** 组名称 */
|
||||
private String name;
|
||||
|
||||
/** 状态 */
|
||||
private String states;
|
||||
|
||||
/**
|
||||
* 属性id 集合
|
||||
*/
|
||||
|
||||
private List<AttributeInfo> attributeList;
|
||||
|
||||
}
|
|
@ -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<Long> attributeInfoList;
|
||||
|
||||
/**
|
||||
* 属性组集合
|
||||
*/
|
||||
private List<Long> attributeGroupList;
|
||||
|
||||
/**
|
||||
* 品牌集合
|
||||
*/
|
||||
private List<Long> brandInfoList;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
package com.muyu.product.domain.resp;
|
||||
|
||||
import com.muyu.product.domain.ProductCategory;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 产品品类
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProductCategoryResp extends ProductCategory {
|
||||
/**
|
||||
* 产品品类子集合
|
||||
*/
|
||||
private List<ProductCategoryResp> childrenList;
|
||||
|
||||
public static ProductCategoryResp convertToResp(ProductCategory productCategory){
|
||||
return ProductCategoryResp.builder()
|
||||
.id(productCategory.getId())
|
||||
.name(productCategory.getName())
|
||||
.level(productCategory.getLevel())
|
||||
.parentId(productCategory.getParentId())
|
||||
.sort(productCategory.getSort())
|
||||
.createTime(productCategory.getCreateTime())
|
||||
.updateTime(productCategory.getUpdateTime())
|
||||
.build();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,129 @@
|
|||
package com.muyu.product.domain.resp;
|
||||
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import com.muyu.product.domain.model.ProjectAddModel;
|
||||
import com.muyu.product.domain.req.ProjectInfoEditReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoQueryReq;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.function.Supplier;
|
||||
|
||||
/**
|
||||
* 商品信息对象 project_info
|
||||
*
|
||||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class ProjectInfoListResp extends BaseEntity {
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 商品名称 */
|
||||
private String name;
|
||||
|
||||
/** 商品描述 */
|
||||
private String introduction;
|
||||
|
||||
|
||||
/** 主类型 */
|
||||
private Long mianType;
|
||||
|
||||
/**
|
||||
* 主类型名称
|
||||
*/
|
||||
public String mianTypeName;
|
||||
/** 父类型 */
|
||||
private Long parentType;
|
||||
|
||||
private String parentTypeName;
|
||||
/** 商品类型 */
|
||||
private Long type;
|
||||
|
||||
private String typeName;
|
||||
/** 商品图片 */
|
||||
private String image;
|
||||
|
||||
/** 商品轮播图 */
|
||||
private String carouselImages;
|
||||
|
||||
/** 商品状态 */
|
||||
private String status;
|
||||
|
||||
/** 规格 */
|
||||
private Long ruleId;
|
||||
private String ruleName;
|
||||
|
||||
/** 品牌 */
|
||||
private Long brandId;
|
||||
private String brandName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
public static ProjectInfoListResp queryBuild(ProjectInfoQueryReq projectInfoQueryReq){
|
||||
return ProjectInfoListResp.builder()
|
||||
.name(projectInfoQueryReq.getName())
|
||||
.introduction(projectInfoQueryReq.getIntroduction())
|
||||
.mianType(projectInfoQueryReq.getMianType())
|
||||
.parentType(projectInfoQueryReq.getParentType())
|
||||
.type(projectInfoQueryReq.getType())
|
||||
.image(projectInfoQueryReq.getImage())
|
||||
.carouselImages(projectInfoQueryReq.getCarouselImages())
|
||||
.status(projectInfoQueryReq.getStatus())
|
||||
.ruleId(projectInfoQueryReq.getRuleId())
|
||||
.brandId(projectInfoQueryReq.getBrandId())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
public static ProjectInfoListResp saveModelBuild(ProjectAddModel projectAddModel, Supplier<String> createBy){
|
||||
return ProjectInfoListResp.builder()
|
||||
.name(projectAddModel.getName())
|
||||
.introduction(projectAddModel.getIntroduction())
|
||||
.mianType(projectAddModel.getMianType())
|
||||
.parentType(projectAddModel.getParentType())
|
||||
.type(projectAddModel.getType())
|
||||
.image(projectAddModel.getImage())
|
||||
.carouselImages(projectAddModel.getCarouselImages())
|
||||
.status(projectAddModel.getStatus())
|
||||
.ruleId(projectAddModel.getRuleId())
|
||||
.brandId(projectAddModel.getBrandId())
|
||||
.createBy(createBy.get())
|
||||
.createTime(new Date())
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改构造器
|
||||
*/
|
||||
public static ProjectInfoListResp editBuild(Long id, ProjectInfoEditReq projectInfoEditReq){
|
||||
return ProjectInfoListResp.builder()
|
||||
.id(id)
|
||||
.name(projectInfoEditReq.getName())
|
||||
.introduction(projectInfoEditReq.getIntroduction())
|
||||
.mianType(projectInfoEditReq.getMianType())
|
||||
.parentType(projectInfoEditReq.getParentType())
|
||||
.type(projectInfoEditReq.getType())
|
||||
.image(projectInfoEditReq.getImage())
|
||||
.carouselImages(projectInfoEditReq.getCarouselImages())
|
||||
.status(projectInfoEditReq.getStatus())
|
||||
.ruleId(projectInfoEditReq.getRuleId())
|
||||
.brandId(projectInfoEditReq.getBrandId())
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
|
@ -1,33 +1,29 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
||||
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
||||
import com.muyu.product.domain.resp.AttributeGroupUpdResp;
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.AttributeGroup;
|
||||
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
||||
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
||||
import com.muyu.product.domain.req.AttributeGroupQueryReq;
|
||||
import com.muyu.product.domain.req.AttributeGroupSaveReq;
|
||||
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.AttributeGroupUpdResp;
|
||||
import com.muyu.product.service.AttributeGroupService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
@ -103,6 +99,18 @@ public class AttributeGroupController extends BaseController {
|
|||
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
||||
}
|
||||
|
||||
/***
|
||||
* 修改属性 状态
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:edit")
|
||||
@Log(title = "属性状态", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/updateState")
|
||||
@ApiOperation("修改属性状态")
|
||||
public Result<String> updateState(@RequestBody AttributeGroupStateReq attributeGroupStateReq) {
|
||||
attributeGroupService.updateState(attributeGroupStateReq);
|
||||
return Result.success("修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除属性组
|
||||
*/
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.AttributeInfo;
|
||||
import com.muyu.product.domain.req.AttributeInfoEditReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoQueryReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoSaveReq;
|
||||
import com.muyu.product.domain.req.AttributeInfoEditReq;
|
||||
import com.muyu.product.service.AttributeInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
|
|
@ -1,31 +1,25 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.common.core.text.Convert;
|
||||
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.text.Convert;
|
||||
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.product.domain.BrandInfo;
|
||||
import com.muyu.product.domain.req.BrandInfoEditReq;
|
||||
import com.muyu.product.domain.req.BrandInfoQueryReq;
|
||||
import com.muyu.product.domain.req.BrandInfoSaveReq;
|
||||
import com.muyu.product.domain.req.BrandInfoEditReq;
|
||||
import com.muyu.product.service.BrandInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
|
|
@ -1,37 +1,27 @@
|
|||
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.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
|
||||
|
@ -136,9 +126,7 @@ public class CategoryInfoController extends BaseController {
|
|||
@GetMapping("/parentCommonElement/{categoryId}")
|
||||
@ApiOperation("通过品类ID获取父级以上的属性集合")
|
||||
@ApiImplicitParam(name = "categoryId", value = "categoryId", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class, example = "1")
|
||||
public Result<CategoryParentCommonElementResp> parentCommonElement(
|
||||
@PathVariable(value = "categoryId") Long categoryId
|
||||
) {
|
||||
public Result<CategoryParentCommonElementResp> parentCommonElement(@PathVariable(value = "categoryId") Long categoryId) {
|
||||
return Result.success(categoryInfoService.parentCommonElement(categoryId));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.CommentInfo;
|
||||
import com.muyu.product.domain.req.CommentInfoEditReq;
|
||||
import com.muyu.product.domain.req.CommentInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CommentInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CommentInfoEditReq;
|
||||
import com.muyu.product.service.CommentInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.CommentLikeInfo;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoEditReq;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoQueryReq;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoSaveReq;
|
||||
import com.muyu.product.domain.req.CommentLikeInfoEditReq;
|
||||
import com.muyu.product.service.CommentLikeInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
|
|
@ -1,32 +1,29 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.product.cache.ProjectInfoCache;
|
||||
import com.muyu.product.domain.resp.ProjectDetailResp;
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.cache.ProjectInfoCache;
|
||||
import com.muyu.product.domain.ProjectInfo;
|
||||
import com.muyu.product.domain.req.ProjectInfoEditReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoQueryReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoSaveReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoEditReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoUpdReq;
|
||||
import com.muyu.product.domain.resp.ProjectDetailResp;
|
||||
import com.muyu.product.domain.resp.ProjectInfoListResp;
|
||||
import com.muyu.product.service.ProjectInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
@ -50,10 +47,10 @@ public class ProjectInfoController extends BaseController {
|
|||
@ApiOperation("获取商品信息列表")
|
||||
@RequiresPermissions("product:info:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<ProjectInfo>> list(ProjectInfoQueryReq projectInfoQueryReq) {
|
||||
public Result<TableDataInfo<ProjectInfoListResp>> list(ProjectInfoQueryReq projectInfoQueryReq) {
|
||||
startPage();
|
||||
List<ProjectInfo> list = projectInfoService.list(ProjectInfo.queryBuild(projectInfoQueryReq));
|
||||
return getDataTable(list);
|
||||
List<ProjectInfoListResp> projectInfoListResps = projectInfoService.ProjectInfo(ProjectInfo.queryBuild(projectInfoQueryReq));
|
||||
return getDataTable(projectInfoListResps);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -119,7 +116,8 @@ public class ProjectInfoController extends BaseController {
|
|||
@Log(title = "商品信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改商品信息")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody ProjectInfoEditReq projectInfoEditReq) {
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody ProjectInfoUpdReq projectInfoUpdReq) {
|
||||
ProjectInfoEditReq projectInfoEditReq = ProjectInfoEditReq.convertToReq(projectInfoUpdReq);
|
||||
return toAjax(projectInfoService.updateById(ProjectInfo.editBuild(id,projectInfoEditReq)));
|
||||
}
|
||||
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.ProjectSkuInfo;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoEditReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoQueryReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoSaveReq;
|
||||
import com.muyu.product.domain.req.ProjectSkuInfoEditReq;
|
||||
import com.muyu.product.service.ProjectSkuInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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;
|
||||
|
||||
/**
|
||||
* 商品SKUController
|
||||
|
|
|
@ -1,30 +1,25 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
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.core.web.page.TableDataInfo;
|
||||
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.RuleAttrInfoEditReq;
|
||||
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;
|
||||
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
|
||||
|
|
|
@ -1,34 +1,29 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import java.util.List;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import com.muyu.common.core.text.Convert;
|
||||
import com.muyu.product.domain.model.RuleInfoAddModel;
|
||||
import com.muyu.product.domain.resp.RuleInfoResp;
|
||||
import com.muyu.product.domain.resp.RuleInfoUpdResp;
|
||||
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.text.Convert;
|
||||
import com.muyu.common.core.utils.poi.ExcelUtil;
|
||||
import com.muyu.common.core.web.controller.BaseController;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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.RuleInfo;
|
||||
import com.muyu.product.domain.model.RuleInfoAddModel;
|
||||
import com.muyu.product.domain.req.RuleInfoEditReq;
|
||||
import com.muyu.product.domain.req.RuleInfoQueryReq;
|
||||
import com.muyu.product.domain.req.RuleInfoSaveReq;
|
||||
import com.muyu.product.domain.req.RuleInfoEditReq;
|
||||
import com.muyu.product.domain.resp.RuleInfoResp;
|
||||
import com.muyu.product.domain.resp.RuleInfoUpdResp;
|
||||
import com.muyu.product.service.RuleInfoService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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
|
||||
|
|
|
@ -1,8 +1,9 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.AsAttributeGroup;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 属性与组中间Mapper接口
|
||||
|
@ -10,6 +11,11 @@ import com.muyu.product.domain.AsAttributeGroup;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
|
||||
|
||||
void delete(Long id);
|
||||
|
||||
//添加 属性组
|
||||
void add(@Param("groupId") Long groupId, @Param("id") Long id);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.AsBrandProject;
|
||||
|
||||
|
|
|
@ -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<AsCategoryAttributeGroup> {
|
||||
|
||||
void deleteAsCategoryAttributeGroup(Long id);
|
||||
|
||||
/**
|
||||
* 添加 品类 属性组 中间表
|
||||
* categoryId:品类id
|
||||
* attributeGroupId:属性id
|
||||
*/
|
||||
void addAsCategoryAttributeGroup(@Param("categoryId") Long categoryId, @Param("attributeGroupId") Long attributeGroupId);
|
||||
|
||||
/**
|
||||
* 查询 品类 属性组 中间表
|
||||
*/
|
||||
List<Long> selectAsCategoryAttributeGroupList(@Param("id") Long id);
|
||||
}
|
||||
|
|
|
@ -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,23 @@ import com.muyu.product.domain.AsCategoryAttribute;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface AsCategoryAttributeMapper extends BaseMapper<AsCategoryAttribute> {
|
||||
|
||||
|
||||
/**删除 品类 属性 中间表 */
|
||||
void deleteAsCategoryAttribute(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 添加 品类 属性 中间表
|
||||
* categoryId:品类id
|
||||
* attributeId:属性id
|
||||
*/
|
||||
void addAsCategoryAttribute(@Param("categoryId") Long categoryId, @Param("attributeId") Long attributeId);
|
||||
|
||||
/**
|
||||
* 查询 品类 属性组 中间表
|
||||
*/
|
||||
List<Long> selectAsCategoryAttributeList(@Param("id") Long id);
|
||||
}
|
||||
|
|
|
@ -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<AsCategoryBrand> {
|
||||
|
||||
/**删除 品类 品牌 中间表 */
|
||||
void deleteAsCategoryBrandMapper(Long id);
|
||||
|
||||
/**
|
||||
* 添加 品类 品牌 中间表
|
||||
* categoryId:品类id
|
||||
* brandId:品牌id
|
||||
*/
|
||||
void addAsCategoryBrandMapper(@Param("categoryId") Long categoryId, @Param("brandId") Long brandId);
|
||||
|
||||
/**
|
||||
* 查询 品类 属性组 中间表
|
||||
*/
|
||||
List<Long> selectAsCategoryBrandList(@Param("id") Long id);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.AsProductAttributeInfo;
|
||||
|
||||
|
|
|
@ -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.AttributeGroup;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 属性组Mapper接口
|
||||
|
@ -10,6 +10,7 @@ import com.muyu.product.domain.AttributeGroup;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttributeGroupMapper extends BaseMapper<AttributeGroup> {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.AttributeInfo;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.BrandInfo;
|
||||
|
||||
|
|
|
@ -1,9 +1,10 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品类信息Mapper接口
|
||||
*
|
||||
|
@ -12,4 +13,11 @@ import com.muyu.product.domain.CategoryInfo;
|
|||
*/
|
||||
public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {
|
||||
|
||||
|
||||
//修改 品类
|
||||
boolean updateCategoryInfo( CategoryInfo categoryInfo );
|
||||
|
||||
CategoryInfo findByOne(Long ids);
|
||||
|
||||
List<CategoryInfo> findParentId(Long parentId);
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.CommentInfo;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.CommentLikeInfo;
|
||||
|
||||
|
|
|
@ -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.ProjectInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品信息Mapper接口
|
||||
|
@ -10,6 +10,7 @@ import com.muyu.product.domain.ProjectInfo;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
|
||||
|
||||
}
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.ProjectSkuInfo;
|
||||
|
||||
|
|
|
@ -1,6 +1,5 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.RuleAttrInfo;
|
||||
|
||||
|
|
|
@ -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.RuleInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 商品规格Mapper接口
|
||||
|
@ -10,6 +10,7 @@ import com.muyu.product.domain.RuleInfo;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface RuleInfoMapper extends BaseMapper<RuleInfo> {
|
||||
|
||||
}
|
||||
|
|
|
@ -7,7 +7,10 @@ import com.muyu.product.domain.AttributeGroup;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
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.domain.resp.AttributeGroupUpdResp;
|
||||
|
||||
/**
|
||||
|
@ -46,4 +49,21 @@ public interface AttributeGroupService extends IService<AttributeGroup> {
|
|||
* @return
|
||||
*/
|
||||
AttributeGroupUpdResp getUpdById(Long id);
|
||||
|
||||
/**
|
||||
* 吴彦祖 的 修改 属性
|
||||
*/
|
||||
void updateAttribute(Long id, AttributeGroupEditReq attributeGroupEditReq);
|
||||
/**
|
||||
* 吴彦祖 的 回显属性组
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
AttributeGroupUpd getByIdUpd(Long id);
|
||||
|
||||
/**
|
||||
* 修改 属性 状态 (wyz)
|
||||
* @param attributeGroupStateReq
|
||||
*/
|
||||
void updateState(AttributeGroupStateReq attributeGroupStateReq);
|
||||
}
|
||||
|
|
|
@ -8,7 +8,9 @@ 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;
|
||||
|
||||
/**
|
||||
|
@ -69,4 +71,17 @@ public interface CategoryInfoService extends IService<CategoryInfo> {
|
|||
CategoryCommonElementResp getTemplateAttributeByCateGoryId (Long cateGoryId);
|
||||
|
||||
public <T, AS> List<T> getCommon (Long categoryId, IService<AS> iService, IService<T> bsiService);
|
||||
|
||||
/**
|
||||
* 修改品类信息 吴彦祖
|
||||
* @param id
|
||||
* @param categoryInfoEditReq
|
||||
* @return
|
||||
*/
|
||||
|
||||
boolean updateUpdById(Long id, CategoryInfoEditReq categoryInfoEditReq);
|
||||
|
||||
|
||||
/** 获取品类信息详细信息 wyz*/
|
||||
CategoryInfoUpdResp getByIdUpd(Long id);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,14 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.product.domain.ProjectInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.product.domain.req.ProjectInfoEditReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoSaveReq;
|
||||
import com.muyu.product.domain.resp.ProjectDetailResp;
|
||||
import com.muyu.product.domain.resp.ProjectInfoListResp;
|
||||
|
||||
/**
|
||||
* 商品信息Service接口
|
||||
|
@ -20,7 +24,7 @@ public interface ProjectInfoService extends IService<ProjectInfo> {
|
|||
* @return 商品信息集合
|
||||
*/
|
||||
public List<ProjectInfo> list(ProjectInfo projectInfo);
|
||||
|
||||
public List<ProjectInfoListResp> ProjectInfo(ProjectInfo projectInfo);
|
||||
/**
|
||||
* 保存商品信息
|
||||
* @param projectInfoSaveReq 请求对象
|
||||
|
@ -34,4 +38,12 @@ public interface ProjectInfoService extends IService<ProjectInfo> {
|
|||
* @return 商品详情
|
||||
*/
|
||||
ProjectDetailResp getDetailInfo (Long id);
|
||||
/**
|
||||
* 吴彦祖 的 自定义 修改方法
|
||||
* @param id
|
||||
* @param projectInfoEditReq
|
||||
* @return
|
||||
*/
|
||||
Result<String> wyzUpdateProjectInfo(Long id, ProjectInfoEditReq projectInfoEditReq);
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ 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.WyzRuleInfoSaveReq;
|
||||
|
||||
/**
|
||||
* 规格详情Service接口
|
||||
|
@ -25,4 +26,8 @@ public interface RuleAttrInfoService extends IService<RuleAttrInfo> {
|
|||
* @return 规格详情集合
|
||||
*/
|
||||
List<RuleAttrInfo> getInfoByRuleId (Long ruleId);
|
||||
/**
|
||||
* 修改 规格 状态
|
||||
*/
|
||||
void updateSaveById(WyzRuleInfoSaveReq wyzRuleInfoSaveReq);
|
||||
}
|
||||
|
|
|
@ -49,4 +49,6 @@ public interface RuleInfoService extends IService<RuleInfo> {
|
|||
* @return
|
||||
*/
|
||||
boolean updateById(Long id, RuleInfoEditReq ruleInfoEditReq);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,8 +9,12 @@ import com.muyu.product.domain.AsAttributeGroup;
|
|||
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.domain.resp.AttributeGroupUpdResp;
|
||||
import com.muyu.product.mapper.AsAttributeGroupMapper;
|
||||
import com.muyu.product.mapper.AttributeGroupMapper;
|
||||
import com.muyu.product.service.AsAttributeGroupService;
|
||||
import com.muyu.product.service.AttributeGroupService;
|
||||
|
@ -38,6 +42,9 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
|
|||
@Autowired
|
||||
private AttributeInfoService attributeInfoService;
|
||||
|
||||
@Autowired
|
||||
private AsAttributeGroupMapper attributeGroupMapper;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
|
@ -126,4 +133,87 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
|
|||
.attributeList(attributeInfoList)
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 吴彦祖 的 修改 属性
|
||||
*/
|
||||
@Override
|
||||
public void updateAttribute(Long id, AttributeGroupEditReq attributeGroupEditReq) {
|
||||
//删除原 属性组
|
||||
attributeGroupMapper.delete(id);
|
||||
if (null == attributeGroupEditReq.getAttributeList() || 0==attributeGroupEditReq.getAttributeList().size()){
|
||||
List<Long> list = attributeGroupEditReq.getAttributeIdList();
|
||||
//添加
|
||||
for (Long info : list) {
|
||||
attributeGroupMapper.add(id,info);
|
||||
}
|
||||
}else {
|
||||
List<AttributeInfo> list = attributeGroupEditReq.getAttributeList();
|
||||
//添加
|
||||
for (AttributeInfo info : list) {
|
||||
attributeGroupMapper.add(id,info.getId());
|
||||
}
|
||||
}
|
||||
//获取新数据组
|
||||
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private AttributeGroupMapper mapper;
|
||||
|
||||
/**
|
||||
* 吴彦祖 修改 属性 状态
|
||||
* @param attributeGroupStateReq
|
||||
*/
|
||||
@Override
|
||||
public void updateState(AttributeGroupStateReq attributeGroupStateReq) {
|
||||
LambdaQueryWrapper<AttributeGroup> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(AttributeGroup ::getId ,attributeGroupStateReq.getId());
|
||||
|
||||
AttributeGroup attributeGroup = new AttributeGroup();
|
||||
attributeGroup.setStates(attributeGroupStateReq.getStates());
|
||||
|
||||
mapper.update(attributeGroup,queryWrapper);
|
||||
}
|
||||
|
||||
//属性与组中间列表
|
||||
@Autowired
|
||||
private AsAttributeGroupService attributeGroupService;
|
||||
|
||||
/**
|
||||
* 吴彦祖 的 回显属性组
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public AttributeGroupUpd getByIdUpd(Long id) {
|
||||
//获取当前id的 组
|
||||
AttributeGroup byId = this.getById(id);
|
||||
//查询 该 组 的 属性 集合
|
||||
LambdaQueryWrapper<AsAttributeGroup> wrapper = new LambdaQueryWrapper<>();
|
||||
//返回
|
||||
wrapper.eq(AsAttributeGroup::getGroupId,id);
|
||||
List<AsAttributeGroup> asAttributeGroups=attributeGroupService.list(wrapper);
|
||||
//判断当前会显得 属性及 是否为空
|
||||
if (asAttributeGroups.size() != 0){
|
||||
List<Long> longList = asAttributeGroups.stream()
|
||||
.map(AsAttributeGroup::getAttributeId)//属性
|
||||
.toList();
|
||||
List<AttributeInfo> attributeInfos = attributeInfoService.listByIds(longList);
|
||||
return AttributeGroupUpd.builder()
|
||||
.id(byId.getId())
|
||||
.name(byId.getName())
|
||||
.attributeList(//属性
|
||||
attributeInfos
|
||||
).build();//修改回显时信息
|
||||
}
|
||||
|
||||
return AttributeGroupUpd.builder()
|
||||
.id(byId.getId())
|
||||
.name(byId.getName())
|
||||
.build();//修改回显时信息
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,8 +10,13 @@ import com.muyu.product.domain.base.CategoryBase;
|
|||
import com.muyu.product.domain.model.CategoryInfoSaveModel;
|
||||
import com.muyu.product.domain.model.TemplateAttributeGroupModel;
|
||||
import com.muyu.product.domain.model.TemplateAttributeModel;
|
||||
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 com.muyu.product.mapper.AsCategoryAttributeGroupMapper;
|
||||
import com.muyu.product.mapper.AsCategoryAttributeMapper;
|
||||
import com.muyu.product.mapper.AsCategoryBrandMapper;
|
||||
import com.muyu.product.mapper.CategoryInfoMapper;
|
||||
import com.muyu.product.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
|
@ -58,6 +63,18 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
|||
@Autowired
|
||||
private AttributeGroupService attributeGroupService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeGroupMapper attributeGroupMapper;
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeMapper asCategoryAttributeMapper;
|
||||
@Autowired
|
||||
private AsCategoryBrandMapper asCategoryBrandMapper;
|
||||
|
||||
@Autowired
|
||||
private AsProductAttributeInfoService asProductAttributeInfoService;
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*
|
||||
|
@ -270,6 +287,88 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
|||
return list;
|
||||
}
|
||||
|
||||
|
||||
|
||||
@Override
|
||||
public boolean updateUpdById(Long id, CategoryInfoEditReq categoryInfoEditReq) {
|
||||
LambdaQueryWrapper<CategoryInfo> 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<CategoryInfo> 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<Long> 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<Long> list = categoryInfoEditReq.getAttributeIdList();
|
||||
for (Long aLong : list) {
|
||||
//添加 品类 属性 中间 表
|
||||
asCategoryAttributeMapper.addAsCategoryAttribute(id,aLong);
|
||||
}
|
||||
}
|
||||
|
||||
/**修改 品类中 的 商品属性组 updateAttributeGroupIdList**/
|
||||
private void updateAttributeGroupIdList(Long id, CategoryInfoEditReq categoryInfoEditReq) {
|
||||
/** 删除 属性组*/
|
||||
attributeGroupMapper.deleteAsCategoryAttributeGroup(id);
|
||||
/** 添加 属性组*/
|
||||
List<Long> list = categoryInfoEditReq.getAttributeGroupIdList();
|
||||
for (Long aLong : list) {
|
||||
attributeGroupMapper.addAsCategoryAttributeGroup(id,aLong);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 通过品类ID获取父级以上的属性、属性组、品牌集合
|
||||
*
|
||||
|
|
|
@ -2,15 +2,20 @@ package com.muyu.product.service.impl;
|
|||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.LinkedList;
|
||||
import java.util.List;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.product.domain.*;
|
||||
import com.muyu.product.domain.model.*;
|
||||
import com.muyu.product.domain.req.ProjectInfoEditReq;
|
||||
import com.muyu.product.domain.req.ProjectInfoSaveReq;
|
||||
import com.muyu.product.domain.resp.CategoryCommonElementResp;
|
||||
import com.muyu.product.domain.resp.ProjectDetailResp;
|
||||
import com.muyu.product.domain.resp.ProjectInfoListResp;
|
||||
import com.muyu.product.mapper.RuleInfoMapper;
|
||||
import com.muyu.product.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -101,8 +106,6 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -229,4 +232,82 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
.attributeGroupList(templateAttributeGroupList)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private ProjectInfoMapper projectInfoMapper;
|
||||
|
||||
/***
|
||||
* wyz 商品的修改方法
|
||||
* @param id
|
||||
* @param projectInfoEditReq
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<String> wyzUpdateProjectInfo(Long id, ProjectInfoEditReq projectInfoEditReq) {
|
||||
|
||||
LambdaQueryWrapper<ProjectInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(ProjectInfo::getId,id);
|
||||
|
||||
ProjectInfo projectInfo = ProjectInfo.builder()
|
||||
.id(id)
|
||||
.name(projectInfoEditReq.getName())
|
||||
.introduction(projectInfoEditReq.getIntroduction())
|
||||
.mianType(projectInfoEditReq.getMianType())
|
||||
.parentType(projectInfoEditReq.getParentType())
|
||||
.type(projectInfoEditReq.getType())
|
||||
.image(projectInfoEditReq.getImage())
|
||||
.carouselImages(projectInfoEditReq.getCarouselImages())
|
||||
.status(projectInfoEditReq.getStatus())
|
||||
.ruleId(projectInfoEditReq.getRuleId()).build();
|
||||
|
||||
projectInfoMapper.update(projectInfo,wrapper);
|
||||
return Result.success("修改成功");
|
||||
}
|
||||
|
||||
|
||||
@Autowired
|
||||
private RuleInfoMapper ruleInfoMapper;
|
||||
@Override
|
||||
public List<ProjectInfoListResp> ProjectInfo(ProjectInfo projectInfo) {
|
||||
List<ProjectInfo> list = list(projectInfo);
|
||||
|
||||
List<ProjectInfoListResp> projectInfoListResps = new LinkedList<>();
|
||||
list.forEach(p -> {
|
||||
// 获取类别信息
|
||||
CategoryInfo mianTypeName = categoryInfoService.getById(p.getMianType());
|
||||
CategoryInfo parentTypeName = categoryInfoService.getById(p.getParentType());
|
||||
CategoryInfo typeName = p.getType() != null ? categoryInfoService.getById(p.getType()) : null;
|
||||
|
||||
// 获取规则信息
|
||||
RuleInfo ruleName = ruleInfoMapper.selectById(p.getRuleId());
|
||||
|
||||
// 获取品牌信息
|
||||
BrandInfo brandName = brandInfoService.getById(p.getBrandId());
|
||||
|
||||
// 构建响应对象
|
||||
ProjectInfoListResp resp = ProjectInfoListResp.builder()
|
||||
.id(p.getId())
|
||||
.name(p.getName())
|
||||
.introduction(p.getIntroduction())
|
||||
.mianType(p.getMianType())
|
||||
.parentType(p.getParentType())
|
||||
.type(p.getType())
|
||||
.image(p.getImage())
|
||||
.carouselImages(p.getCarouselImages())
|
||||
.status(p.getStatus())
|
||||
.mianTypeName(mianTypeName != null ? mianTypeName.getName() : "")
|
||||
.parentTypeName(parentTypeName != null ? parentTypeName.getName() : "")
|
||||
.typeName(typeName != null ? typeName.getName() : "")
|
||||
.ruleName(ruleName != null ? ruleName.getName() : "")
|
||||
.brandName(brandName != null ? brandName.getNam() : "")
|
||||
.build();
|
||||
|
||||
// 添加到结果列表
|
||||
projectInfoListResps.add(resp);
|
||||
});
|
||||
|
||||
return projectInfoListResps;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,7 +3,11 @@ package com.muyu.product.service.impl;
|
|||
import java.util.List;
|
||||
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.product.domain.RuleInfo;
|
||||
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;
|
||||
|
@ -64,4 +68,21 @@ public class RuleAttrInfoServiceImpl extends ServiceImpl<RuleAttrInfoMapper, Rul
|
|||
queryWrapper.eq(RuleAttrInfo::getRuleId, ruleId);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
@Autowired
|
||||
private RuleInfoMapper ruleInfoMapper;
|
||||
/**
|
||||
* 修改 规格 状态 wyz
|
||||
* @param wyzRuleInfoSaveReq
|
||||
*/
|
||||
@Override
|
||||
public void updateSaveById(WyzRuleInfoSaveReq wyzRuleInfoSaveReq) {
|
||||
LambdaQueryWrapper<RuleInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(RuleInfo ::getId ,wyzRuleInfoSaveReq.getId());
|
||||
|
||||
RuleInfo ruleInfo = new RuleInfo();
|
||||
ruleInfo.setStatus(wyzRuleInfoSaveReq.getStatus());
|
||||
|
||||
ruleInfoMapper.update(ruleInfo,queryWrapper);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,4 +18,13 @@
|
|||
<sql id="selectAsAttributeGroupVo">
|
||||
select id, group_id, attribute_id, remark, create_by, create_time, update_by, update_time from as_attribute_group
|
||||
</sql>
|
||||
<insert id="add">
|
||||
INSERT INTO `product`.`as_attribute_group` (`id`, `group_id`, `attribute_id`, `remark`, `create_by`,
|
||||
`create_time`, `update_by`, `update_time`)
|
||||
VALUES (0,#{groupId}, #{id}, NULL, NULL, NULL, NULL, NULL);
|
||||
</insert>
|
||||
<!-- 删除 属性组-->
|
||||
<delete id="delete">
|
||||
delete from `as_attribute_group` where group_id =#{id}
|
||||
</delete>
|
||||
</mapper>
|
||||
|
|
|
@ -18,4 +18,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectAsCategoryAttributeGroupVo">
|
||||
select id, category_id, attribute_group_id, remark, create_by, create_time, update_by, update_time from as_category_attribute_group
|
||||
</sql>
|
||||
|
||||
<delete id="deleteAsCategoryAttributeGroup">
|
||||
delete from `as_category_attribute_group` where category_id=#{id}
|
||||
</delete>
|
||||
<select id="selectAsCategoryAttributeGroupList" resultType="java.lang.Long">
|
||||
select attribute_group_id from `as_category_attribute_group` where category_id=#{id}
|
||||
</select>
|
||||
|
||||
<insert id="addAsCategoryAttributeGroup">
|
||||
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);
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -16,6 +16,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectAsCategoryAttributeVo">
|
||||
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
|
||||
</sql>
|
||||
<insert id="addAsCategoryAttribute">
|
||||
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);
|
||||
</insert>
|
||||
<delete id="deleteAsCategoryAttribute">
|
||||
delete
|
||||
from `as_category_attribute`
|
||||
where category_id = #{id}
|
||||
</delete>
|
||||
<select id="selectAsCategoryAttributeList" resultType="java.lang.Long">
|
||||
select attribute_id from `as_category_attribute` where category_id=#{id}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -18,4 +18,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectAsCategoryBrandVo">
|
||||
select id, category_id, brand_id, remark, create_by, create_time, update_by, update_time from as_category_brand
|
||||
</sql>
|
||||
<insert id="addAsCategoryBrandMapper">
|
||||
INSERT INTO `product`.`as_category_brand` (`id`, `category_id`, `brand_id`, `remark`, `create_by`,
|
||||
`create_time`, `update_by`, `update_time`)
|
||||
VALUES (0, #{categoryId}, #{brandId}, NULL, NULL, NULL, NULL, NULL);
|
||||
</insert>
|
||||
<delete id="deleteAsCategoryBrandMapper">
|
||||
delete from `as_category_brand` where category_id=#{id}
|
||||
</delete>
|
||||
<select id="selectAsCategoryBrandList" resultType="java.lang.Long">
|
||||
select brand_id from `as_category_brand` where category_id=#{id}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -21,4 +21,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectCategoryInfoVo">
|
||||
select id, name, image, parent_id, start, introduction, remark, create_by, create_time, update_by, update_time from category_info
|
||||
</sql>
|
||||
|
||||
<update id="updateCategoryInfo">
|
||||
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};
|
||||
|
||||
</update>
|
||||
<select id="findByOne" resultType="com.muyu.product.domain.CategoryInfo">
|
||||
select * from category_info where id=#{ids}
|
||||
</select>
|
||||
|
||||
<select id="findParentId" resultType="com.muyu.product.domain.CategoryInfo">
|
||||
select * from category_info where parent_id=#{parentId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue