Browse Source

Merge remote-tracking branch 'origin/dev' into dev

lazhaoqian 4 years ago
parent
commit
ed45e293d9
37 changed files with 2228 additions and 0 deletions
  1. 3 0
      blade-ops/blade-swagger/src/main/resources/application-dev.yml
  2. 1 0
      blade-service-api/pom.xml
  3. 24 0
      blade-service-api/store-goods-api/pom.xml
  4. 34 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/dto/GoodsDescDTO.java
  5. 34 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/dto/GoodsItemsDTO.java
  6. 34 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/dto/GoodsTypeDTO.java
  7. 111 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/entity/GoodsDesc.java
  8. 178 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/entity/GoodsItems.java
  9. 121 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/entity/GoodsType.java
  10. 36 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/vo/GoodsDescVO.java
  11. 36 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/vo/GoodsItemsVO.java
  12. 36 0
      blade-service-api/store-goods-api/src/main/java/com/store/goods/vo/GoodsTypeVO.java
  13. 1 0
      blade-service/pom.xml
  14. 87 0
      blade-service/store-goods/pom.xml
  15. 41 0
      blade-service/store-goods/src/main/java/com/store/goods/StoreGoodsApplication.java
  16. 171 0
      blade-service/store-goods/src/main/java/com/store/goods/controller/GoodsDescController.java
  17. 126 0
      blade-service/store-goods/src/main/java/com/store/goods/controller/GoodsItemsController.java
  18. 126 0
      blade-service/store-goods/src/main/java/com/store/goods/controller/GoodsTypeController.java
  19. 117 0
      blade-service/store-goods/src/main/java/com/store/goods/entity/GoodsDesc.java
  20. 181 0
      blade-service/store-goods/src/main/java/com/store/goods/entity/GoodsItems.java
  21. 122 0
      blade-service/store-goods/src/main/java/com/store/goods/entity/GoodsType.java
  22. 44 0
      blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsDescMapper.java
  23. 28 0
      blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsDescMapper.xml
  24. 42 0
      blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsItemsMapper.java
  25. 41 0
      blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsItemsMapper.xml
  26. 42 0
      blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsTypeMapper.java
  27. 29 0
      blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsTypeMapper.xml
  28. 52 0
      blade-service/store-goods/src/main/java/com/store/goods/service/IGoodsDescService.java
  29. 41 0
      blade-service/store-goods/src/main/java/com/store/goods/service/IGoodsItemsService.java
  30. 41 0
      blade-service/store-goods/src/main/java/com/store/goods/service/IGoodsTypeService.java
  31. 126 0
      blade-service/store-goods/src/main/java/com/store/goods/service/impl/GoodsDescServiceImpl.java
  32. 41 0
      blade-service/store-goods/src/main/java/com/store/goods/service/impl/GoodsItemsServiceImpl.java
  33. 41 0
      blade-service/store-goods/src/main/java/com/store/goods/service/impl/GoodsTypeServiceImpl.java
  34. 14 0
      blade-service/store-goods/src/main/resources/application-dev.yml
  35. 7 0
      blade-service/store-goods/src/main/resources/application-prod.yml
  36. 6 0
      blade-service/store-goods/src/main/resources/application-test.yml
  37. 13 0
      blade-service/store-goods/src/main/resources/application.yml

+ 3 - 0
blade-ops/blade-swagger/src/main/resources/application-dev.yml

@@ -22,4 +22,7 @@ knife4j:
       - name: 订单-收付款
         uri: 127.0.0.1:1080
         location: /trade-finance/v2/api-docs
+      - name: 商城管理
+        uri: 127.0.0.1:1080
+        location: /store-goods/v2/api-docs
 

+ 1 - 0
blade-service-api/pom.xml

@@ -29,6 +29,7 @@
         <module>trade-purchase-api</module>
         <module>blade-project-api</module>
         <module>trade-finance-api</module>
+        <module>store-goods-api</module>
     </modules>
 
     <dependencies>

+ 24 - 0
blade-service-api/store-goods-api/pom.xml

@@ -0,0 +1,24 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>blade-service-api</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.8.2.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>store-goods-api</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${bladex.project.version}</version>
+    <packaging>jar</packaging>
+
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+
+</project>

+ 34 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/dto/GoodsDescDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.dto;
+
+import com.store.goods.entity.GoodsDesc;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GoodsDescDTO extends GoodsDesc {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/dto/GoodsItemsDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.dto;
+
+import com.store.goods.entity.GoodsItems;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GoodsItemsDTO extends GoodsItems {
+	private static final long serialVersionUID = 1L;
+
+}

+ 34 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/dto/GoodsTypeDTO.java

@@ -0,0 +1,34 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.dto;
+
+import com.store.goods.entity.GoodsType;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+/**
+ * 商品类别表数据传输对象实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class GoodsTypeDTO extends GoodsType {
+	private static final long serialVersionUID = 1L;
+
+}

+ 111 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/entity/GoodsDesc.java

@@ -0,0 +1,111 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@TableName("store_goods_desc")
+@ApiModel(value = "GoodsDesc对象", description = "GoodsDesc对象")
+public class GoodsDesc implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+    @TableId
+	private Long id;
+	/**
+	* 所属分类id
+	*/
+		@ApiModelProperty(value = "所属分类id")
+		private Long typeId;
+	/**
+	* 商品基础信息
+	*/
+		@ApiModelProperty(value = "商品基础信息")
+		private String cName;
+	/**
+	* 排序
+	*/
+		@ApiModelProperty(value = "排序")
+		private Integer sort;
+	/**
+	* 推广词
+	*/
+		@ApiModelProperty(value = "推广词")
+		private String promote;
+	/**
+	* 详情内容
+	*/
+		@ApiModelProperty(value = "详情内容")
+		private String details;
+	/**
+	* 乐观锁
+	*/
+		@ApiModelProperty(value = "乐观锁")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+
+}

+ 178 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/entity/GoodsItems.java

@@ -0,0 +1,178 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@TableName("store_goods_items")
+@ApiModel(value = "GoodsItems对象", description = "GoodsItems对象")
+public class GoodsItems implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+    @TableId
+	private Long id;
+	/**
+	* 主表信息
+	*/
+		@ApiModelProperty(value = "主表信息")
+		private Long pid;
+	/**
+	* 商品规格名称
+	*/
+		@ApiModelProperty(value = "商品规格名称")
+		private String cName;
+	/**
+	* 图片地址
+	*/
+		@ApiModelProperty(value = "图片地址")
+		private String priture;
+	/**
+	* 商品标签
+	*/
+		@ApiModelProperty(value = "商品标签")
+		private String goodsTitel;
+	/**
+	* 服务标签
+	*/
+		@ApiModelProperty(value = "服务标签")
+		private String serviceTitel;
+	/**
+	* 商品价格
+	*/
+		@ApiModelProperty(value = "商品价格")
+		private BigDecimal price;
+	/**
+	* 商品市场价格
+	*/
+		@ApiModelProperty(value = "商品市场价格")
+		private BigDecimal marketPrice;
+	/**
+	* 限购数量
+	*/
+		@ApiModelProperty(value = "限购数量")
+		private BigDecimal purchasing;
+	/**
+	* vip价格
+	*/
+		@ApiModelProperty(value = "vip价格")
+		private BigDecimal vipPrice;
+	/**
+	* 库存
+	*/
+		@ApiModelProperty(value = "库存")
+		private BigDecimal stock;
+	/**
+	* 已售数量
+	*/
+		@ApiModelProperty(value = "已售数量")
+		private BigDecimal sold;
+	/**
+	* 查看数量
+	*/
+		@ApiModelProperty(value = "查看数量")
+		private Integer view;
+	/**
+	* 收藏数量
+	*/
+		@ApiModelProperty(value = "收藏数量")
+		private Integer collection;
+	/**
+	* 分享数量
+	*/
+		@ApiModelProperty(value = "分享数量")
+		private Integer share;
+	/**
+	* 下架时间
+	*/
+		@ApiModelProperty(value = "下架时间")
+		private LocalDateTime pullTime;
+	/**
+	* 是否vip
+	*/
+		@ApiModelProperty(value = "是否vip")
+		private Integer vip;
+	/**
+	* 是否推荐精选 0不推荐 1推荐
+	*/
+		@ApiModelProperty(value = "是否推荐精选 0不推荐 1推荐")
+		private Integer isRecommended;
+	/**
+	* 是否精选  0不精选 1精选
+	*/
+		@ApiModelProperty(value = "是否精选  0不精选 1精选")
+		private Integer isHandpick;
+	/**
+	* 0待审核 1上架中 2已下架
+	*/
+		@ApiModelProperty(value = "0待审核 1上架中 2已下架")
+		private Integer goodsStatus;
+	/**
+	* 乐观锁
+	*/
+		@ApiModelProperty(value = "乐观锁")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+
+}

+ 121 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/entity/GoodsType.java

@@ -0,0 +1,121 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 商品类别表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@TableName("store_goods_type")
+@ApiModel(value = "GoodsType对象", description = "商品类别表")
+public class GoodsType implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		@TableId
+		private Long id;
+	/**
+	* 类别名称
+	*/
+		@ApiModelProperty(value = "类别名称")
+		private String cname;
+	/**
+	* 父主键
+	*/
+		@ApiModelProperty(value = "父主键")
+		private Long parentId;
+	/**
+	* 祖籍列表
+	*/
+		@ApiModelProperty(value = "祖籍列表")
+		private String ancestors;
+	/**
+	* 类型(商品类型、事务类型)
+	*/
+		@ApiModelProperty(value = "类型(商品类型、事务类型)")
+		private Integer type;
+	/**
+	* 排序
+	*/
+		@ApiModelProperty(value = "排序")
+		private Integer sort;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private LocalDateTime createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private LocalDateTime updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+
+}

+ 36 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/vo/GoodsDescVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.vo;
+
+import com.store.goods.entity.GoodsDesc;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GoodsDescVO对象", description = "GoodsDescVO对象")
+public class GoodsDescVO extends GoodsDesc {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/vo/GoodsItemsVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.vo;
+
+import com.store.goods.entity.GoodsItems;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GoodsItemsVO对象", description = "GoodsItemsVO对象")
+public class GoodsItemsVO extends GoodsItems {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/store-goods-api/src/main/java/com/store/goods/vo/GoodsTypeVO.java

@@ -0,0 +1,36 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.vo;
+
+import com.store.goods.entity.GoodsType;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 商品类别表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "GoodsTypeVO对象", description = "商品类别表")
+public class GoodsTypeVO extends GoodsType {
+	private static final long serialVersionUID = 1L;
+
+}

+ 1 - 0
blade-service/pom.xml

@@ -29,6 +29,7 @@
         <module>trade-purchase</module>
         <module>blade-project</module>
         <module>trade-finance</module>
+        <module>store-goods</module>
     </modules>
 
     <dependencies>

+ 87 - 0
blade-service/store-goods/pom.xml

@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>blade-service</artifactId>
+        <groupId>org.springblade</groupId>
+        <version>2.8.2.RELEASE</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>store-goods</artifactId>
+    <name>${project.artifactId}</name>
+    <version>2.8.2.RELEASE</version>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+    </properties>
+
+    <dependencies>
+
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.mapstruct</groupId>
+            <artifactId>mapstruct-processor</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.projectlombok</groupId>
+            <artifactId>lombok-mapstruct-binding</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-swagger</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>trade-finance-api</artifactId>
+            <version>${bladex.project.version}</version>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-core-boot</artifactId>
+        </dependency>
+
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-swagger</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-client-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>joda-time</groupId>
+            <artifactId>joda-time</artifactId>
+            <version>2.10.10</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-starter-transaction</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>store-goods-api</artifactId>
+            <version>2.8.2.RELEASE</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+
+</project>

+ 41 - 0
blade-service/store-goods/src/main/java/com/store/goods/StoreGoodsApplication.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods;
+
+import org.mybatis.spring.annotation.MapperScan;
+import org.springblade.core.cloud.feign.EnableBladeFeign;
+import org.springblade.core.launch.BladeApplication;
+import org.springblade.core.launch.constant.AppConstant;
+import org.springblade.core.transaction.annotation.SeataCloudApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+
+/**
+ * 用户启动器
+ *
+ * @author Chill
+ */
+@EnableBladeFeign
+@SpringCloudApplication
+@MapperScan({"com.store.goods.**.mapper.**"})
+@SeataCloudApplication
+public class StoreGoodsApplication {
+
+	public static void main(String[] args) {
+		BladeApplication.run("store-goods", StoreGoodsApplication.class, args);
+	}
+
+}

+ 171 - 0
blade-service/store-goods/src/main/java/com/store/goods/controller/GoodsDescController.java

@@ -0,0 +1,171 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.store.goods.entity.GoodsItems;
+import com.store.goods.service.IGoodsItemsService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.store.goods.entity.GoodsDesc;
+import com.store.goods.vo.GoodsDescVO;
+import com.store.goods.service.IGoodsDescService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+import java.util.List;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/goodsdesc")
+@Api(value = "商品主表", tags = "商品主表接口")
+public class GoodsDescController extends BladeController {
+
+	private final IGoodsDescService goodsDescService;
+
+	private final IGoodsItemsService goodsItemsService;
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入goodsDesc")
+	public R<GoodsDesc> detail(GoodsDesc goodsDesc) {
+		GoodsDesc detail = goodsDescService.getOne(Condition.getQueryWrapper(goodsDesc));
+		LambdaQueryWrapper<GoodsItems> itemsLambdaQueryWrapper=new LambdaQueryWrapper<>();
+		itemsLambdaQueryWrapper
+			.eq(GoodsItems::getIsDeleted,0)
+			.eq(GoodsItems::getPid,detail.getId())
+			.eq(GoodsItems::getTenantId, AuthUtil.getTenantId());
+		List<GoodsItems> itemsList = goodsItemsService.list(itemsLambdaQueryWrapper);
+		detail.setItemsList(itemsList);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入goodsDesc")
+	public R<IPage<GoodsDesc>> list(GoodsDesc goodsDesc, Query query) {
+		IPage<GoodsDesc> pages = goodsDescService.page(Condition.getPage(query), Condition.getQueryWrapper(goodsDesc));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入goodsDesc")
+	public R<IPage<GoodsDescVO>> page(GoodsDescVO goodsDesc, Query query) {
+		IPage<GoodsDescVO> pages = goodsDescService.selectGoodsDescPage(Condition.getPage(query), goodsDesc);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入goodsDesc")
+	public R save(@Valid @RequestBody GoodsDesc goodsDesc) {
+		return R.status(goodsDescService.save(goodsDesc));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入goodsDesc")
+	public R update(@Valid @RequestBody GoodsDesc goodsDesc) {
+		return R.status(goodsDescService.updateById(goodsDesc));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入goodsDesc")
+	public R submit(@Valid @RequestBody GoodsDesc goodsDesc) {
+		return R.status(goodsDescService.saveOrUpdate(goodsDesc));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(goodsDescService.removeByIds(Func.toLongList(ids)));
+	}
+
+	/**
+	 * 批量上下架
+	 */
+	@PostMapping("/batchOperationGoods")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "批量上下架", notes = "传入ids")
+	public R batchOperationGoods(@ApiParam(value = "主键集合", required = true) @RequestParam String ids,
+					@ApiParam(value = "0:下架 1:上架", required = true) @RequestParam int flag)
+	{
+		List<Long> longs = Func.toLongList(ids);
+		if(CollectionUtils.isEmpty(longs))
+		{
+			throw new SecurityException("传入ids不能为空");
+		}
+		goodsDescService.batchOperationGoods(longs,flag);
+		return R.success("操作成功");
+	}
+
+
+	/**
+	 * 确认保存
+	 */
+	@PostMapping("/modify")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "确认保存", notes = "传入商品主表和规格")
+	public R modify(@RequestBody GoodsDesc goodsDesc)
+	{
+		goodsDescService.modify(goodsDesc);
+		return R.success("操作成功");
+	}
+
+}

+ 126 - 0
blade-service/store-goods/src/main/java/com/store/goods/controller/GoodsItemsController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.store.goods.entity.GoodsItems;
+import com.store.goods.vo.GoodsItemsVO;
+import com.store.goods.service.IGoodsItemsService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ *  控制器
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/goodsitems")
+@Api(value = "商品规格表", tags = "商品规格表接口")
+public class GoodsItemsController extends BladeController {
+
+	private final IGoodsItemsService goodsItemsService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入goodsItems")
+	public R<GoodsItems> detail(GoodsItems goodsItems) {
+		GoodsItems detail = goodsItemsService.getOne(Condition.getQueryWrapper(goodsItems));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入goodsItems")
+	public R<IPage<GoodsItems>> list(GoodsItems goodsItems, Query query) {
+		IPage<GoodsItems> pages = goodsItemsService.page(Condition.getPage(query), Condition.getQueryWrapper(goodsItems));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入goodsItems")
+	public R<IPage<GoodsItemsVO>> page(GoodsItemsVO goodsItems, Query query) {
+		IPage<GoodsItemsVO> pages = goodsItemsService.selectGoodsItemsPage(Condition.getPage(query), goodsItems);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入goodsItems")
+	public R save(@Valid @RequestBody GoodsItems goodsItems) {
+		return R.status(goodsItemsService.save(goodsItems));
+	}
+
+	/**
+	 * 修改
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入goodsItems")
+	public R update(@Valid @RequestBody GoodsItems goodsItems) {
+		return R.status(goodsItemsService.updateById(goodsItems));
+	}
+
+	/**
+	 * 新增或修改
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入goodsItems")
+	public R submit(@Valid @RequestBody GoodsItems goodsItems) {
+		return R.status(goodsItemsService.saveOrUpdate(goodsItems));
+	}
+
+
+	/**
+	 * 删除
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(goodsItemsService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 126 - 0
blade-service/store-goods/src/main/java/com/store/goods/controller/GoodsTypeController.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.controller;
+
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
+import lombok.AllArgsConstructor;
+import javax.validation.Valid;
+
+import org.springblade.core.mp.support.Condition;
+import org.springblade.core.mp.support.Query;
+import org.springblade.core.tool.api.R;
+import org.springblade.core.tool.utils.Func;
+import org.springframework.web.bind.annotation.*;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import com.store.goods.entity.GoodsType;
+import com.store.goods.vo.GoodsTypeVO;
+import com.store.goods.service.IGoodsTypeService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 商品类别表 控制器
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/goodstype")
+@Api(value = "商品类别表", tags = "商品类别表接口")
+public class GoodsTypeController extends BladeController {
+
+	private final IGoodsTypeService goodsTypeService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入goodsType")
+	public R<GoodsType> detail(GoodsType goodsType) {
+		GoodsType detail = goodsTypeService.getOne(Condition.getQueryWrapper(goodsType));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 商品类别表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入goodsType")
+	public R<IPage<GoodsType>> list(GoodsType goodsType, Query query) {
+		IPage<GoodsType> pages = goodsTypeService.page(Condition.getPage(query), Condition.getQueryWrapper(goodsType));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 商品类别表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入goodsType")
+	public R<IPage<GoodsTypeVO>> page(GoodsTypeVO goodsType, Query query) {
+		IPage<GoodsTypeVO> pages = goodsTypeService.selectGoodsTypePage(Condition.getPage(query), goodsType);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 商品类别表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入goodsType")
+	public R save(@Valid @RequestBody GoodsType goodsType) {
+		return R.status(goodsTypeService.save(goodsType));
+	}
+
+	/**
+	 * 修改 商品类别表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入goodsType")
+	public R update(@Valid @RequestBody GoodsType goodsType) {
+		return R.status(goodsTypeService.updateById(goodsType));
+	}
+
+	/**
+	 * 新增或修改 商品类别表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入goodsType")
+	public R submit(@Valid @RequestBody GoodsType goodsType) {
+		return R.status(goodsTypeService.saveOrUpdate(goodsType));
+	}
+
+	
+	/**
+	 * 删除 商品类别表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(goodsTypeService.removeByIds(Func.toLongList(ids)));
+	}
+
+	
+}

+ 117 - 0
blade-service/store-goods/src/main/java/com/store/goods/entity/GoodsDesc.java

@@ -0,0 +1,117 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@TableName("store_goods_desc")
+@ApiModel(value = "GoodsDesc对象", description = "GoodsDesc对象")
+public class GoodsDesc implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+    @TableId
+	private Long id;
+	/**
+	* 所属分类id
+	*/
+		@ApiModelProperty(value = "所属分类id")
+		private Long typeId;
+	/**
+	* 商品基础信息
+	*/
+		@ApiModelProperty(value = "商品基础信息")
+		private String cName;
+	/**
+	* 排序
+	*/
+		@ApiModelProperty(value = "排序")
+		private Integer sort;
+	/**
+	* 推广词
+	*/
+		@ApiModelProperty(value = "推广词")
+		private String promote;
+	/**
+	* 详情内容
+	*/
+		@ApiModelProperty(value = "详情内容")
+		private String details;
+	/**
+	* 乐观锁
+	*/
+		@ApiModelProperty(value = "乐观锁")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+		@ApiModelProperty(value = "商品规格子项")
+		@TableField(exist = false)
+		private List<GoodsItems> itemsList;
+
+}

+ 181 - 0
blade-service/store-goods/src/main/java/com/store/goods/entity/GoodsItems.java

@@ -0,0 +1,181 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.math.BigDecimal;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@TableName("store_goods_items")
+@ApiModel(value = "GoodsItems对象", description = "GoodsItems对象")
+public class GoodsItems implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+    @TableId
+	private Long id;
+	/**
+	* 主表信息
+	*/
+		@ApiModelProperty(value = "主表信息")
+		private Long pid;
+	/**
+	* 商品规格名称
+	*/
+		@ApiModelProperty(value = "商品规格名称")
+		private String cName;
+	/**
+	* 图片地址
+	*/
+		@ApiModelProperty(value = "图片地址")
+		private String priture;
+	/**
+	* 商品标签
+	*/
+		@ApiModelProperty(value = "商品标签")
+		private String goodsTitel;
+	/**
+	* 服务标签
+	*/
+		@ApiModelProperty(value = "服务标签")
+		private String serviceTitel;
+	/**
+	* 商品价格
+	*/
+		@ApiModelProperty(value = "商品价格")
+		private BigDecimal price;
+	/**
+	* 商品市场价格
+	*/
+		@ApiModelProperty(value = "商品市场价格")
+		private BigDecimal marketPrice;
+	/**
+	* 限购数量
+	*/
+		@ApiModelProperty(value = "限购数量")
+		private BigDecimal purchasing;
+	/**
+	* vip价格
+	*/
+		@ApiModelProperty(value = "vip价格")
+		private BigDecimal vipPrice;
+	/**
+	* 库存
+	*/
+		@ApiModelProperty(value = "库存")
+		private BigDecimal stock;
+	/**
+	* 已售数量
+	*/
+		@ApiModelProperty(value = "已售数量")
+		private BigDecimal sold;
+	/**
+	* 查看数量
+	*/
+		@ApiModelProperty(value = "查看数量")
+		private Integer view;
+	/**
+	* 收藏数量
+	*/
+		@ApiModelProperty(value = "收藏数量")
+		private Integer collection;
+	/**
+	* 分享数量
+	*/
+		@ApiModelProperty(value = "分享数量")
+		private Integer share;
+	/**
+	* 下架时间
+	*/
+		@ApiModelProperty(value = "下架时间")
+		private Date pullTime;
+	/**
+	* 是否vip
+	*/
+		@ApiModelProperty(value = "是否vip")
+		private Integer vip;
+	/**
+	* 是否推荐精选 0不推荐 1推荐
+	*/
+		@ApiModelProperty(value = "是否推荐精选 0不推荐 1推荐")
+		private Integer isRecommended;
+	/**
+	* 是否精选  0不精选 1精选
+	*/
+		@ApiModelProperty(value = "是否精选  0不精选 1精选")
+		private Integer isHandpick;
+	/**
+	* 0待审核 1上架中 2已下架
+	*/
+		@ApiModelProperty(value = "0待审核 1上架中 2已下架")
+		private Integer goodsStatus;
+	/**
+	* 乐观锁
+	*/
+		@ApiModelProperty(value = "乐观锁")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+
+
+}

+ 122 - 0
blade-service/store-goods/src/main/java/com/store/goods/entity/GoodsType.java

@@ -0,0 +1,122 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.entity;
+
+import com.baomidou.mybatisplus.annotation.TableId;
+import com.baomidou.mybatisplus.annotation.TableLogic;
+import com.baomidou.mybatisplus.annotation.TableName;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.time.LocalDateTime;
+import java.util.Date;
+
+/**
+ * 商品类别表实体类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Data
+@TableName("store_goods_type")
+@ApiModel(value = "GoodsType对象", description = "商品类别表")
+public class GoodsType implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		@TableId
+		private Long id;
+	/**
+	* 类别名称
+	*/
+		@ApiModelProperty(value = "类别名称")
+		private String cname;
+	/**
+	* 父主键
+	*/
+		@ApiModelProperty(value = "父主键")
+		private Long parentId;
+	/**
+	* 祖籍列表
+	*/
+		@ApiModelProperty(value = "祖籍列表")
+		private String ancestors;
+	/**
+	* 类型(商品类型、事务类型)
+	*/
+		@ApiModelProperty(value = "类型(商品类型、事务类型)")
+		private Integer type;
+	/**
+	* 排序
+	*/
+		@ApiModelProperty(value = "排序")
+		private Integer sort;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	* 创建人
+	*/
+		@ApiModelProperty(value = "创建人")
+		private Long createUser;
+	/**
+	* 创建部门
+	*/
+		@ApiModelProperty(value = "创建部门")
+		private Long createDept;
+	/**
+	* 创建时间
+	*/
+		@ApiModelProperty(value = "创建时间")
+		private Date createTime;
+	/**
+	* 修改人
+	*/
+		@ApiModelProperty(value = "修改人")
+		private Long updateUser;
+	/**
+	* 修改时间
+	*/
+		@ApiModelProperty(value = "修改时间")
+		private Date updateTime;
+	/**
+	* 状态(0 正常 1停用)
+	*/
+		@ApiModelProperty(value = "状态(0 正常 1停用)")
+		private Integer status;
+	/**
+	* 是否已删除(0 否 1是)
+	*/
+		@ApiModelProperty(value = "是否已删除(0 否 1是)")
+		@TableLogic
+		private Integer isDeleted;
+
+
+}

+ 44 - 0
blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsDescMapper.java

@@ -0,0 +1,44 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.mapper;
+
+import com.store.goods.entity.GoodsDesc;
+import com.store.goods.vo.GoodsDescVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+public interface GoodsDescMapper extends BaseMapper<GoodsDesc> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsDesc
+	 * @return
+	 */
+	List<GoodsDescVO> selectGoodsDescPage(IPage page, GoodsDescVO goodsDesc);
+
+}

+ 28 - 0
blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsDescMapper.xml

@@ -0,0 +1,28 @@
+<?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.store.goods.mapper.GoodsDescMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="goodsDescResultMap" type="com.store.goods.entity.GoodsDesc">
+        <id column="id" property="id"/>
+        <result column="type_id" property="typeId"/>
+        <result column="c_name" property="cName"/>
+        <result column="sort" property="sort"/>
+        <result column="promote" property="promote"/>
+        <result column="details" property="details"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectGoodsDescPage" resultMap="goodsDescResultMap">
+        select * from store_goods_desc where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsItemsMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.mapper;
+
+import com.store.goods.entity.GoodsItems;
+import com.store.goods.vo.GoodsItemsVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ *  Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+public interface GoodsItemsMapper extends BaseMapper<GoodsItems> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsItems
+	 * @return
+	 */
+	List<GoodsItemsVO> selectGoodsItemsPage(IPage page, GoodsItemsVO goodsItems);
+
+}

+ 41 - 0
blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsItemsMapper.xml

@@ -0,0 +1,41 @@
+<?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.store.goods.mapper.GoodsItemsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="goodsItemsResultMap" type="com.store.goods.entity.GoodsItems">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="c_name" property="cName"/>
+        <result column="priture" property="priture"/>
+        <result column="goods_titel" property="goodsTitel"/>
+        <result column="service_titel" property="serviceTitel"/>
+        <result column="price" property="price"/>
+        <result column="market_price" property="marketPrice"/>
+        <result column="purchasing" property="purchasing"/>
+        <result column="vip_price" property="vipPrice"/>
+        <result column="stock" property="stock"/>
+        <result column="sold" property="sold"/>
+        <result column="view" property="view"/>
+        <result column="collection" property="collection"/>
+        <result column="share" property="share"/>
+        <result column="pull_time" property="pullTime"/>
+        <result column="vip" property="vip"/>
+        <result column="is_recommended" property="isRecommended"/>
+        <result column="is_handpick" property="isHandpick"/>
+        <result column="goods_status" property="goodsStatus"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectGoodsItemsPage" resultMap="goodsItemsResultMap">
+        select * from store_goods_items where is_deleted = 0
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsTypeMapper.java

@@ -0,0 +1,42 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.mapper;
+
+import com.store.goods.entity.GoodsType;
+import com.store.goods.vo.GoodsTypeVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 商品类别表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+public interface GoodsTypeMapper extends BaseMapper<GoodsType> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsType
+	 * @return
+	 */
+	List<GoodsTypeVO> selectGoodsTypePage(IPage page, GoodsTypeVO goodsType);
+
+}

+ 29 - 0
blade-service/store-goods/src/main/java/com/store/goods/mapper/GoodsTypeMapper.xml

@@ -0,0 +1,29 @@
+<?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.store.goods.mapper.GoodsTypeMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="goodsTypeResultMap" type="com.store.goods.entity.GoodsType">
+        <id column="id" property="id"/>
+        <result column="cname" property="cname"/>
+        <result column="parent_id" property="parentId"/>
+        <result column="ancestors" property="ancestors"/>
+        <result column="type" property="type"/>
+        <result column="sort" property="sort"/>
+        <result column="remarks" property="remarks"/>
+        <result column="version" property="version"/>
+        <result column="create_user" property="createUser"/>
+        <result column="create_dept" property="createDept"/>
+        <result column="create_time" property="createTime"/>
+        <result column="update_user" property="updateUser"/>
+        <result column="update_time" property="updateTime"/>
+        <result column="status" property="status"/>
+        <result column="is_deleted" property="isDeleted"/>
+    </resultMap>
+
+
+    <select id="selectGoodsTypePage" resultMap="goodsTypeResultMap">
+        select * from store_goods_type where is_deleted = 0
+    </select>
+
+</mapper>

+ 52 - 0
blade-service/store-goods/src/main/java/com/store/goods/service/IGoodsDescService.java

@@ -0,0 +1,52 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.service;
+
+import com.store.goods.entity.GoodsDesc;
+import com.store.goods.vo.GoodsDescVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.List;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+public interface IGoodsDescService extends IService<GoodsDesc> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsDesc
+	 * @return
+	 */
+	IPage<GoodsDescVO> selectGoodsDescPage(IPage<GoodsDescVO> page, GoodsDescVO goodsDesc);
+
+	/**
+	 * 批量操作上下架
+	 * */
+	void batchOperationGoods(List<Long> ids,int flag);
+
+	/**
+	 * 提交主表信息
+	 * */
+    void modify(GoodsDesc goodsDesc);
+}

+ 41 - 0
blade-service/store-goods/src/main/java/com/store/goods/service/IGoodsItemsService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.service;
+
+import com.store.goods.entity.GoodsItems;
+import com.store.goods.vo.GoodsItemsVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+public interface IGoodsItemsService extends IService<GoodsItems> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsItems
+	 * @return
+	 */
+	IPage<GoodsItemsVO> selectGoodsItemsPage(IPage<GoodsItemsVO> page, GoodsItemsVO goodsItems);
+
+}

+ 41 - 0
blade-service/store-goods/src/main/java/com/store/goods/service/IGoodsTypeService.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.service;
+
+import com.store.goods.entity.GoodsType;
+import com.store.goods.vo.GoodsTypeVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 商品类别表 服务类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+public interface IGoodsTypeService extends IService<GoodsType> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param goodsType
+	 * @return
+	 */
+	IPage<GoodsTypeVO> selectGoodsTypePage(IPage<GoodsTypeVO> page, GoodsTypeVO goodsType);
+
+}

+ 126 - 0
blade-service/store-goods/src/main/java/com/store/goods/service/impl/GoodsDescServiceImpl.java

@@ -0,0 +1,126 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.service.impl;
+
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.store.goods.entity.GoodsDesc;
+import com.store.goods.entity.GoodsItems;
+import com.store.goods.mapper.GoodsItemsMapper;
+import com.store.goods.vo.GoodsDescVO;
+import com.store.goods.mapper.GoodsDescMapper;
+import com.store.goods.service.IGoodsDescService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.core.secure.utils.AuthUtil;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Service
+public class GoodsDescServiceImpl extends ServiceImpl<GoodsDescMapper, GoodsDesc> implements IGoodsDescService
+{
+	@Autowired
+	private  GoodsItemsMapper goodsItemsMapper;
+
+
+	@Override
+	public IPage<GoodsDescVO> selectGoodsDescPage(IPage<GoodsDescVO> page, GoodsDescVO goodsDesc) {
+		return page.setRecords(baseMapper.selectGoodsDescPage(page, goodsDesc));
+	}
+
+	@Override
+	@Transactional
+	public void batchOperationGoods(List<Long> ids, int flag)
+	{
+		List<GoodsItems> goodsItemsList = goodsItemsMapper.selectBatchIds(ids);
+		if(CollectionUtils.isEmpty(goodsItemsList))
+		{
+			throw new SecurityException("未查到相关物品信息,操作失败");
+		}
+		goodsItemsList.forEach(e->{
+            e.setGoodsStatus(flag);
+			goodsItemsMapper.updateById(e);
+		});
+
+
+	}
+
+	@Override
+	@Transactional
+	public void modify(GoodsDesc goodsDesc)
+	{
+		List<GoodsItems> itemsList = goodsDesc.getItemsList();
+		//商品主表新增
+		if(goodsDesc.getId()==null)
+		{
+			goodsDesc.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+			goodsDesc.setCreateUser(AuthUtil.getUserId());
+			goodsDesc.setCreateTime(new Date());
+			baseMapper.insert(goodsDesc);
+
+			if(CollectionUtils.isNotEmpty(itemsList))
+			{
+				itemsList.forEach(item->{
+					item.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+					item.setCreateUser(AuthUtil.getUserId());
+					item.setCreateTime(new Date());
+					goodsItemsMapper.insert(item);
+				});
+			}
+		}
+		//商品主表更新
+		else
+		{
+			goodsDesc.setUpdateUser(AuthUtil.getUserId());
+			goodsDesc.setUpdateTime(new Date());
+			baseMapper.updateById(goodsDesc);
+
+			if(CollectionUtils.isNotEmpty(itemsList))
+			{
+				itemsList.forEach(item->{
+					if(item.getId()==null)
+					{
+						item.setCreateDept(Long.valueOf(AuthUtil.getDeptId()));
+						item.setCreateUser(AuthUtil.getUserId());
+						item.setCreateTime(new Date());
+						goodsItemsMapper.insert(item);
+					}
+					else
+					{
+						item.setUpdateUser(AuthUtil.getUserId());
+						item.setUpdateTime(new Date());
+						goodsItemsMapper.updateById(item);
+					}
+
+				});
+			}
+
+		}
+
+
+	}
+
+}

+ 41 - 0
blade-service/store-goods/src/main/java/com/store/goods/service/impl/GoodsItemsServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.service.impl;
+
+import com.store.goods.entity.GoodsItems;
+import com.store.goods.vo.GoodsItemsVO;
+import com.store.goods.mapper.GoodsItemsMapper;
+import com.store.goods.service.IGoodsItemsService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ *  服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Service
+public class GoodsItemsServiceImpl extends ServiceImpl<GoodsItemsMapper, GoodsItems> implements IGoodsItemsService {
+
+	@Override
+	public IPage<GoodsItemsVO> selectGoodsItemsPage(IPage<GoodsItemsVO> page, GoodsItemsVO goodsItems) {
+		return page.setRecords(baseMapper.selectGoodsItemsPage(page, goodsItems));
+	}
+
+}

+ 41 - 0
blade-service/store-goods/src/main/java/com/store/goods/service/impl/GoodsTypeServiceImpl.java

@@ -0,0 +1,41 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package com.store.goods.service.impl;
+
+import com.store.goods.entity.GoodsType;
+import com.store.goods.vo.GoodsTypeVO;
+import com.store.goods.mapper.GoodsTypeMapper;
+import com.store.goods.service.IGoodsTypeService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 商品类别表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-11-19
+ */
+@Service
+public class GoodsTypeServiceImpl extends ServiceImpl<GoodsTypeMapper, GoodsType> implements IGoodsTypeService {
+
+	@Override
+	public IPage<GoodsTypeVO> selectGoodsTypePage(IPage<GoodsTypeVO> page, GoodsTypeVO goodsType) {
+		return page.setRecords(baseMapper.selectGoodsTypePage(page, goodsType));
+	}
+
+}

+ 14 - 0
blade-service/store-goods/src/main/resources/application-dev.yml

@@ -0,0 +1,14 @@
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.dev.url}
+    username: ${blade.datasource.dev.username}
+    password: ${blade.datasource.dev.password}
+
+#mybatis-plus:
+#  mapper-locations: classpath:com/yh/project/mapper/*Mapper.xml
+#  type-aliases-package: com.yh.project.*.entity
+#swagger文档
+swagger:
+  base-packages:
+    - com.store.goods

+ 7 - 0
blade-service/store-goods/src/main/resources/application-prod.yml

@@ -0,0 +1,7 @@
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.prod.url}
+    username: ${blade.datasource.prod.username}
+    password: ${blade.datasource.prod.password}
+

+ 6 - 0
blade-service/store-goods/src/main/resources/application-test.yml

@@ -0,0 +1,6 @@
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.test.url}
+    username: ${blade.datasource.test.username}
+    password: ${blade.datasource.test.password}

+ 13 - 0
blade-service/store-goods/src/main/resources/application.yml

@@ -0,0 +1,13 @@
+#服务器端口
+server:
+  port: 9055
+
+#默认对象存储配置
+oss:
+  enabled: true
+  name: minio
+  tenant-mode: true
+  endpoint: http://127.0.0.1:9000
+  access-key: D99KGE6ZTQXSATTJWU24
+  secret-key: QyVqGnhIQQE734UYSUFlGOZViE6+ZlDEfUG3NjhJ
+  bucket-name: bladex