Compare commits
No commits in common. "master" and "masters" have entirely different histories.
|
@ -14,10 +14,11 @@ spring:
|
|||
nacos:
|
||||
discovery:
|
||||
# 服务注册地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
server-addr: 124.70.138.118:8848
|
||||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -21,6 +21,10 @@ public enum BusinessType {
|
|||
*/
|
||||
UPDATE,
|
||||
|
||||
/**
|
||||
* 修改(吴彦祖)
|
||||
*/
|
||||
UPDATE_CUSTOMIZE,
|
||||
/**
|
||||
* 删除
|
||||
*/
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
<module>muyu-common-datasource</module>
|
||||
<module>muyu-common-system</module>
|
||||
<module>muyu-common-cache</module>
|
||||
|
||||
</modules>
|
||||
|
||||
<artifactId>muyu-common</artifactId>
|
||||
|
|
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -16,6 +16,11 @@
|
|||
</description>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.aliyun.oss</groupId>
|
||||
<artifactId>aliyun-sdk-oss</artifactId>
|
||||
<version>3.17.4</version>
|
||||
</dependency>
|
||||
|
||||
<!-- SpringCloud Alibaba Nacos -->
|
||||
<dependency>
|
||||
|
|
|
@ -11,6 +11,8 @@ import org.springframework.web.bind.annotation.PostMapping;
|
|||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
|
||||
import java.io.InputStream;
|
||||
|
||||
/**
|
||||
* 文件请求处理
|
||||
*
|
||||
|
@ -34,6 +36,7 @@ public class SysFileController {
|
|||
SysFile sysFile = new SysFile();
|
||||
sysFile.setName(FileUtils.getName(url));
|
||||
sysFile.setUrl(url);
|
||||
|
||||
return Result.success(sysFile);
|
||||
} catch (Exception e) {
|
||||
log.error("上传文件失败", e);
|
||||
|
|
|
@ -50,6 +50,7 @@ public class FileUploadUtils {
|
|||
throw new IOException(fe.getDefaultMessage(), fe);
|
||||
} catch (Exception e) {
|
||||
throw new IOException(e.getMessage(), e);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -0,0 +1,53 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class ActivityTeamInfo {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Long productId;
|
||||
private String productImage;
|
||||
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private String status;
|
||||
|
||||
private String teamPrice;
|
||||
private String teamStock;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private String productPrice;
|
||||
|
||||
|
||||
private String attendNumber;
|
||||
|
||||
private String openTeamNumber;
|
||||
|
||||
private String addTeamNumber;
|
||||
|
||||
private String remainStock;
|
||||
|
||||
|
||||
public int getaddTeamNumberCount() {
|
||||
return Integer.parseInt(addTeamNumber);
|
||||
}
|
||||
}
|
|
@ -45,11 +45,11 @@ public class AsAttributeGroup extends BaseEntity {
|
|||
private Long attributeId;
|
||||
|
||||
|
||||
public static AsAttributeGroup buildGroup (Long attributeGroupId,
|
||||
Long attributeId) {
|
||||
public static AsAttributeGroup buildGroup (Long attributeGroupId, Long attributeId) {
|
||||
return AsAttributeGroup.builder()
|
||||
.groupId(attributeGroupId)
|
||||
.attributeId(attributeId)
|
||||
.build();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -75,8 +73,7 @@ public class AttributeGroup extends BaseEntity {
|
|||
*/
|
||||
public static AttributeGroup editBuild(Long id, AttributeGroupEditReq attributeGroupEditReq){
|
||||
return AttributeGroup.builder()
|
||||
.id(id)
|
||||
.name(attributeGroupEditReq.getName())
|
||||
.id(id)
|
||||
.states(attributeGroupEditReq.getStates())
|
||||
.build();
|
||||
}
|
||||
|
|
|
@ -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,6 +62,30 @@ public class CategoryInfo extends TreeEntity {
|
|||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
@Excel(name = "备注")
|
||||
@ApiModelProperty(name = "备注", value = "备注")
|
||||
private String remark;
|
||||
|
||||
|
||||
@Excel(name = "创建人")
|
||||
@ApiModelProperty(name = "创建人", value = "创建人")
|
||||
private String create_by;
|
||||
|
||||
|
||||
@Excel(name = "创建时间")
|
||||
@ApiModelProperty(name = "创建时间", value = "创建时间")
|
||||
private Date create_time;
|
||||
|
||||
|
||||
@Excel(name = "修改人")
|
||||
@ApiModelProperty(name = "修改人", value = "修改人")
|
||||
private String update_by;
|
||||
|
||||
|
||||
@Excel(name = "修改时间")
|
||||
@ApiModelProperty(name = "修改时间", value = "修改时间")
|
||||
private Date update_time;
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
|
@ -99,6 +123,11 @@ public class CategoryInfo extends TreeEntity {
|
|||
.image(categoryInfoEditReq.getImage())
|
||||
.start(categoryInfoEditReq.getStart())
|
||||
.introduction(categoryInfoEditReq.getIntroduction())
|
||||
.remark(categoryInfoEditReq.getRemark())
|
||||
.create_by(categoryInfoEditReq.getCreateBy())
|
||||
.create_time(categoryInfoEditReq.getCreateTime())
|
||||
.update_by(categoryInfoEditReq.getUpdateBy())
|
||||
.update_time(new Date())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
|
|
@ -109,6 +109,8 @@ public class ProjectInfo extends BaseEntity {
|
|||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 添加构造器
|
||||
*/
|
||||
|
@ -134,7 +136,7 @@ public class ProjectInfo extends BaseEntity {
|
|||
*/
|
||||
public static ProjectInfo editBuild(Long id, ProjectInfoEditReq projectInfoEditReq){
|
||||
return ProjectInfo.builder()
|
||||
.id(id)
|
||||
.id(id)
|
||||
.name(projectInfoEditReq.getName())
|
||||
.introduction(projectInfoEditReq.getIntroduction())
|
||||
.mianType(projectInfoEditReq.getMianType())
|
||||
|
|
|
@ -56,6 +56,7 @@ public class RuleAttrInfo extends BaseEntity {
|
|||
@ApiModelProperty(name = "规格值", value = "规格值")
|
||||
private String attrValue;
|
||||
|
||||
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
|
|
|
@ -51,6 +51,10 @@ public class RuleInfo extends BaseEntity {
|
|||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/** 规格状态 */
|
||||
@Excel(name = "规格描述")
|
||||
@ApiModelProperty(name = "规格描述", value = "规格描述")
|
||||
private String remark;
|
||||
/**
|
||||
* 查询构造器
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TeamStrategyExemption {
|
||||
|
||||
|
||||
private Integer id;
|
||||
private Integer duration;
|
||||
private Integer exemption_number;
|
||||
private Integer max_buy;
|
||||
private Integer one_buy;
|
||||
private Integer virtual_number;
|
||||
private String type;
|
||||
private String rule_info;
|
||||
private String status;
|
||||
private String create_by;
|
||||
private Date create_time;
|
||||
private String update_by;
|
||||
private Date update_time;
|
||||
private String remark;
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,31 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TeamStrategyExemptionHundred {
|
||||
|
||||
|
||||
private Integer id;
|
||||
private Integer duration;
|
||||
private Integer max_buy;
|
||||
private Integer one_buy;
|
||||
private Integer virtual_number;
|
||||
private String status;
|
||||
private String rule_info;
|
||||
private String create_by;
|
||||
private Date create_time;
|
||||
private String update_by;
|
||||
private Date update_time;
|
||||
private String remark;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
package com.muyu.product.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class TeamStrategyExemptionOrdinary {
|
||||
|
||||
|
||||
private Integer id;
|
||||
private Integer duration;
|
||||
private Integer team_number;
|
||||
private Integer max_buy;
|
||||
private Integer one_buy;
|
||||
private Integer virtual_number;
|
||||
private String status;
|
||||
private String create_by;
|
||||
private Date create_time;
|
||||
private String update_by;
|
||||
private Date update_time;
|
||||
private String remark;
|
||||
|
||||
}
|
|
@ -0,0 +1,26 @@
|
|||
package com.muyu.product.domain.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ActivittyTeamInfoQueryReqModel extends QueryModel<ActivittyTeamInfoQueryReqModel>{
|
||||
|
||||
|
||||
|
||||
|
||||
private String keyWord;
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,49 @@
|
|||
package com.muyu.product.domain.model;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class ActivityTeamInfoListModel {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private Integer id;
|
||||
private String name;
|
||||
private Long productId;
|
||||
private String productImage;
|
||||
|
||||
|
||||
private Date endTime;
|
||||
|
||||
private String status;
|
||||
|
||||
private String teamPrice;
|
||||
private String teamStock;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private String productPrice;
|
||||
|
||||
|
||||
private String attendNumber;
|
||||
|
||||
private String openTeamNumber;
|
||||
|
||||
private String addTeamNumber;
|
||||
|
||||
private String remainStock;
|
||||
|
||||
|
||||
}
|
|
@ -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())
|
||||
|
|
|
@ -31,6 +31,7 @@ public class CategoryInfoSaveModel extends TreeEntity {
|
|||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
|
||||
/** 品类名称 */
|
||||
private String name;
|
||||
|
||||
|
|
|
@ -0,0 +1,52 @@
|
|||
package com.muyu.product.domain.model;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.OrderItem;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.muyu.common.core.web.page.PageDomain;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@SuperBuilder
|
||||
public class QueryModel<T> {
|
||||
/*
|
||||
当前记录起始索引
|
||||
*/
|
||||
private Integer pageNum;
|
||||
|
||||
/*
|
||||
每页显示记录数
|
||||
*/
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
|
||||
private String orderByColumn;
|
||||
|
||||
|
||||
private boolean isAsc = true;
|
||||
|
||||
|
||||
public T domainBuild(PageDomain pageDomain) {
|
||||
this.pageNum = pageDomain.getPageNum();
|
||||
this.pageSize = pageDomain.getPageSize();
|
||||
this.orderByColumn = pageDomain.getOrderBy();
|
||||
this.isAsc = "asc".equals(pageDomain.getIsAsc()) ? true : false;
|
||||
return (T)this;
|
||||
}
|
||||
|
||||
|
||||
public <I> Page<I> buildPage() {
|
||||
|
||||
Page<I> page = Page.of(this.pageNum, this.pageSize);
|
||||
page.setOrders(List.of(this.isAsc()
|
||||
? OrderItem.asc(this.orderByColumn):OrderItem.desc(this.orderByColumn)));
|
||||
return page;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.SuperBuilder;
|
||||
|
||||
@Data
|
||||
@SuperBuilder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
|
||||
public class ActivityTeamInfoReq {
|
||||
|
||||
|
||||
private String keyWord;
|
||||
private String status;
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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,8 @@ public class AttributeGroupEditReq extends BaseEntity {
|
|||
@ApiModelProperty(name = "状态", value = "状态", required = true)
|
||||
private String states;
|
||||
|
||||
/** 属性id 集合 */
|
||||
@ApiModelProperty(name = "属性集合", value = "属性集合", required = true)
|
||||
private List<AttributeInfo> attributeList;
|
||||
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -0,0 +1,34 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import com.muyu.product.domain.AttributeInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class AttributeGroupUpdReq {
|
||||
|
||||
/**
|
||||
*属性组id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 组名称
|
||||
*/
|
||||
private String name;
|
||||
/**
|
||||
* 备注
|
||||
*/
|
||||
private String remark;
|
||||
/**
|
||||
* 属性id 集合
|
||||
*/
|
||||
|
||||
private List<AttributeInfo> attributeList;
|
||||
}
|
|
@ -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;
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
package com.muyu.product.domain.req;
|
||||
|
||||
import com.muyu.product.domain.model.RuleAttrAddModel;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
@ -7,6 +8,9 @@ import lombok.AllArgsConstructor;
|
|||
import lombok.experimental.SuperBuilder;
|
||||
import io.swagger.annotations.*;
|
||||
import com.muyu.common.core.web.domain.BaseEntity;
|
||||
import org.springframework.beans.PropertyValues;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 商品规格对象 rule_info
|
||||
|
@ -30,5 +34,9 @@ public class RuleInfoEditReq extends BaseEntity {
|
|||
/** 规格状态 */
|
||||
@ApiModelProperty(name = "规格状态", value = "规格状态")
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 规格子集
|
||||
*/
|
||||
@ApiModelProperty(name = "规格子集", value = "规格子集")
|
||||
private List<RuleAttrAddModel> ruleAttrList;
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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;
|
||||
}
|
|
@ -34,6 +34,9 @@ public class AttributeGroupPageResp extends BaseEntity {
|
|||
|
||||
/** 状态 */
|
||||
private String states;
|
||||
/** 备注*/
|
||||
private String remark;
|
||||
|
||||
|
||||
/**
|
||||
* 属性对象集合
|
||||
|
|
|
@ -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,65 @@
|
|||
package com.muyu.product.domain.resp;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
@Builder
|
||||
public class ProjectInfoResp {
|
||||
|
||||
private Long id;
|
||||
private String name;
|
||||
private String introduction;
|
||||
private Long mianType;
|
||||
private Long parentType;
|
||||
private Long type;
|
||||
private String image;
|
||||
private String carouselImages;
|
||||
private String status;
|
||||
private Long ruleId;
|
||||
private Long brandId;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
private String mianTypeName;
|
||||
|
||||
private String parentTypeName;
|
||||
|
||||
|
||||
|
||||
private String typeName;
|
||||
|
||||
|
||||
private String ruleName;
|
||||
|
||||
|
||||
private String brandName;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
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 com.muyu.product.domain.model.RuleAttrAddModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
/**
|
||||
* 规格修改
|
||||
*/
|
||||
public class RuleInfoUpdResp {
|
||||
/** 主键 */
|
||||
private Long id;
|
||||
|
||||
/** 规格名称 */
|
||||
private String name;
|
||||
|
||||
/** 规格状态 */
|
||||
private String status;
|
||||
/** 规格描述*/
|
||||
private String remark;
|
||||
|
||||
/**
|
||||
* 规格子集
|
||||
*/
|
||||
private List<RuleAttrAddModel> ruleAttrList;
|
||||
}
|
|
@ -55,11 +55,11 @@
|
|||
</dependency>
|
||||
|
||||
<!-- Swagger UI -->
|
||||
<dependency>
|
||||
<!-- <dependency>
|
||||
<groupId>io.springfox</groupId>
|
||||
<artifactId>springfox-swagger-ui</artifactId>
|
||||
<version>${swagger.fox.version}</version>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
|
||||
<!-- Mysql Connector -->
|
||||
<dependency>
|
||||
|
|
|
@ -4,7 +4,9 @@ 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.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -74,8 +76,8 @@ public class AttributeGroupController extends BaseController {
|
|||
@RequiresPermissions("product:attributeGroup:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<AttributeGroup> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(attributeGroupService.getById(id));
|
||||
public Result<AttributeGroupUpd> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(attributeGroupService.getByIdUpd(id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -99,7 +101,20 @@ public class AttributeGroupController extends BaseController {
|
|||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改属性组")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody AttributeGroupEditReq attributeGroupEditReq) {
|
||||
return toAjax(attributeGroupService.updateById(AttributeGroup.editBuild(id,attributeGroupEditReq)));
|
||||
attributeGroupService.updateAttribute(id,attributeGroupEditReq);
|
||||
return Result.success("修改成功");
|
||||
}
|
||||
|
||||
/***
|
||||
* 修改属性 状态
|
||||
*/
|
||||
@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("修改成功");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -113,4 +128,6 @@ public class AttributeGroupController extends BaseController {
|
|||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(attributeGroupService.removeBatchByIds(ids));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<CategoryInfo> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(categoryInfoService.getById(id));
|
||||
public Result<CategoryInfoUpdResp> 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<String> 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("......");
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -124,8 +118,13 @@ public class CategoryInfoController extends BaseController {
|
|||
@DeleteMapping("/{ids}")
|
||||
@ApiOperation("删除品类信息")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = String.class, example = "1,2,3,4")
|
||||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(categoryInfoService.removeBatchByIds(ids));
|
||||
public Result<String> remove(@PathVariable String ids) {
|
||||
|
||||
|
||||
categoryInfoService.removeBatchByIdsDel(ids);
|
||||
|
||||
|
||||
return Result.success();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -0,0 +1,29 @@
|
|||
package com.muyu.product.controller;
|
||||
|
||||
import com.muyu.common.core.domain.Result;
|
||||
import com.muyu.product.domain.ActivityTeamInfo;
|
||||
import com.muyu.product.service.PintuanServicce;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@CrossOrigin
|
||||
@RestController
|
||||
@RequestMapping("/pintuan")
|
||||
public class PintuanController {
|
||||
|
||||
@Autowired
|
||||
private PintuanServicce pimneyuanServicce;
|
||||
|
||||
|
||||
@GetMapping("/list")
|
||||
public Result list(@RequestBody ActivityTeamInfo activityTeamInfo ) {
|
||||
List<ActivityTeamInfo> list = pimneyuanServicce.list(activityTeamInfo);
|
||||
return Result.success(list);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -5,6 +5,7 @@ import javax.servlet.http.HttpServletResponse;
|
|||
|
||||
import com.muyu.product.cache.ProjectInfoCache;
|
||||
import com.muyu.product.domain.resp.ProjectDetailResp;
|
||||
import com.muyu.product.domain.resp.ProjectInfoResp;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
|
@ -50,9 +51,9 @@ public class ProjectInfoController extends BaseController {
|
|||
@ApiOperation("获取商品信息列表")
|
||||
@RequiresPermissions("product:info:list")
|
||||
@GetMapping("/list")
|
||||
public Result<TableDataInfo<ProjectInfo>> list(ProjectInfoQueryReq projectInfoQueryReq) {
|
||||
public Result<TableDataInfo<ProjectInfoResp>> list(ProjectInfoQueryReq projectInfoQueryReq) {
|
||||
startPage();
|
||||
List<ProjectInfo> list = projectInfoService.list(ProjectInfo.queryBuild(projectInfoQueryReq));
|
||||
List<ProjectInfoResp> list = projectInfoService.pageinfo(ProjectInfo.queryBuild(projectInfoQueryReq));
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
|
@ -77,6 +78,7 @@ public class ProjectInfoController extends BaseController {
|
|||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<ProjectInfo> getInfo(@PathVariable("id") Long id) {
|
||||
|
||||
return Result.success(projectInfoCache.get(id));
|
||||
}
|
||||
|
||||
|
@ -120,8 +122,10 @@ public class ProjectInfoController extends BaseController {
|
|||
@Log(title = "商品信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改商品信息")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody ProjectInfoEditReq projectInfoEditReq) {
|
||||
return toAjax(projectInfoService.updateById(ProjectInfo.editBuild(id,projectInfoEditReq)));
|
||||
public Result edit(@PathVariable Long id, @RequestBody ProjectInfoEditReq projectInfoEditReq) {
|
||||
projectInfoService.updProjects(id,projectInfoEditReq);
|
||||
return Result.success();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -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,21 @@ public class RuleAttrInfoController extends BaseController {
|
|||
return toAjax(ruleAttrInfoService.updateById(RuleAttrInfo.editBuild(id,ruleAttrInfoEditReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改规格 状态
|
||||
*/
|
||||
@RequiresPermissions("product:ruleAttr:edit")
|
||||
@Log(title = "规格xuigai", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/ruleInfoStateReq")
|
||||
@ApiOperation("修改规格 属性")
|
||||
public Result<String> ruleInfoStateReq(@RequestBody WyzRuleInfoSaveReq wyzRuleInfoSaveReq) {
|
||||
ruleAttrInfoService.updateSaveById(wyzRuleInfoSaveReq);
|
||||
return Result.success("修改成功");
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 删除规格详情
|
||||
*/
|
||||
|
|
|
@ -6,6 +6,7 @@ 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;
|
||||
|
@ -77,8 +78,8 @@ public class RuleInfoController extends BaseController {
|
|||
@RequiresPermissions("product:rule:query")
|
||||
@GetMapping(value = "/{id}")
|
||||
@ApiImplicitParam(name = "id", value = "id", required = true, dataType = "Long", paramType = "path", dataTypeClass = Long.class)
|
||||
public Result<RuleInfo> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(ruleInfoService.getById(id));
|
||||
public Result<RuleInfoUpdResp> getInfo(@PathVariable("id") Long id) {
|
||||
return Result.success(ruleInfoService.getUpdById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -100,7 +101,7 @@ public class RuleInfoController extends BaseController {
|
|||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改商品规格")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody RuleInfoEditReq ruleInfoEditReq) {
|
||||
return toAjax(ruleInfoService.updateById(RuleInfo.editBuild(id,ruleInfoEditReq)));
|
||||
return toAjax(ruleInfoService.updateGoodsSpecifications(id,ruleInfoEditReq));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -3,6 +3,8 @@ 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 +12,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,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,22 @@ 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);
|
||||
}
|
||||
|
|
|
@ -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.AttributeGroup;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
/**
|
||||
* 属性组Mapper接口
|
||||
|
@ -10,6 +11,8 @@ import com.muyu.product.domain.AttributeGroup;
|
|||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface AttributeGroupMapper extends BaseMapper<AttributeGroup> {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<CategoryInfo> {
|
||||
|
||||
|
||||
//修改 品类
|
||||
boolean updateCategoryInfo( CategoryInfo categoryInfo );
|
||||
}
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface CategoryMapper extends BaseMapper<CategoryInfo> {
|
||||
Integer selectall(String ids);
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
package com.muyu.product.mapper;
|
||||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.ActivityTeamInfo;
|
||||
import com.muyu.product.domain.req.ActivityTeamInfoReq;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Select;
|
||||
|
||||
import java.util.List;
|
||||
/**
|
||||
* 拼团展示详情表
|
||||
*
|
||||
* @author DongZeLiang
|
||||
* @date 2024-02-27
|
||||
*/
|
||||
@Mapper
|
||||
public interface PintuanMapper extends BaseMapper<ActivityTeamInfo> {
|
||||
|
||||
|
||||
@Select("SELECT\n" +
|
||||
"\tactivity_team_info.id,\n" +
|
||||
"\tactivity_team_info.NAME,\n" +
|
||||
"\tactivity_team_info.product_image,\n" +
|
||||
"\tactivity_team_product_sku_info.team_price,\n" +
|
||||
"\tactivity_team_product_sku_info.team_stock,\n" +
|
||||
"\tactivity_team_info.end_time,\n" +
|
||||
"\tactivity_team_info.STATUS \n" +
|
||||
"FROM\n" +
|
||||
"\tactivity_team_info\n" +
|
||||
"\tLEFT JOIN activity_team_product_sku_info ON activity_team_product_sku_info.id = activity_team_info.id\n" +
|
||||
" ")
|
||||
List<ActivityTeamInfo> listActivity(ActivityTeamInfoReq activityTeamInfoReq);
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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.ProjectInfo;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 商品信息Mapper接口
|
||||
|
@ -12,4 +13,12 @@ import com.muyu.product.domain.ProjectInfo;
|
|||
*/
|
||||
public interface ProjectInfoMapper extends BaseMapper<ProjectInfo> {
|
||||
|
||||
|
||||
|
||||
ProjectInfo getuname(@Param("name") String name);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<RuleInfo> {
|
||||
|
||||
}
|
||||
|
|
|
@ -15,6 +15,7 @@ public interface AsAttributeGroupService extends IService<AsAttributeGroup> {
|
|||
* 查询属性与组中间列表
|
||||
*
|
||||
* @param asAttributeGroup 属性与组中间
|
||||
*
|
||||
* @return 属性与组中间集合
|
||||
*/
|
||||
public List<AsAttributeGroup> list(AsAttributeGroup asAttributeGroup);
|
||||
|
|
|
@ -1,13 +1,15 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
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 java.util.List;
|
||||
|
||||
/**
|
||||
* 属性组Service接口
|
||||
|
@ -39,4 +41,20 @@ public interface AttributeGroupService extends IService<AttributeGroup> {
|
|||
*/
|
||||
public Boolean save(AttributeGroupSaveModel attributeGroupSaveModel);
|
||||
|
||||
/**
|
||||
* 修改 属性
|
||||
*/
|
||||
void updateAttribute(Long id, AttributeGroupEditReq attributeGroupEditReq);
|
||||
/**
|
||||
* 回显属性组
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
AttributeGroupUpd getByIdUpd(Long id);
|
||||
|
||||
/**
|
||||
* 修改 属性 状态
|
||||
* @param attributeGroupStateReq
|
||||
*/
|
||||
void updateState(AttributeGroupStateReq attributeGroupStateReq);
|
||||
}
|
||||
|
|
|
@ -1,15 +1,19 @@
|
|||
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 com.muyu.product.mapper.CategoryMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 品类信息Service接口
|
||||
|
@ -18,6 +22,12 @@ import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
|||
* @date 2024-02-27
|
||||
*/
|
||||
public interface CategoryInfoService extends IService<CategoryInfo> {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*
|
||||
|
@ -69,4 +79,19 @@ 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);
|
||||
|
||||
void removeBatchByIdsDel(String ids);
|
||||
}
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
package com.muyu.product.service;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.product.domain.ActivityTeamInfo;
|
||||
import com.muyu.product.domain.model.ActivittyTeamInfoQueryReqModel;
|
||||
import com.muyu.product.domain.model.ActivityTeamInfoListModel;
|
||||
import com.muyu.product.domain.req.ActivityTeamInfoReq;
|
||||
|
||||
public interface PintuanServicce extends IService<ActivityTeamInfo> {
|
||||
|
||||
|
||||
TableDataInfo<ActivityTeamInfoListModel> query (ActivittyTeamInfoQueryReqModel activittyTeamInfoQueryReqModel);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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.ProjectInfoResp;
|
||||
|
||||
/**
|
||||
* 商品信息Service接口
|
||||
|
@ -34,4 +38,8 @@ public interface ProjectInfoService extends IService<ProjectInfo> {
|
|||
* @return 商品详情
|
||||
*/
|
||||
ProjectDetailResp getDetailInfo (Long id);
|
||||
|
||||
List<ProjectInfoResp> pageinfo(ProjectInfo queryBuild);
|
||||
|
||||
Result updProjects(Long id, ProjectInfoEditReq projectInfoEditReq);
|
||||
}
|
||||
|
|
|
@ -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<RuleAttrInfo> {
|
|||
* @return 规格详情集合
|
||||
*/
|
||||
List<RuleAttrInfo> getInfoByRuleId (Long ruleId);
|
||||
|
||||
/**
|
||||
* 修改 规格 状态
|
||||
*/
|
||||
void updateSaveById(WyzRuleInfoSaveReq wyzRuleInfoSaveReq);
|
||||
}
|
||||
|
|
|
@ -6,8 +6,10 @@ import com.muyu.common.core.web.page.TableDataInfo;
|
|||
import com.muyu.product.domain.RuleInfo;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
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.resp.RuleInfoResp;
|
||||
import com.muyu.product.domain.resp.RuleInfoUpdResp;
|
||||
|
||||
/**
|
||||
* 商品规格Service接口
|
||||
|
@ -32,4 +34,20 @@ public interface RuleInfoService extends IService<RuleInfo> {
|
|||
public boolean save(RuleInfoAddModel ruleInfoAddModel);
|
||||
|
||||
TableDataInfo<RuleInfoResp> queryList (RuleInfoQueryReq ruleInfoQueryReq);
|
||||
|
||||
/**
|
||||
* 回显 (吴彦祖)
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
RuleInfoUpdResp getUpdById(Long id);
|
||||
|
||||
/**
|
||||
* 修改(吴彦祖)
|
||||
* @param id
|
||||
* @param ruleInfoEditReq
|
||||
* @return
|
||||
*/
|
||||
|
||||
boolean updateGoodsSpecifications(Long id, RuleInfoEditReq ruleInfoEditReq);
|
||||
}
|
||||
|
|
|
@ -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;
|
||||
|
@ -9,7 +11,11 @@ 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.mapper.AsAttributeGroupMapper;
|
||||
import com.muyu.product.mapper.AttributeGroupMapper;
|
||||
import com.muyu.product.service.AsAttributeGroupService;
|
||||
import com.muyu.product.service.AttributeGroupService;
|
||||
|
@ -19,9 +25,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 属性组Service业务层处理
|
||||
|
@ -33,12 +38,23 @@ import java.util.stream.Stream;
|
|||
@Service
|
||||
public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper, AttributeGroup> implements AttributeGroupService {
|
||||
|
||||
//属性与组中间列表
|
||||
@Autowired
|
||||
private AsAttributeGroupService attributeGroupService;
|
||||
|
||||
//商品属性Service接口
|
||||
@Autowired
|
||||
private AttributeInfoService attributeInfoService;
|
||||
|
||||
/**
|
||||
* 修
|
||||
*/
|
||||
@Autowired
|
||||
private AsAttributeGroupMapper attributeGroupMapper;
|
||||
|
||||
@Autowired
|
||||
private AttributeGroupMapper mapper;
|
||||
|
||||
/**
|
||||
* 分页查询
|
||||
*
|
||||
|
@ -81,14 +97,15 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
|
|||
queryWrapper.eq(AttributeGroup::getStates, attributeGroup.getStates());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(attributeGroup.getRemark())) {
|
||||
queryWrapper.eq(AttributeGroup::getRemark, attributeGroup.getRemark());
|
||||
}
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
* @param attributeGroupSaveModel 属性组保存模型
|
||||
*
|
||||
* @return 是否成功
|
||||
*/
|
||||
@Override
|
||||
|
@ -107,4 +124,78 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
|
|||
);
|
||||
return save;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 吴彦祖 的 修改 属性
|
||||
*/
|
||||
@Override
|
||||
public void updateAttribute(Long id, AttributeGroupEditReq attributeGroupEditReq) {
|
||||
//删除原 属性组
|
||||
attributeGroupMapper.delete(id);
|
||||
//获取新数据组
|
||||
List<AttributeInfo> list = attributeGroupEditReq.getAttributeList();
|
||||
//添加
|
||||
for (AttributeInfo info : list) {
|
||||
attributeGroupMapper.add(id,info.getId());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 吴彦祖 修改 属性 状态
|
||||
* @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);
|
||||
}
|
||||
|
||||
/**
|
||||
* 吴彦祖 的 回显属性组
|
||||
* @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();//修改回显时信息
|
||||
}
|
||||
List<Long> list =new ArrayList<>();
|
||||
List<AttributeInfo> attributeInfos = attributeInfoService.listByIds(list);
|
||||
|
||||
|
||||
return AttributeGroupUpd.builder()
|
||||
.id(byId.getId())
|
||||
.name(byId.getName())
|
||||
.attributeList(//属性
|
||||
attributeInfos
|
||||
).build();//修改回显时信息
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -10,9 +10,11 @@ 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.CategoryInfoMapper;
|
||||
import com.muyu.product.mapper.*;
|
||||
import com.muyu.product.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -36,6 +38,8 @@ import java.util.stream.Stream;
|
|||
@Service
|
||||
public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, CategoryInfo> implements CategoryInfoService {
|
||||
|
||||
@Autowired
|
||||
private CategoryMapper categoryMapper;
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeService asCategoryAttributeService;
|
||||
|
@ -58,6 +62,14 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
|||
@Autowired
|
||||
private AttributeGroupService attributeGroupService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeGroupMapper attributeGroupMapper;
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeMapper asCategoryAttributeMapper;
|
||||
@Autowired
|
||||
private AsCategoryBrandMapper asCategoryBrandMapper;
|
||||
/**
|
||||
* 查询品类信息列表
|
||||
*
|
||||
|
@ -270,6 +282,95 @@ 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();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeBatchByIdsDel(String ids) {
|
||||
Integer selectall = categoryMapper.selectall(ids);
|
||||
if(selectall>0){
|
||||
throw new SecurityException("有关联子集不能删除");
|
||||
}
|
||||
|
||||
|
||||
categoryMapper.deleteById(ids);
|
||||
}
|
||||
|
||||
/**修改 品类中 的 商品品牌组 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获取父级以上的属性、属性组、品牌集合
|
||||
*
|
||||
|
|
|
@ -0,0 +1,78 @@
|
|||
package com.muyu.product.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
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.product.domain.ActivityTeamInfo;
|
||||
import com.muyu.product.domain.model.ActivittyTeamInfoQueryReqModel;
|
||||
import com.muyu.product.domain.model.ActivityTeamInfoListModel;
|
||||
import com.muyu.product.domain.req.ActivityTeamInfoReq;
|
||||
import com.muyu.product.mapper.PintuanMapper;
|
||||
import com.muyu.product.service.PintuanServicce;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
||||
|
||||
|
||||
@Service
|
||||
public class PintuanServiceimpl extends ServiceImpl<PintuanMapper,ActivityTeamInfo> implements PintuanServicce {
|
||||
|
||||
|
||||
@Override
|
||||
public TableDataInfo<ActivityTeamInfoListModel> query(ActivittyTeamInfoQueryReqModel activittyTeamInfoQueryReqModel) {
|
||||
LambdaQueryWrapper<ActivityTeamInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
queryWrapper.like(StringUtils.isNotEmpty(activittyTeamInfoQueryReqModel.getKeyWord()),ActivityTeamInfo::getName,activittyTeamInfoQueryReqModel.getKeyWord());
|
||||
queryWrapper.like(StringUtils.isNotEmpty(activittyTeamInfoQueryReqModel.getStatus()),ActivityTeamInfo::getStatus,activittyTeamInfoQueryReqModel.getStatus());
|
||||
|
||||
|
||||
Page<ActivityTeamInfo> activityTeamInfoPage = this.page(activittyTeamInfoQueryReqModel.buildPage(), queryWrapper);
|
||||
List<ActivityTeamInfo> activityTeamInfoList = activityTeamInfoPage.getRecords();
|
||||
List<ActivityTeamInfoListModel> activityTeamInfoQueryReqList = new ArrayList<>();
|
||||
|
||||
|
||||
for (ActivityTeamInfo activityTeamInfo : activityTeamInfoList) {
|
||||
ActivityTeamInfoListModel activityTeamInfoListModel = new ActivityTeamInfoListModel();
|
||||
|
||||
activityTeamInfoListModel.setId(activityTeamInfo.getId());
|
||||
activityTeamInfoListModel.setName(activityTeamInfo.getName());
|
||||
long totalParticipants = activityTeamInfoList.stream()
|
||||
.mapToLong(ActivityTeamInfo::getaddTeamNumberCount)
|
||||
.sum();
|
||||
activityTeamInfoListModel.setAddTeamNumber(String.valueOf(totalParticipants));
|
||||
activityTeamInfoListModel.setOpenTeamNumber();
|
||||
activityTeamInfoListModel.setAttendNumber();
|
||||
activityTeamInfoListModel.setEndTime(activityTeamInfo.getEndTime());
|
||||
activityTeamInfoListModel.setProductImage(activityTeamInfo.getProductImage());
|
||||
activityTeamInfoListModel.setTeamPrice();
|
||||
activityTeamInfoListModel.setProductPrice();
|
||||
activityTeamInfoListModel.setTeamStock();
|
||||
activityTeamInfoListModel.setRemainStock();
|
||||
activityTeamInfoListModel.setStatus(activityTeamInfo.getStatus());
|
||||
|
||||
|
||||
activityTeamInfoQueryReqList.add(activityTeamInfoListModel);
|
||||
|
||||
}
|
||||
|
||||
TableDataInfo<ActivityTeamInfoListModel> tableDataInfo = new TableDataInfo<>();
|
||||
tableDataInfo.setTotal(activityTeamInfoPage.getTotal());
|
||||
tableDataInfo.setRows(activityTeamInfoQueryReqList);
|
||||
return tableDataInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品拼团列表
|
||||
*
|
||||
* @param activityTeamInfoReq 拼团信息展示
|
||||
* @return 商品拼团信息
|
||||
*/
|
||||
|
||||
|
||||
|
||||
}
|
|
@ -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.ProjectInfoResp;
|
||||
import com.muyu.product.mapper.RuleInfoMapper;
|
||||
import com.muyu.product.service.*;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -48,6 +53,15 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
@Autowired
|
||||
private AttributeInfoService attributeInfoService;
|
||||
|
||||
|
||||
@Autowired
|
||||
private RuleInfoMapper reluInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectInfoMapper projectInfoMapper; ;
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 查询商品信息列表
|
||||
*
|
||||
|
@ -59,50 +73,47 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
LambdaQueryWrapper<ProjectInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getName())){
|
||||
if (ObjUtils.notNull(projectInfo.getName())) {
|
||||
queryWrapper.like(ProjectInfo::getName, projectInfo.getName());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getIntroduction())){
|
||||
if (ObjUtils.notNull(projectInfo.getIntroduction())) {
|
||||
queryWrapper.eq(ProjectInfo::getIntroduction, projectInfo.getIntroduction());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getMianType())){
|
||||
if (ObjUtils.notNull(projectInfo.getMianType())) {
|
||||
queryWrapper.eq(ProjectInfo::getMianType, projectInfo.getMianType());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getParentType())){
|
||||
if (ObjUtils.notNull(projectInfo.getParentType())) {
|
||||
queryWrapper.eq(ProjectInfo::getParentType, projectInfo.getParentType());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getType())){
|
||||
if (ObjUtils.notNull(projectInfo.getType())) {
|
||||
queryWrapper.eq(ProjectInfo::getType, projectInfo.getType());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getImage())){
|
||||
if (ObjUtils.notNull(projectInfo.getImage())) {
|
||||
queryWrapper.eq(ProjectInfo::getImage, projectInfo.getImage());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getCarouselImages())){
|
||||
if (ObjUtils.notNull(projectInfo.getCarouselImages())) {
|
||||
queryWrapper.eq(ProjectInfo::getCarouselImages, projectInfo.getCarouselImages());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getStatus())){
|
||||
if (ObjUtils.notNull(projectInfo.getStatus())) {
|
||||
queryWrapper.eq(ProjectInfo::getStatus, projectInfo.getStatus());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getRuleId())){
|
||||
if (ObjUtils.notNull(projectInfo.getRuleId())) {
|
||||
queryWrapper.eq(ProjectInfo::getRuleId, projectInfo.getRuleId());
|
||||
}
|
||||
|
||||
if (ObjUtils.notNull(projectInfo.getBrandId())){
|
||||
if (ObjUtils.notNull(projectInfo.getBrandId())) {
|
||||
queryWrapper.eq(ProjectInfo::getBrandId, projectInfo.getBrandId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -110,21 +121,28 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
* 保存商品信息
|
||||
*
|
||||
* @param projectInfoSaveReq 请求对象
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean save (ProjectInfoSaveReq projectInfoSaveReq) {
|
||||
public boolean save(ProjectInfoSaveReq projectInfoSaveReq) {
|
||||
ProjectAddModel projectAddModel = projectInfoSaveReq.getProjectAddModel();
|
||||
|
||||
String name = projectAddModel.getName();
|
||||
ProjectInfo getuname = projectInfoMapper.getuname(name);
|
||||
if(getuname!=null){
|
||||
return false;
|
||||
}
|
||||
|
||||
//
|
||||
ProjectInfo projectInfo = ProjectInfo.saveModelBuild(projectAddModel, SecurityUtils::getUsername);
|
||||
boolean save = this.save(projectInfo);
|
||||
if (save){
|
||||
if (save) {
|
||||
// 属性值
|
||||
List<AttrValueModel> attrValueList = projectInfoSaveReq.getAttrValueList();
|
||||
List<AsProductAttributeInfo> asProductAttributeInfoList = attrValueList.stream()
|
||||
.map(attrValueModel -> AsProductAttributeInfo.attrValueModelBuild(attrValueModel, projectInfo::getId))
|
||||
.toList();
|
||||
if (!asProductAttributeInfoList.isEmpty()){
|
||||
if (!asProductAttributeInfoList.isEmpty()) {
|
||||
asProductAttributeInfoService.saveBatch(asProductAttributeInfoList);
|
||||
}
|
||||
// sku ProductSkuModel -》 ProjectSkuInfo
|
||||
|
@ -132,7 +150,7 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
List<ProjectSkuInfo> projectSkuInfoList = productSkuModelList.stream().map(
|
||||
productSkuModel -> ProjectSkuInfo.productSkuModelBuild(productSkuModel, projectInfo::getId)
|
||||
).toList();
|
||||
if (!projectSkuInfoList.isEmpty()){
|
||||
if (!projectSkuInfoList.isEmpty()) {
|
||||
projectSkuInfoService.saveBatch(projectSkuInfoList);
|
||||
}
|
||||
}
|
||||
|
@ -146,7 +164,7 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
* @return 商品详情
|
||||
*/
|
||||
@Override
|
||||
public ProjectDetailResp getDetailInfo (Long id) {
|
||||
public ProjectDetailResp getDetailInfo(Long id) {
|
||||
// 商品信息获取
|
||||
ProjectInfo projectInfo = this.getById(id);
|
||||
// 品牌信息
|
||||
|
@ -175,7 +193,7 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
|
||||
CategoryCommonElementResp templateAttribute = this.categoryInfoService.getTemplateAttributeByCateGoryId(projectInfo.getType());
|
||||
List<TemplateAttributeGroupModel> templateAttributeGroupList = templateAttribute.getTemplateAttributeGroupList();
|
||||
List<TemplateAttributeModel> templateAttributeList = new ArrayList<>(){{
|
||||
List<TemplateAttributeModel> templateAttributeList = new ArrayList<>() {{
|
||||
addAll(templateAttribute.getTemplateAttributeList());
|
||||
}};
|
||||
// 属性组和商品属性的ID
|
||||
|
@ -187,11 +205,11 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
List<Long> attributeIdList = templateAttributeList.stream()
|
||||
.map(TemplateAttributeModel::getId)
|
||||
.toList();
|
||||
if (!attributeGroupIdList.isEmpty()){
|
||||
notInAttributeIdList.addAll( attributeGroupIdList );
|
||||
if (!attributeGroupIdList.isEmpty()) {
|
||||
notInAttributeIdList.addAll(attributeGroupIdList);
|
||||
}
|
||||
if (!attributeIdList.isEmpty()){
|
||||
notInAttributeIdList.addAll( attributeIdList );
|
||||
if (!attributeIdList.isEmpty()) {
|
||||
notInAttributeIdList.addAll(attributeIdList);
|
||||
}
|
||||
// 添加上,商品的自有属性
|
||||
List<AsProductAttributeInfo> productAttributeList = this.asProductAttributeInfoService.list(
|
||||
|
@ -202,20 +220,20 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
);
|
||||
|
||||
List<TemplateAttributeModel> projectAttributeList = new ArrayList<>();
|
||||
if (!productAttributeList.isEmpty()){
|
||||
if (!productAttributeList.isEmpty()) {
|
||||
List<Long> attrIdList = productAttributeList.stream()
|
||||
.map(AsProductAttributeInfo::getAttributeId)
|
||||
.toList();
|
||||
projectAttributeList = attributeInfoService.list(
|
||||
new LambdaQueryWrapper<>() {{
|
||||
in(AttributeInfo::getId, attrIdList);
|
||||
}}
|
||||
).stream()
|
||||
.map(TemplateAttributeModel::attributeInfoBuild)
|
||||
.toList();
|
||||
new LambdaQueryWrapper<>() {{
|
||||
in(AttributeInfo::getId, attrIdList);
|
||||
}}
|
||||
).stream()
|
||||
.map(TemplateAttributeModel::attributeInfoBuild)
|
||||
.toList();
|
||||
}
|
||||
// 把自有属性添加到商品属性的集合当中,进行合并
|
||||
if (!projectAttributeList.isEmpty()){
|
||||
if (!projectAttributeList.isEmpty()) {
|
||||
templateAttributeList.addAll(projectAttributeList);
|
||||
}
|
||||
return ProjectDetailResp.builder()
|
||||
|
@ -229,4 +247,57 @@ public class ProjectInfoServiceImpl extends ServiceImpl<ProjectInfoMapper, Proje
|
|||
.attributeGroupList(templateAttributeGroupList)
|
||||
.build();
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ProjectInfoResp> pageinfo(ProjectInfo queryBuild) {
|
||||
|
||||
List<ProjectInfo> list = list(queryBuild);
|
||||
|
||||
LinkedList<ProjectInfoResp> projectInfoRespLinkedList = 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 = reluInfoMapper.selectById(p.getRuleId());
|
||||
|
||||
|
||||
BrandInfo brandName = brandInfoService.getById(p.getBrandId());
|
||||
|
||||
ProjectInfoResp resp = ProjectInfoResp.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();
|
||||
|
||||
projectInfoRespLinkedList.add(resp);
|
||||
|
||||
});
|
||||
return projectInfoRespLinkedList;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result updProjects(Long id, ProjectInfoEditReq projectInfoEditReq) {
|
||||
String name = projectInfoEditReq.getName();
|
||||
ProjectInfo getuname = projectInfoMapper.getuname(name);
|
||||
if(getuname!=null){
|
||||
return Result.error("商品名称重复");
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -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<RuleAttrInfoMapper, RuleAttrInfo> implements RuleAttrInfoService {
|
||||
|
||||
@Autowired
|
||||
private RuleInfoMapper ruleInfoMapper;
|
||||
/**
|
||||
* 查询规格详情列表
|
||||
*
|
||||
|
@ -64,4 +73,20 @@ public class RuleAttrInfoServiceImpl extends ServiceImpl<RuleAttrInfoMapper, Rul
|
|||
queryWrapper.eq(RuleAttrInfo::getRuleId, ruleId);
|
||||
return this.list(queryWrapper);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改 规格 状态 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);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.ArrayList;
|
|||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.function.Supplier;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.github.pagehelper.PageHelper;
|
||||
|
@ -15,8 +16,10 @@ import com.muyu.common.security.utils.SecurityUtils;
|
|||
import com.muyu.product.domain.RuleAttrInfo;
|
||||
import com.muyu.product.domain.model.RuleAttrAddModel;
|
||||
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.resp.RuleInfoResp;
|
||||
import com.muyu.product.domain.resp.RuleInfoUpdResp;
|
||||
import com.muyu.product.service.RuleAttrInfoService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -50,7 +53,6 @@ public class RuleInfoServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo>
|
|||
public List<RuleInfo> list(RuleInfo ruleInfo) {
|
||||
LambdaQueryWrapper<RuleInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
|
||||
|
||||
if (ObjUtils.notNull(ruleInfo.getName())){
|
||||
queryWrapper.like(RuleInfo::getName, ruleInfo.getName());
|
||||
}
|
||||
|
@ -59,10 +61,6 @@ public class RuleInfoServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo>
|
|||
queryWrapper.eq(RuleInfo::getStatus, ruleInfo.getStatus());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
|
@ -79,7 +77,8 @@ public class RuleInfoServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo>
|
|||
boolean save = this.save(ruleInfo);
|
||||
ruleAttrInfoService.saveBatch(
|
||||
ruleInfoAddModel.getRuleAttrList().stream()
|
||||
.map(ruleAttrAddModel -> RuleAttrInfo.addModelBuild(ruleAttrAddModel, ruleInfo::getId, SecurityUtils::getUsername))
|
||||
.map(ruleAttrAddModel -> RuleAttrInfo.addModelBuild(ruleAttrAddModel, ruleInfo::getId,
|
||||
SecurityUtils::getUsername))
|
||||
.toList()
|
||||
);
|
||||
return save;
|
||||
|
@ -107,4 +106,57 @@ public class RuleInfoServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo>
|
|||
.total(isPage ? new PageInfo<>(list).getTotal() : 0)
|
||||
.build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品规格 回显
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public RuleInfoUpdResp getUpdById(Long id) {
|
||||
RuleInfo ruleInfo = this.getById(id);
|
||||
//查询规格
|
||||
LambdaQueryWrapper<RuleAttrInfo> wrapper = new LambdaQueryWrapper<>();
|
||||
wrapper.eq(RuleAttrInfo::getRuleId ,ruleInfo.getId());
|
||||
|
||||
|
||||
List<RuleAttrInfo> infoList = this.ruleAttrInfoService.list(wrapper);
|
||||
return RuleInfoUpdResp.builder()
|
||||
.id(ruleInfo.getId())
|
||||
.name(ruleInfo.getName())
|
||||
.status(ruleInfo.getStatus())
|
||||
.ruleAttrList(infoList.stream().map(RuleAttrAddModel::infoBuild).toList())
|
||||
.remark(ruleInfo.getRemark())
|
||||
.build();
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 商品规格 修改
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean updateGoodsSpecifications(Long id, RuleInfoEditReq ruleInfoEditReq) {
|
||||
|
||||
//修改
|
||||
boolean update = this.updateById(RuleInfo.editBuild(id, ruleInfoEditReq));
|
||||
if (update){
|
||||
LambdaQueryWrapper<RuleAttrInfo> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(RuleAttrInfo::getRuleId,id);
|
||||
//删除
|
||||
this.ruleAttrInfoService.remove(queryWrapper);
|
||||
//添加
|
||||
ruleAttrInfoService.saveBatch(
|
||||
ruleInfoEditReq.getRuleAttrList().stream()
|
||||
.map(ruleAttrAddModel -> RuleAttrInfo.addModelBuild(ruleAttrAddModel,
|
||||
() -> id,
|
||||
SecurityUtils::getUsername))
|
||||
.toList()
|
||||
);
|
||||
}
|
||||
|
||||
return update;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -18,4 +18,15 @@
|
|||
<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,17 @@ 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>
|
||||
|
|
|
@ -1,21 +1,43 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.product.mapper.AsCategoryAttributeMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.AsCategoryAttribute" id="AsCategoryAttributeResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="categoryId" column="category_id" />
|
||||
<result property="attributeId" column="attribute_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="categoryId" column="category_id"/>
|
||||
<result property="attributeId" column="attribute_id"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</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,15 @@ 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>
|
||||
|
|
|
@ -1,21 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.product.mapper.AttributeGroupMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.AttributeGroup" id="AttributeGroupResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="states" column="states" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updataBy" column="updata_by" />
|
||||
<result property="updataTime" column="updata_time" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="states" column="states"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updataBy" column="updata_by"/>
|
||||
<result property="updataTime" column="updata_time"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectAttributeGroupVo">
|
||||
select id, name, states, create_by, create_time, updata_by, updata_time, remark from attribute_group
|
||||
</sql>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -1,24 +1,51 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.product.mapper.CategoryInfoMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.CategoryInfo" id="CategoryInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="image" column="image" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="start" column="start" />
|
||||
<result property="introduction" column="introduction" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="id" column="id"/>
|
||||
<result property="name" column="name"/>
|
||||
<result property="image" column="image"/>
|
||||
<result property="parentId" column="parent_id"/>
|
||||
<result property="start" column="start"/>
|
||||
<result property="introduction" column="introduction"/>
|
||||
<result property="remark" column="remark"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
<result property="updateBy" column="update_by"/>
|
||||
<result property="updateTime" column="update_time"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCategoryInfoVo">
|
||||
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
|
||||
</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>
|
||||
|
||||
</mapper>
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.product.mapper.CategoryMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.CommentInfo" id="CommentInfoResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="comment" column="comment" />
|
||||
<result property="images" column="images" />
|
||||
<result property="parentId" column="parent_id" />
|
||||
<result property="remark" column="remark" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCommentInfoVo">
|
||||
select id, project_id, comment, images, parent_id, remark, create_by, create_time, update_by, update_time from comment_info
|
||||
</sql>
|
||||
<select id="selectall" resultType="java.lang.Integer">
|
||||
select count(1) from category_info where parent_id=#{ids}
|
||||
</select>
|
||||
|
||||
</mapper>
|
|
@ -0,0 +1,21 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.product.mapper.PintuanMapper">
|
||||
|
||||
<resultMap type="com.muyu.product.domain.ActivityTeamInfo" id="ActivityTeamInfoResult ">
|
||||
<result property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="productImage" column="product_image" />
|
||||
<result property="teamPrice" column="team_price" />
|
||||
<result property="teamStock" column="team_stock" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="status" column="status" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectActivityTeamInfo">
|
||||
select id, name, product_image, team_price, team_stock, end_time, status from activity_team_info
|
||||
</sql>
|
||||
|
||||
</mapper>
|
|
@ -26,4 +26,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectProjectInfoVo">
|
||||
select id, name, introduction, mian_type, parent_type, type, image, carousel_images, status, rule_id, brand_id, remark, create_by, create_time, update_by, update_time from project_info
|
||||
</sql>
|
||||
<select id="getuname" resultType="com.muyu.product.domain.ProjectInfo">
|
||||
select * from project_info where name=#{name}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
<module>muyu-product-remote</module>
|
||||
<module>muyu-product-server</module>
|
||||
<module>muyu-product-cache</module>
|
||||
|
||||
</modules>
|
||||
|
||||
<properties>
|
||||
|
|
|
@ -20,6 +20,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
package com.muyu.system.controller;
|
||||
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("wyz")
|
||||
public class SysWyzController {
|
||||
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.muyu.system.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
@Mapper
|
||||
public interface SysWyzMapper {
|
||||
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
package com.muyu.system.service;
|
||||
|
||||
public interface SysWyzService {
|
||||
}
|
|
@ -0,0 +1,8 @@
|
|||
package com.muyu.system.service.impl;
|
||||
|
||||
import com.muyu.system.service.SysWyzService;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class SysWyzServiceImpl implements SysWyzService {
|
||||
}
|
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.muyu.system.mapper.SysWyzMapper">
|
||||
</mapper>
|
|
@ -1,6 +1,6 @@
|
|||
# Tomcat
|
||||
server:
|
||||
port: 9101
|
||||
port: 9104
|
||||
|
||||
# Spring
|
||||
spring:
|
||||
|
@ -18,6 +18,7 @@ spring:
|
|||
config:
|
||||
# 配置中心地址
|
||||
server-addr: 124.70.138.118:8848
|
||||
namespace: 13fd7cff-3c6b-4fca-bccc-5044efe3993f
|
||||
# 配置文件格式
|
||||
file-extension: yml
|
||||
# 共享配置
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
Index: muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
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
|
||||
--- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java (revision c3210636342974c973c50cd72e3d75427bf31668)
|
||||
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/AttributeGroupService.java (revision 0065e444a3853fa35aa843b4798217ca6b4cc5dc)
|
||||
@@ -42,18 +42,18 @@
|
||||
public Boolean save(AttributeGroupSaveModel attributeGroupSaveModel);
|
||||
|
||||
/**
|
||||
- * 吴彦祖 的 修改 属性
|
||||
+ * 修改 属性
|
||||
*/
|
||||
void updateAttribute(Long id, AttributeGroupEditReq attributeGroupEditReq);
|
||||
/**
|
||||
- * 吴彦祖 的 回显属性组
|
||||
+ * 回显属性组
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
AttributeGroupUpd getByIdUpd(Long id);
|
||||
|
||||
/**
|
||||
- * 修改 属性 状态 (wyz)
|
||||
+ * 修改 属性 状态
|
||||
* @param attributeGroupStateReq
|
||||
*/
|
||||
void updateState(AttributeGroupStateReq attributeGroupStateReq);
|
||||
Index: muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java
|
||||
IDEA additional info:
|
||||
Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
|
||||
<+>UTF-8
|
||||
===================================================================
|
||||
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
|
||||
--- a/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java (revision c3210636342974c973c50cd72e3d75427bf31668)
|
||||
+++ b/muyu-modules/muyu-product/muyu-product-server/src/main/java/com/muyu/product/service/impl/RuleInfoServiceImpl.java (revision 0065e444a3853fa35aa843b4798217ca6b4cc5dc)
|
||||
@@ -108,7 +108,7 @@
|
||||
}
|
||||
|
||||
/**
|
||||
- * 商品规格 回显(wyz)
|
||||
+ * 商品规格 回显
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@@ -133,7 +133,7 @@
|
||||
|
||||
|
||||
/**
|
||||
- * 商品规格 修改(wyz)
|
||||
+ * 商品规格 修改
|
||||
* @return
|
||||
*/
|
||||
@Override
|
Loading…
Reference in New Issue