lazhaoqian 4 лет назад
Родитель
Сommit
a1f19ebc1f
52 измененных файлов с 3179 добавлено и 13 удалено
  1. 4 0
      blade-common/src/main/java/org/springblade/common/constant/LauncherConstant.java
  2. 0 3
      blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java
  3. 2 2
      blade-service-api/blade-client-api/pom.xml
  4. 34 0
      blade-service-api/blade-mocha-item-api/pom.xml
  5. 128 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/Price.java
  6. 154 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/PriceItem.java
  7. 128 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/SalesPolicy.java
  8. 154 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/SalesPolicyItem.java
  9. 36 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/PriceItemVO.java
  10. 36 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/PriceVO.java
  11. 36 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/SalesPolicyItemVO.java
  12. 36 0
      blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/SalesPolicyVO.java
  13. 1 0
      blade-service-api/pom.xml
  14. 3 3
      blade-service/blade-client/pom.xml
  15. 4 0
      blade-service/blade-client/src/main/java/org/springblade/client/ClientApplication.java
  16. 4 0
      blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/DeliverGoodsApplication.java
  17. 43 0
      blade-service/blade-mocha-item/pom.xml
  18. 43 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/MochaItemApplication.java
  19. 135 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/PriceController.java
  20. 130 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/PriceItemController.java
  21. 135 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/SalesPolicyController.java
  22. 130 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/SalesPolicyItemController.java
  23. 149 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/Price.java
  24. 154 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/PriceItem.java
  25. 159 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/SalesPolicy.java
  26. 168 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/SalesPolicyItem.java
  27. 42 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceItemMapper.java
  28. 35 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceItemMapper.xml
  29. 43 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceMapper.java
  30. 69 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceMapper.xml
  31. 42 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyItemMapper.java
  32. 34 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyItemMapper.xml
  33. 43 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyMapper.java
  34. 63 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyMapper.xml
  35. 41 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/IPriceItemService.java
  36. 56 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/IPriceService.java
  37. 41 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/ISalesPolicyItemService.java
  38. 56 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/ISalesPolicyService.java
  39. 41 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/PriceItemServiceImpl.java
  40. 104 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/PriceServiceImpl.java
  41. 41 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/SalesPolicyItemServiceImpl.java
  42. 158 0
      blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/SalesPolicyServiceImpl.java
  43. 21 0
      blade-service/blade-mocha-item/src/main/resources/application-dev.yml
  44. 10 0
      blade-service/blade-mocha-item/src/main/resources/application-prod.yml
  45. 10 0
      blade-service/blade-mocha-item/src/main/resources/application-test.yml
  46. 3 2
      blade-service/blade-purchase-sales/pom.xml
  47. 4 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/PurchaseSalesApplication.java
  48. 7 2
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/entity/OrderItems.java
  49. 2 1
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.java
  50. 202 0
      blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.xml
  51. 4 0
      blade-service/blade-stock/src/main/java/org/springblade/stock/StockApplication.java
  52. 1 0
      blade-service/pom.xml

+ 4 - 0
blade-common/src/main/java/org/springblade/common/constant/LauncherConstant.java

@@ -36,6 +36,10 @@ public interface LauncherConstant {
 	 */
 	String APPLICATION_PURCHASE_SALES_NAME = APPLICATION_NAME_PREFIX + "purchase-sales";
 	/**
+	 * MochaItem
+	 */
+	String APPLICATION_MOCHA_ITEM_NAME = APPLICATION_NAME_PREFIX + "mocha-item";
+	/**
 	 * DeliverGoods
 	 */
 	String APPLICATION_DELIVER_GOODS_NAME = APPLICATION_NAME_PREFIX + "deliver-goods";

+ 0 - 3
blade-ops/blade-resource/src/main/java/org/springblade/resource/endpoint/OssEndpoint.java

@@ -145,9 +145,6 @@ public class OssEndpoint{
 	@PostMapping("/put-file")
 	public R<BladeFile> putFile(@RequestParam MultipartFile file) {
 		BladeFile bladeFile = ossBuilder.template().putFile(file.getOriginalFilename(), file.getInputStream());
-		String link = bladeFile.getLink();
-		String replace = link.replace("127.0.0.1:9000/", "192.168.1.177:81/file/");
-		bladeFile.setLink(replace);
 		return R.data(bladeFile);
 	}
 

+ 2 - 2
blade-service-api/blade-client-api/pom.xml

@@ -20,13 +20,13 @@
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-resource-api</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-system-api</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
     </dependencies>

+ 34 - 0
blade-service-api/blade-mocha-item-api/pom.xml

@@ -0,0 +1,34 @@
+<?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>blade-mocha-item-api</artifactId>
+
+    <name>${project.artifactId}</name>
+    <version>${bladex.project.version}</version>
+    <dependencies>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-common</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-resource-api</artifactId>
+            <version>${bladex.project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-system-api</artifactId>
+            <version>${bladex.project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+</project>

+ 128 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/Price.java

@@ -0,0 +1,128 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 价格管理表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_price")
+@ApiModel(value = "Price对象", description = "价格管理表")
+public class Price implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 大字
+	*/
+		@ApiModelProperty(value = "大字")
+		private String bigCharacter;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 花纹
+	*/
+		@ApiModelProperty(value = "花纹")
+		private String brandItem;
+	/**
+	* 规格
+	*/
+		@ApiModelProperty(value = "规格")
+		private String typeno;
+	/**
+	* 产品类别
+	*/
+		@ApiModelProperty(value = "产品类别")
+		private String category;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@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是)")
+		private Integer isDeleted;
+
+
+}

+ 154 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/PriceItem.java

@@ -0,0 +1,154 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 价格管理明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_price_item")
+@ApiModel(value = "PriceItem对象", description = "价格管理明细表")
+public class PriceItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 编码
+	*/
+		@ApiModelProperty(value = "编码")
+		private String code;
+	/**
+	* 大字
+	*/
+		@ApiModelProperty(value = "大字")
+		private String bigCharacter;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 花纹
+	*/
+		@ApiModelProperty(value = "花纹")
+		private String brandItem;
+	/**
+	* 规格
+	*/
+		@ApiModelProperty(value = "规格")
+		private String typeno;
+	/**
+	* 产品类别
+	*/
+		@ApiModelProperty(value = "产品类别")
+		private String category;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 供应商编码
+	*/
+		@ApiModelProperty(value = "供应商编码")
+		private String corpCode;
+	/**
+	* 采购价
+	*/
+		@ApiModelProperty(value = "采购价")
+		private BigDecimal purchasePrice;
+	/**
+	* 销售价
+	*/
+		@ApiModelProperty(value = "销售价")
+		private BigDecimal salesPrice;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@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是)")
+		private Integer isDeleted;
+
+
+}

+ 128 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/SalesPolicy.java

@@ -0,0 +1,128 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 销售政策表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_sales_policy")
+@ApiModel(value = "SalesPolicy对象", description = "销售政策表")
+public class SalesPolicy implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 编码
+	*/
+		@ApiModelProperty(value = "编码")
+		private String code;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 政策名称
+	*/
+		@ApiModelProperty(value = "政策名称")
+		private String cname;
+	/**
+	* 有效期开始时间
+	*/
+		@ApiModelProperty(value = "有效期开始时间")
+		private Date startTime;
+	/**
+	* 有效期结束时间
+	*/
+		@ApiModelProperty(value = "有效期结束时间")
+		private Date endTime;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@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是)")
+		private Integer isDeleted;
+
+
+}

+ 154 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/entity/SalesPolicyItem.java

@@ -0,0 +1,154 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 销售政策明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_sales_policy_item")
+@ApiModel(value = "SalesPolicyItem对象", description = "销售政策明细表")
+public class SalesPolicyItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 编码
+	*/
+		@ApiModelProperty(value = "编码")
+		private String code;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 规格
+	*/
+		@ApiModelProperty(value = "规格")
+		private String typeno;
+	/**
+	* 采购价
+	*/
+		@ApiModelProperty(value = "采购价")
+		private BigDecimal purchasePrice;
+	/**
+	* 销售价
+	*/
+		@ApiModelProperty(value = "销售价")
+		private BigDecimal salesPrice;
+	/**
+	* 特价
+	*/
+		@ApiModelProperty(value = "特价")
+		private BigDecimal specialOffer;
+	/**
+	* 采购数量
+	*/
+		@ApiModelProperty(value = "采购数量")
+		private BigDecimal purchaseAmount;
+	/**
+	* 赠送数量
+	*/
+		@ApiModelProperty(value = "赠送数量")
+		private BigDecimal salesVolume;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	* 版本
+	*/
+		@ApiModelProperty(value = "版本")
+		private String version;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 创建人
+	*/
+		@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是)")
+		private Integer isDeleted;
+	/**
+	 * 销售政策类别 1特价促销 2买赠促销
+	 */
+	@ApiModelProperty(value = "销售政策类别 1特价促销 2买赠促销")
+	private String salesType;
+
+
+}

+ 36 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/PriceItemVO.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 org.springblade.mocha.vo;
+
+import org.springblade.mocha.entity.PriceItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 价格管理明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "PriceItemVO对象", description = "价格管理明细表")
+public class PriceItemVO extends PriceItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/PriceVO.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 org.springblade.mocha.vo;
+
+import org.springblade.mocha.entity.Price;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 价格管理表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "PriceVO对象", description = "价格管理表")
+public class PriceVO extends Price {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/SalesPolicyItemVO.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 org.springblade.mocha.vo;
+
+import org.springblade.mocha.entity.SalesPolicyItem;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 销售政策明细表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SalesPolicyItemVO对象", description = "销售政策明细表")
+public class SalesPolicyItemVO extends SalesPolicyItem {
+	private static final long serialVersionUID = 1L;
+
+}

+ 36 - 0
blade-service-api/blade-mocha-item-api/src/main/java/org/springblade/mocha/vo/SalesPolicyVO.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 org.springblade.mocha.vo;
+
+import org.springblade.mocha.entity.SalesPolicy;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+
+/**
+ * 销售政策表视图实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+@ApiModel(value = "SalesPolicyVO对象", description = "销售政策表")
+public class SalesPolicyVO extends SalesPolicy {
+	private static final long serialVersionUID = 1L;
+
+}

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

@@ -26,6 +26,7 @@
         <module>blade-deliver-goods-api</module>
         <module>blade-deliver-goods-api</module>
         <module>blade-stock-api</module>
+        <module>blade-mocha-item-api</module>
     </modules>
 
     <dependencies>

+ 3 - 3
blade-service/blade-client/pom.xml

@@ -29,13 +29,13 @@
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-user-api</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-resource-api</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
@@ -56,7 +56,7 @@
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-resource</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
     </dependencies>

+ 4 - 0
blade-service/blade-client/src/main/java/org/springblade/client/ClientApplication.java

@@ -27,6 +27,10 @@ import org.springframework.cloud.client.SpringCloudApplication;
  *
  * @author Chill
  */
+
+/**
+ * 基础信息模块
+ */
 @EnableBladeFeign
 @SpringCloudApplication
 // @SeataCloudApplication

+ 4 - 0
blade-service/blade-deliver-goods/src/main/java/org/springblade/deliver/goods/DeliverGoodsApplication.java

@@ -26,6 +26,10 @@ import org.springframework.cloud.client.SpringCloudApplication;
  *
  * @author Chill
  */
+
+/**
+ * 收货 发货 管理
+ */
 @EnableBladeFeign
 @SpringCloudApplication
 // @SeataCloudApplication

+ 43 - 0
blade-service/blade-mocha-item/pom.xml

@@ -0,0 +1,43 @@
+<?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>blade-mocha-item</artifactId>
+    <name>${project.artifactId}</name>
+    <version>${bladex.project.version}</version>
+    <dependencies>
+        <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-purchase-sales-api</artifactId>
+            <version>${bladex.project.version}</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-mocha-item-api</artifactId>
+            <version>${bladex.project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+        <dependency>
+            <groupId>org.springblade</groupId>
+            <artifactId>blade-user-api</artifactId>
+            <version>${bladex.project.version}</version>
+            <scope>compile</scope>
+        </dependency>
+    </dependencies>
+
+</project>

+ 43 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/MochaItemApplication.java

@@ -0,0 +1,43 @@
+/*
+ *      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 org.springblade.mocha;
+
+import org.springblade.common.constant.LauncherConstant;
+import org.springblade.core.cloud.feign.EnableBladeFeign;
+import org.springblade.core.launch.BladeApplication;
+import org.springframework.cloud.client.SpringCloudApplication;
+
+/**
+ * Desk启动器
+ *
+ * @author Chill
+ */
+
+/**
+ * 价格管理模块
+ */
+@EnableBladeFeign
+@SpringCloudApplication
+// @SeataCloudApplication
+public class MochaItemApplication {
+
+	public static void main(String[] args) {
+		BladeApplication.run(LauncherConstant.APPLICATION_MOCHA_ITEM_NAME, MochaItemApplication.class, args);
+	}
+
+}
+

+ 135 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/PriceController.java

@@ -0,0 +1,135 @@
+/*
+ *      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 org.springblade.mocha.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.secure.utils.SecureUtil;
+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 org.springblade.mocha.entity.Price;
+import org.springblade.mocha.vo.PriceVO;
+import org.springblade.mocha.service.IPriceService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 价格管理表 控制器
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/price")
+@Api(value = "价格管理表", tags = "价格管理表接口")
+public class PriceController extends BladeController {
+
+	private final IPriceService priceService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入price")
+	public R<Price> detail(Price price) {
+		Price detail = priceService.getPriceMessage(price);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 价格管理表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入price")
+	public R<IPage<Price>> list(Price price, Query query) {
+		price.setTenantId(SecureUtil.getTenantId());
+		price.setIsDeleted(0);
+		IPage<Price> pages = priceService.page(Condition.getPage(query), Condition.getQueryWrapper(price));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 价格管理表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入price")
+	public R<IPage<Price>> page(Price price, Query query) {
+		price.setTenantId(SecureUtil.getTenantId());
+		price.setIsDeleted(0);
+		IPage<Price> pages = priceService.selectPricePage(Condition.getPage(query), price);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 价格管理表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入price")
+	public R save(@Valid @RequestBody Price price) {
+		return R.status(priceService.save(price));
+	}
+
+	/**
+	 * 修改 价格管理表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入price")
+	public R update(@Valid @RequestBody Price price) {
+		if (price.getId() == null){
+			return R.data(500,"请选择要删除的数据","error");
+		}
+		price.setIsDeleted(1);
+		return R.status(priceService.updateById(price));
+	}
+
+	/**
+	 * 新增或修改 价格管理表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入price")
+	public R submit(@Valid @RequestBody Price price) {
+		return priceService.savePrice(price);
+	}
+
+
+	/**
+	 * 删除 价格管理表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(priceService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 130 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/PriceItemController.java

@@ -0,0 +1,130 @@
+/*
+ *      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 org.springblade.mocha.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 org.springblade.mocha.entity.PriceItem;
+import org.springblade.mocha.vo.PriceItemVO;
+import org.springblade.mocha.service.IPriceItemService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 价格管理明细表 控制器
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/priceitem")
+@Api(value = "价格管理明细表", tags = "价格管理明细表接口")
+public class PriceItemController extends BladeController {
+
+	private final IPriceItemService priceItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入priceItem")
+	public R<PriceItem> detail(PriceItem priceItem) {
+		PriceItem detail = priceItemService.getOne(Condition.getQueryWrapper(priceItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 价格管理明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入priceItem")
+	public R<IPage<PriceItem>> list(PriceItem priceItem, Query query) {
+		IPage<PriceItem> pages = priceItemService.page(Condition.getPage(query), Condition.getQueryWrapper(priceItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 价格管理明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入priceItem")
+	public R<IPage<PriceItemVO>> page(PriceItemVO priceItem, Query query) {
+		IPage<PriceItemVO> pages = priceItemService.selectPriceItemPage(Condition.getPage(query), priceItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 价格管理明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入priceItem")
+	public R save(@Valid @RequestBody PriceItem priceItem) {
+		return R.status(priceItemService.save(priceItem));
+	}
+
+	/**
+	 * 修改 价格管理明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入priceItem")
+	public R update(@Valid @RequestBody PriceItem priceItem) {
+		if (priceItem.getId() == null){
+			return R.data(500,"请选择要删除的数据","error");
+		}
+		priceItem.setIsDeleted(1);
+		return R.status(priceItemService.updateById(priceItem));
+	}
+
+	/**
+	 * 新增或修改 价格管理明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入priceItem")
+	public R submit(@Valid @RequestBody PriceItem priceItem) {
+		return R.status(priceItemService.saveOrUpdate(priceItem));
+	}
+
+
+	/**
+	 * 删除 价格管理明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(priceItemService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 135 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/SalesPolicyController.java

@@ -0,0 +1,135 @@
+/*
+ *      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 org.springblade.mocha.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.secure.utils.SecureUtil;
+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 org.springblade.mocha.entity.SalesPolicy;
+import org.springblade.mocha.vo.SalesPolicyVO;
+import org.springblade.mocha.service.ISalesPolicyService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 销售政策表 控制器
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/salespolicy")
+@Api(value = "销售政策表", tags = "销售政策表接口")
+public class SalesPolicyController extends BladeController {
+
+	private final ISalesPolicyService salesPolicyService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入salesPolicy")
+	public R<SalesPolicy> detail(SalesPolicy salesPolicy) {
+		SalesPolicy detail = salesPolicyService.getSalesPolicy(salesPolicy);
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 销售政策表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入salesPolicy")
+	public R<IPage<SalesPolicy>> list(SalesPolicy salesPolicy, Query query) {
+		salesPolicy.setTenantId(SecureUtil.getTenantId());
+		salesPolicy.setIsDeleted(0);
+		IPage<SalesPolicy> pages = salesPolicyService.page(Condition.getPage(query), Condition.getQueryWrapper(salesPolicy));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 销售政策表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入salesPolicy")
+	public R<IPage<SalesPolicy>> page(SalesPolicy salesPolicy, Query query) {
+		salesPolicy.setTenantId(SecureUtil.getTenantId());
+		salesPolicy.setIsDeleted(0);
+		IPage<SalesPolicy> pages = salesPolicyService.selectSalesPolicyPage(Condition.getPage(query), salesPolicy);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 销售政策表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入salesPolicy")
+	public R save(@Valid @RequestBody SalesPolicy salesPolicy) {
+		return R.status(salesPolicyService.save(salesPolicy));
+	}
+
+	/**
+	 * 修改 销售政策表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入salesPolicy")
+	public R update(@Valid @RequestBody SalesPolicy salesPolicy) {
+		if (salesPolicy.getId() == null){
+			return R.data(500,"请选择要删除的数据","error");
+		}
+		salesPolicy.setIsDeleted(1);
+		return R.status(salesPolicyService.updateById(salesPolicy));
+	}
+
+	/**
+	 * 新增或修改 销售政策表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入salesPolicy")
+	public R submit(@Valid @RequestBody SalesPolicy salesPolicy) {
+		return salesPolicyService.saveSalesPolicy(salesPolicy);
+	}
+
+
+	/**
+	 * 删除 销售政策表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(salesPolicyService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 130 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/controller/SalesPolicyItemController.java

@@ -0,0 +1,130 @@
+/*
+ *      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 org.springblade.mocha.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 org.springblade.mocha.entity.SalesPolicyItem;
+import org.springblade.mocha.vo.SalesPolicyItemVO;
+import org.springblade.mocha.service.ISalesPolicyItemService;
+import org.springblade.core.boot.ctrl.BladeController;
+
+/**
+ * 销售政策明细表 控制器
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@RestController
+@AllArgsConstructor
+@RequestMapping("/salespolicyitem")
+@Api(value = "销售政策明细表", tags = "销售政策明细表接口")
+public class SalesPolicyItemController extends BladeController {
+
+	private final ISalesPolicyItemService salesPolicyItemService;
+
+	/**
+	 * 详情
+	 */
+	@GetMapping("/detail")
+	@ApiOperationSupport(order = 1)
+	@ApiOperation(value = "详情", notes = "传入salesPolicyItem")
+	public R<SalesPolicyItem> detail(SalesPolicyItem salesPolicyItem) {
+		SalesPolicyItem detail = salesPolicyItemService.getOne(Condition.getQueryWrapper(salesPolicyItem));
+		return R.data(detail);
+	}
+
+	/**
+	 * 分页 销售政策明细表
+	 */
+	@GetMapping("/list")
+	@ApiOperationSupport(order = 2)
+	@ApiOperation(value = "分页", notes = "传入salesPolicyItem")
+	public R<IPage<SalesPolicyItem>> list(SalesPolicyItem salesPolicyItem, Query query) {
+		IPage<SalesPolicyItem> pages = salesPolicyItemService.page(Condition.getPage(query), Condition.getQueryWrapper(salesPolicyItem));
+		return R.data(pages);
+	}
+
+	/**
+	 * 自定义分页 销售政策明细表
+	 */
+	@GetMapping("/page")
+	@ApiOperationSupport(order = 3)
+	@ApiOperation(value = "分页", notes = "传入salesPolicyItem")
+	public R<IPage<SalesPolicyItemVO>> page(SalesPolicyItemVO salesPolicyItem, Query query) {
+		IPage<SalesPolicyItemVO> pages = salesPolicyItemService.selectSalesPolicyItemPage(Condition.getPage(query), salesPolicyItem);
+		return R.data(pages);
+	}
+
+	/**
+	 * 新增 销售政策明细表
+	 */
+	@PostMapping("/save")
+	@ApiOperationSupport(order = 4)
+	@ApiOperation(value = "新增", notes = "传入salesPolicyItem")
+	public R save(@Valid @RequestBody SalesPolicyItem salesPolicyItem) {
+		return R.status(salesPolicyItemService.save(salesPolicyItem));
+	}
+
+	/**
+	 * 修改 销售政策明细表
+	 */
+	@PostMapping("/update")
+	@ApiOperationSupport(order = 5)
+	@ApiOperation(value = "修改", notes = "传入salesPolicyItem")
+	public R update(@Valid @RequestBody SalesPolicyItem salesPolicyItem) {
+		if (salesPolicyItem.getId() == null){
+			return R.data(500,"请选择要删除的数据","error");
+		}
+		salesPolicyItem.setIsDeleted(1);
+		return R.status(salesPolicyItemService.updateById(salesPolicyItem));
+	}
+
+	/**
+	 * 新增或修改 销售政策明细表
+	 */
+	@PostMapping("/submit")
+	@ApiOperationSupport(order = 6)
+	@ApiOperation(value = "新增或修改", notes = "传入salesPolicyItem")
+	public R submit(@Valid @RequestBody SalesPolicyItem salesPolicyItem) {
+		return R.status(salesPolicyItemService.saveOrUpdate(salesPolicyItem));
+	}
+
+
+	/**
+	 * 删除 销售政策明细表
+	 */
+	@PostMapping("/remove")
+	@ApiOperationSupport(order = 8)
+	@ApiOperation(value = "删除", notes = "传入ids")
+	public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) {
+		return R.status(salesPolicyItemService.removeByIds(Func.toLongList(ids)));
+	}
+
+
+}

+ 149 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/Price.java

@@ -0,0 +1,149 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 价格管理表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_price")
+@ApiModel(value = "Price对象", description = "价格管理表")
+public class Price implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 大字
+	*/
+		@ApiModelProperty(value = "大字")
+		private String bigCharacter;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 花纹
+	*/
+		@ApiModelProperty(value = "花纹")
+		private String brandItem;
+	/**
+	* 规格
+	*/
+		@ApiModelProperty(value = "规格")
+		private String typeno;
+	/**
+	* 产品类别
+	*/
+		@ApiModelProperty(value = "产品类别")
+		private String category;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 备注
+	*/
+		@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是)")
+		private Integer isDeleted;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	 * 创建人中文名
+	 */
+		@ApiModelProperty(value = "创建人中文名")
+		@TableField(exist = false)
+		private String createUserName;
+	/**
+	 * 修改人中文名
+	 */
+		@ApiModelProperty(value = "修改人中文名")
+		@TableField(exist = false)
+		private String updateUserName;
+
+	/**
+	 * 销售政策明细信息
+	 */
+		@ApiModelProperty(value = "销售政策明细信息")
+		@TableField(exist = false)
+		private List<PriceItem> priceItemList;
+
+
+}

+ 154 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/PriceItem.java

@@ -0,0 +1,154 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import java.math.BigDecimal;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 价格管理明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_price_item")
+@ApiModel(value = "PriceItem对象", description = "价格管理明细表")
+public class PriceItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 编码
+	*/
+		@ApiModelProperty(value = "编码")
+		private String code;
+	/**
+	* 大字
+	*/
+		@ApiModelProperty(value = "大字")
+		private String bigCharacter;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 花纹
+	*/
+		@ApiModelProperty(value = "花纹")
+		private String brandItem;
+	/**
+	* 规格
+	*/
+		@ApiModelProperty(value = "规格")
+		private String typeno;
+	/**
+	* 产品类别
+	*/
+		@ApiModelProperty(value = "产品类别")
+		private String category;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 供应商编码
+	*/
+		@ApiModelProperty(value = "供应商编码")
+		private String corpCode;
+	/**
+	* 采购价
+	*/
+		@ApiModelProperty(value = "采购价")
+		private BigDecimal purchasePrice;
+	/**
+	* 销售价
+	*/
+		@ApiModelProperty(value = "销售价")
+		private BigDecimal salesPrice;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 版本
+	*/
+		@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是)")
+		private Integer isDeleted;
+
+
+}

+ 159 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/SalesPolicy.java

@@ -0,0 +1,159 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+import java.util.List;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 销售政策表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_sales_policy")
+@ApiModel(value = "SalesPolicy对象", description = "销售政策表")
+public class SalesPolicy implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 编码
+	*/
+		@ApiModelProperty(value = "编码")
+		private String code;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 政策名称
+	*/
+		@ApiModelProperty(value = "政策名称")
+		private String cname;
+	/**
+	* 有效期开始时间
+	*/
+		@ApiModelProperty(value = "有效期开始时间")
+		private Date startTime;
+	/**
+	* 有效期结束时间
+	*/
+		@ApiModelProperty(value = "有效期结束时间")
+		private Date endTime;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 版本
+	*/
+		@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是)")
+		private Integer isDeleted;
+	/**
+	 * 代理商
+	 */
+		@ApiModelProperty(value = "代理商")
+		private String corps;
+	/**
+	 * 创建人中文名
+	 */
+	@ApiModelProperty(value = "创建人中文名")
+	@TableField(exist = false)
+		private String createUserName;
+	/**
+	 * 修改人中文名
+	 */
+	@ApiModelProperty(value = "修改人中文名")
+	@TableField(exist = false)
+		private String updateUserName;
+	/**
+	 * 特价销售政策明细信息
+	 */
+	@ApiModelProperty(value = "特价销售政策明细信息")
+	@TableField(exist = false)
+	private List<SalesPolicyItem> specialItemList;
+	/**
+	 * 买赠销售政策明细信息
+	 */
+	@ApiModelProperty(value = "买赠政策明细信息")
+	@TableField(exist = false)
+	private List<SalesPolicyItem> presentItemList;
+
+
+}

+ 168 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/entity/SalesPolicyItem.java

@@ -0,0 +1,168 @@
+/*
+ *      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 org.springblade.mocha.entity;
+
+import java.math.BigDecimal;
+
+import com.baomidou.mybatisplus.annotation.TableField;
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.io.Serializable;
+import java.util.Date;
+
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 销售政策明细表实体类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Data
+@TableName("basic_sales_policy_item")
+@ApiModel(value = "SalesPolicyItem对象", description = "销售政策明细表")
+public class SalesPolicyItem implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 主键
+	*/
+		@ApiModelProperty(value = "主键")
+		private Long id;
+	/**
+	* 主表id
+	*/
+		@ApiModelProperty(value = "主表id")
+		private Long pid;
+	/**
+	* 编码
+	*/
+		@ApiModelProperty(value = "编码")
+		private String code;
+	/**
+	* 品牌
+	*/
+		@ApiModelProperty(value = "品牌")
+		private String brand;
+	/**
+	* 产品分类
+	*/
+		@ApiModelProperty(value = "产品分类")
+		private String productCategory;
+	/**
+	* 规格
+	*/
+		@ApiModelProperty(value = "规格")
+		private String typeno;
+	/**
+	* 采购价
+	*/
+		@ApiModelProperty(value = "采购价")
+		private BigDecimal purchasePrice;
+	/**
+	* 销售价
+	*/
+		@ApiModelProperty(value = "销售价")
+		private BigDecimal salesPrice;
+	/**
+	* 特价
+	*/
+		@ApiModelProperty(value = "特价")
+		private BigDecimal specialOffer;
+	/**
+	* 采购数量
+	*/
+		@ApiModelProperty(value = "采购数量")
+		private BigDecimal purchaseAmount;
+	/**
+	* 赠送数量
+	*/
+		@ApiModelProperty(value = "赠送数量")
+		private BigDecimal salesVolume;
+	/**
+	* 备注
+	*/
+		@ApiModelProperty(value = "备注")
+		private String remarks;
+	/**
+	 * 租户id
+	 */
+		@ApiModelProperty(value = "租户id")
+		private String tenantId;
+	/**
+	* 版本
+	*/
+		@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是)")
+		private Integer isDeleted;
+	/**
+	 * 创建人中文名
+	 */
+	@ApiModelProperty(value = "创建人中文名")
+	@TableField(exist = false)
+		private String createUserName;
+	/**
+	 * 修改人中文名
+	 */
+	@ApiModelProperty(value = "修改人中文名")
+	@TableField(exist = false)
+		private String updateUserName;
+	/**
+	 * 销售政策类别 1特价促销 2买赠促销
+	 */
+	@ApiModelProperty(value = "销售政策类别 1特价促销 2买赠促销")
+	private String salesType;
+
+
+}

+ 42 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceItemMapper.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 org.springblade.mocha.mapper;
+
+import org.springblade.mocha.entity.PriceItem;
+import org.springblade.mocha.vo.PriceItemVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 价格管理明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface PriceItemMapper extends BaseMapper<PriceItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param priceItem
+	 * @return
+	 */
+	List<PriceItemVO> selectPriceItemPage(IPage page, PriceItemVO priceItem);
+
+}

+ 35 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceItemMapper.xml

@@ -0,0 +1,35 @@
+<?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="org.springblade.mocha.mapper.PriceItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="priceItemResultMap" type="org.springblade.mocha.entity.PriceItem">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="code" property="code"/>
+        <result column="big_character" property="bigCharacter"/>
+        <result column="brand" property="brand"/>
+        <result column="brand_item" property="brandItem"/>
+        <result column="typeno" property="typeno"/>
+        <result column="category" property="category"/>
+        <result column="product_category" property="productCategory"/>
+        <result column="corp_code" property="corpCode"/>
+        <result column="purchase_price" property="purchasePrice"/>
+        <result column="sales_price" property="salesPrice"/>
+        <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="selectPriceItemPage" resultMap="priceItemResultMap">
+        select * from basic_price_item where is_deleted = 0
+    </select>
+
+</mapper>

+ 43 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      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 org.springblade.mocha.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.mocha.entity.Price;
+import org.springblade.mocha.vo.PriceVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 价格管理表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface PriceMapper extends BaseMapper<Price> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param price
+	 * @return
+	 */
+	List<Price> selectPricePage(IPage page, @Param("Price") Price price);
+
+}

+ 69 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/PriceMapper.xml

@@ -0,0 +1,69 @@
+<?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="org.springblade.mocha.mapper.PriceMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="priceResultMap" type="org.springblade.mocha.entity.Price">
+        <id column="id" property="id"/>
+        <result column="big_character" property="bigCharacter"/>
+        <result column="brand" property="brand"/>
+        <result column="brand_item" property="brandItem"/>
+        <result column="typeno" property="typeno"/>
+        <result column="category" property="category"/>
+        <result column="product_category" property="productCategory"/>
+        <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="selectPricePage" resultMap="priceResultMap">
+        select * from basic_price where is_deleted = 0
+        <if test="Price.id!=null">
+            and id = #{Price.id}
+        </if>
+        <if test="Price.bigCharacter!=null and Price.bigCharacter != ''">
+            and big_character like CONCAT(CONCAT('%', #{Price.bigCharacter}), '%')
+        </if>
+        <if test="Price.brand!=null and Price.brand != ''">
+            and brand like CONCAT(CONCAT('%', #{Price.brand}), '%')
+        </if>
+        <if test="Price.brandItem!=null and Price.brandItem != ''">
+            and brand_item like CONCAT(CONCAT('%', #{Price.brandItem}), '%')
+        </if>
+        <if test="Price.typeno!=null and Price.typeno != ''">
+            and typeno like CONCAT(CONCAT('%', #{Price.typeno}), '%')
+        </if>
+        <if test="Price.category!=null and Price.category != ''">
+            and category like CONCAT(CONCAT('%', #{Price.category}), '%')
+        </if>
+        <if test="Price.productCategory!=null and Price.productCategory != ''">
+            and product_category = #{Price.productCategory}
+        </if>
+        <if test="Price.remarks!=null and Price.remarks != ''">
+            and remarks = #{Price.remarks}
+        </if>
+        <if test="Price.version!=null and Price.version != ''">
+            and version = #{Price.version}
+        </if>
+        <if test="Price.tenantId!=null and Price.tenantId != ''">
+            and tenant_id = #{Price.tenantId}
+        </if>
+        <if test="Price.createUser!=null">
+            and create_user = #{Price.createUser}
+        </if>
+        <if test="Price.updateUser!=null">
+            and update_user = #{Price.updateUser}
+        </if>
+        <if test="Price.status!=null">
+            and status = #{Price.status}
+        </if>
+    </select>
+
+</mapper>

+ 42 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyItemMapper.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 org.springblade.mocha.mapper;
+
+import org.springblade.mocha.entity.SalesPolicyItem;
+import org.springblade.mocha.vo.SalesPolicyItemVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 销售政策明细表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface SalesPolicyItemMapper extends BaseMapper<SalesPolicyItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param salesPolicyItem
+	 * @return
+	 */
+	List<SalesPolicyItemVO> selectSalesPolicyItemPage(IPage page, SalesPolicyItemVO salesPolicyItem);
+
+}

+ 34 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyItemMapper.xml

@@ -0,0 +1,34 @@
+<?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="org.springblade.mocha.mapper.SalesPolicyItemMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="salesPolicyItemResultMap" type="org.springblade.mocha.entity.SalesPolicyItem">
+        <id column="id" property="id"/>
+        <result column="pid" property="pid"/>
+        <result column="code" property="code"/>
+        <result column="brand" property="brand"/>
+        <result column="product_category" property="productCategory"/>
+        <result column="typeno" property="typeno"/>
+        <result column="purchase_price" property="purchasePrice"/>
+        <result column="sales_price" property="salesPrice"/>
+        <result column="special_offer" property="specialOffer"/>
+        <result column="purchase_amount" property="purchaseAmount"/>
+        <result column="sales_volume" property="salesVolume"/>
+        <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="selectSalesPolicyItemPage" resultMap="salesPolicyItemResultMap">
+        select * from basic_sales_policy_item where is_deleted = 0
+    </select>
+
+</mapper>

+ 43 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyMapper.java

@@ -0,0 +1,43 @@
+/*
+ *      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 org.springblade.mocha.mapper;
+
+import org.apache.ibatis.annotations.Param;
+import org.springblade.mocha.entity.SalesPolicy;
+import org.springblade.mocha.vo.SalesPolicyVO;
+import com.baomidou.mybatisplus.core.mapper.BaseMapper;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+import java.util.List;
+
+/**
+ * 销售政策表 Mapper 接口
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface SalesPolicyMapper extends BaseMapper<SalesPolicy> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param salesPolicy
+	 * @return
+	 */
+	List<SalesPolicy> selectSalesPolicyPage(IPage page, @Param("SalesPolicy") SalesPolicy salesPolicy);
+
+}

+ 63 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/mapper/SalesPolicyMapper.xml

@@ -0,0 +1,63 @@
+<?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="org.springblade.mocha.mapper.SalesPolicyMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="salesPolicyResultMap" type="org.springblade.mocha.entity.SalesPolicy">
+        <id column="id" property="id"/>
+        <result column="code" property="code"/>
+        <result column="brand" property="brand"/>
+        <result column="product_category" property="productCategory"/>
+        <result column="cname" property="cname"/>
+        <result column="start_time" property="startTime"/>
+        <result column="end_time" property="endTime"/>
+        <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="selectSalesPolicyPage" resultMap="salesPolicyResultMap">
+        select * from basic_sales_policy where is_deleted = 0
+        <if test="SalesPolicy.id!=null">
+            and id = #{SalesPolicy.id}
+        </if>
+        <if test="SalesPolicy.code!=null and SalesPolicy.code != ''">
+            and code like CONCAT(CONCAT('%', #{SalesPolicy.code}), '%')
+        </if>
+        <if test="SalesPolicy.brand!=null and SalesPolicy.brand != ''">
+            and brand like CONCAT(CONCAT('%', #{SalesPolicy.brand}), '%')
+        </if>
+        <if test="SalesPolicy.productCategory!=null and SalesPolicy.productCategory != ''">
+            and product_category like CONCAT(CONCAT('%', #{SalesPolicy.productCategory}), '%')
+        </if>
+        <if test="SalesPolicy.cname!=null and SalesPolicy.cname != ''">
+            and cname like CONCAT(CONCAT('%', #{SalesPolicy.cname}), '%')
+        </if>
+        <if test="SalesPolicy.remarks!=null and SalesPolicy.remarks != ''">
+            and remarks like CONCAT(CONCAT('%', #{SalesPolicy.remarks}), '%')
+        </if>
+        <if test="SalesPolicy.version!=null and SalesPolicy.version != ''">
+            and version like CONCAT(CONCAT('%', #{SalesPolicy.version}), '%')
+        </if>
+        <if test="SalesPolicy.tenantId!=null and SalesPolicy.tenantId != ''">
+            and tenant_id like CONCAT(CONCAT('%', #{SalesPolicy.tenantId}), '%')
+        </if>
+        <if test="SalesPolicy.createUser!=null">
+            and create_user = #{SalesPolicy.createUser}
+        </if>
+        <if test="SalesPolicy.updateUser!=null">
+            and update_user = #{SalesPolicy.updateUser}
+        </if>
+        <if test="SalesPolicy.status!=null">
+            and status = #{SalesPolicy.status}
+        </if>
+    </select>
+
+</mapper>

+ 41 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/IPriceItemService.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 org.springblade.mocha.service;
+
+import org.springblade.mocha.entity.PriceItem;
+import org.springblade.mocha.vo.PriceItemVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 价格管理明细表 服务类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface IPriceItemService extends IService<PriceItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param priceItem
+	 * @return
+	 */
+	IPage<PriceItemVO> selectPriceItemPage(IPage<PriceItemVO> page, PriceItemVO priceItem);
+
+}

+ 56 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/IPriceService.java

@@ -0,0 +1,56 @@
+/*
+ *      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 org.springblade.mocha.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.mocha.entity.Price;
+import org.springblade.mocha.vo.PriceVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 价格管理表 服务类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface IPriceService extends IService<Price> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param price
+	 * @return
+	 */
+	IPage<Price> selectPricePage(IPage<Price> page, Price price);
+
+	/**
+	 * 保存价格信息
+	 * @param price
+	 * @return
+	 */
+	R savePrice (Price price);
+
+	/**
+	 * 获取价格详情
+	 * @param price
+	 * @return
+	 */
+	Price getPriceMessage(Price price);
+
+}

+ 41 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/ISalesPolicyItemService.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 org.springblade.mocha.service;
+
+import org.springblade.mocha.entity.SalesPolicyItem;
+import org.springblade.mocha.vo.SalesPolicyItemVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 销售政策明细表 服务类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface ISalesPolicyItemService extends IService<SalesPolicyItem> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param salesPolicyItem
+	 * @return
+	 */
+	IPage<SalesPolicyItemVO> selectSalesPolicyItemPage(IPage<SalesPolicyItemVO> page, SalesPolicyItemVO salesPolicyItem);
+
+}

+ 56 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/ISalesPolicyService.java

@@ -0,0 +1,56 @@
+/*
+ *      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 org.springblade.mocha.service;
+
+import org.springblade.core.tool.api.R;
+import org.springblade.mocha.entity.SalesPolicy;
+import org.springblade.mocha.vo.SalesPolicyVO;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 销售政策表 服务类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+public interface ISalesPolicyService extends IService<SalesPolicy> {
+
+	/**
+	 * 自定义分页
+	 *
+	 * @param page
+	 * @param salesPolicy
+	 * @return
+	 */
+	IPage<SalesPolicy> selectSalesPolicyPage(IPage<SalesPolicy> page, SalesPolicy salesPolicy);
+
+	/**
+	 * 保存销售政策信息
+	 * @param salesPolicy
+	 * @return
+	 */
+	R saveSalesPolicy(SalesPolicy salesPolicy);
+
+	/**
+	 * 获取销售政策详情
+	 * @param salesPolicy
+	 * @return
+	 */
+	SalesPolicy getSalesPolicy(SalesPolicy salesPolicy);
+
+}

+ 41 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/PriceItemServiceImpl.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 org.springblade.mocha.service.impl;
+
+import org.springblade.mocha.entity.PriceItem;
+import org.springblade.mocha.vo.PriceItemVO;
+import org.springblade.mocha.mapper.PriceItemMapper;
+import org.springblade.mocha.service.IPriceItemService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 价格管理明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Service
+public class PriceItemServiceImpl extends ServiceImpl<PriceItemMapper, PriceItem> implements IPriceItemService {
+
+	@Override
+	public IPage<PriceItemVO> selectPriceItemPage(IPage<PriceItemVO> page, PriceItemVO priceItem) {
+		return page.setRecords(baseMapper.selectPriceItemPage(page, priceItem));
+	}
+
+}

+ 104 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/PriceServiceImpl.java

@@ -0,0 +1,104 @@
+/*
+ *      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 org.springblade.mocha.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.mocha.entity.Price;
+import org.springblade.mocha.entity.PriceItem;
+import org.springblade.mocha.mapper.PriceItemMapper;
+import org.springblade.mocha.vo.PriceVO;
+import org.springblade.mocha.mapper.PriceMapper;
+import org.springblade.mocha.service.IPriceService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+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-10-14
+ */
+@Service
+@AllArgsConstructor
+public class PriceServiceImpl extends ServiceImpl<PriceMapper, Price> implements IPriceService {
+	private PriceItemMapper priceItemMapper;//价格管理明细表
+	private final IUserClient userClient;//用户
+	@Override
+	public IPage<Price> selectPricePage(IPage<Price> page, Price price) {
+		return page.setRecords(baseMapper.selectPricePage(page, price));
+	}
+
+	@Override
+	@Transactional
+	public R savePrice(Price price) {
+		price.setTenantId(SecureUtil.getTenantId());
+		if (price.getId() == null){
+			price.setCreateTime(new Date());
+			price.setCreateUser(SecureUtil.getUserId());
+			baseMapper.insert(price);
+		}else {
+			price.setUpdateTime(new Date());
+			price.setUpdateUser(SecureUtil.getUserId());
+			baseMapper.updateById(price);
+		}
+		if (CollectionUtils.isNotEmpty(price.getPriceItemList())){
+			price.getPriceItemList().stream().forEach(item ->{
+				item.setTenantId(SecureUtil.getTenantId());
+				item.setPid(price.getId());
+				if (item.getId() == null){
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					priceItemMapper.insert(item);
+				}else {
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					priceItemMapper.updateById(item);
+				}
+			});
+		}
+		return R.data(price);
+	}
+
+	@Override
+	public Price getPriceMessage(Price price) {
+		Price byId = baseMapper.selectById(price);
+		R<User> createUser = userClient.userInfoById(byId.getCreateUser());
+		if (createUser.isSuccess() && createUser.getData() != null){
+			byId.setCreateUserName(createUser.getData().getName());
+		}
+		R<User> updateUser = userClient.userInfoById(byId.getUpdateUser());
+		if (updateUser.isSuccess() && updateUser.getData() != null){
+			byId.setUpdateUserName(updateUser.getData().getName());
+		}
+		List<PriceItem> priceItems = priceItemMapper.selectList(new QueryWrapper<PriceItem>().eq("pid", price.getId())
+			.eq("tenant_id", SecureUtil.getTenantId()).eq("is_deleted", 0));
+		byId.setPriceItemList(priceItems);
+		return byId;
+	}
+
+}

+ 41 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/SalesPolicyItemServiceImpl.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 org.springblade.mocha.service.impl;
+
+import org.springblade.mocha.entity.SalesPolicyItem;
+import org.springblade.mocha.vo.SalesPolicyItemVO;
+import org.springblade.mocha.mapper.SalesPolicyItemMapper;
+import org.springblade.mocha.service.ISalesPolicyItemService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+/**
+ * 销售政策明细表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Service
+public class SalesPolicyItemServiceImpl extends ServiceImpl<SalesPolicyItemMapper, SalesPolicyItem> implements ISalesPolicyItemService {
+
+	@Override
+	public IPage<SalesPolicyItemVO> selectSalesPolicyItemPage(IPage<SalesPolicyItemVO> page, SalesPolicyItemVO salesPolicyItem) {
+		return page.setRecords(baseMapper.selectSalesPolicyItemPage(page, salesPolicyItem));
+	}
+
+}

+ 158 - 0
blade-service/blade-mocha-item/src/main/java/org/springblade/mocha/service/impl/SalesPolicyServiceImpl.java

@@ -0,0 +1,158 @@
+/*
+ *      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 org.springblade.mocha.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
+import com.baomidou.mybatisplus.core.toolkit.StringUtils;
+import lombok.AllArgsConstructor;
+import org.springblade.core.secure.utils.SecureUtil;
+import org.springblade.core.tool.api.R;
+import org.springblade.mocha.entity.SalesPolicy;
+import org.springblade.mocha.entity.SalesPolicyItem;
+import org.springblade.mocha.mapper.SalesPolicyItemMapper;
+import org.springblade.mocha.vo.SalesPolicyVO;
+import org.springblade.mocha.mapper.SalesPolicyMapper;
+import org.springblade.mocha.service.ISalesPolicyService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import org.springblade.system.user.entity.User;
+import org.springblade.system.user.feign.IUserClient;
+import org.springframework.stereotype.Service;
+import com.baomidou.mybatisplus.core.metadata.IPage;
+
+import java.util.Date;
+import java.util.List;
+
+/**
+ * 销售政策表 服务实现类
+ *
+ * @author BladeX
+ * @since 2021-10-14
+ */
+@Service
+@AllArgsConstructor
+public class SalesPolicyServiceImpl extends ServiceImpl<SalesPolicyMapper, SalesPolicy> implements ISalesPolicyService {
+	private SalesPolicyItemMapper salesPolicyItemMapper;//销售政策明细表
+	private final IUserClient userClient;//用户
+	@Override
+	public IPage<SalesPolicy> selectSalesPolicyPage(IPage<SalesPolicy> page, SalesPolicy salesPolicy) {
+		return page.setRecords(baseMapper.selectSalesPolicyPage(page, salesPolicy));
+	}
+
+	@Override
+	public R saveSalesPolicy(SalesPolicy salesPolicy) {
+		if (salesPolicy.getId() == null){
+			salesPolicy.setTenantId(SecureUtil.getTenantId());
+			salesPolicy.setCreateTime(new Date());
+			salesPolicy.setCreateUser(SecureUtil.getUserId());
+			baseMapper.insert(salesPolicy);
+		}else {
+			salesPolicy.setTenantId(SecureUtil.getTenantId());
+			salesPolicy.setUpdateTime(new Date());
+			salesPolicy.setUpdateUser(SecureUtil.getUserId());
+			baseMapper.updateById(salesPolicy);
+		}
+		if (CollectionUtils.isNotEmpty(salesPolicy.getSpecialItemList())){
+			salesPolicy.getSpecialItemList().stream().forEach(item ->{
+				item.setPid(salesPolicy.getId());
+				item.setTenantId(SecureUtil.getTenantId());
+				if (item.getId() == null){
+					item.setSalesType("1");
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					salesPolicyItemMapper.insert(item);
+				}else {
+					item.setSalesType("1");
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					salesPolicyItemMapper.updateById(item);
+				}
+			});
+		}
+		if (CollectionUtils.isNotEmpty(salesPolicy.getPresentItemList())){
+			salesPolicy.getPresentItemList().stream().forEach(item ->{
+				item.setPid(salesPolicy.getId());
+				item.setTenantId(SecureUtil.getTenantId());
+				if (item.getId() == null){
+					item.setSalesType("2");
+					item.setCreateTime(new Date());
+					item.setCreateUser(SecureUtil.getUserId());
+					salesPolicyItemMapper.insert(item);
+				}else {
+					item.setSalesType("2");
+					item.setUpdateTime(new Date());
+					item.setUpdateUser(SecureUtil.getUserId());
+					salesPolicyItemMapper.updateById(item);
+				}
+			});
+		}
+		return R.data(salesPolicy);
+	}
+
+	@Override
+	public SalesPolicy getSalesPolicy(SalesPolicy salesPolicy) {
+		SalesPolicy policy = baseMapper.selectById(salesPolicy);
+		String createUserName = this.getUserName(policy.getCreateUser());
+		if (StringUtils.isNotBlank(createUserName)){
+			policy.setCreateUserName(createUserName);
+		}
+		String updateUserName = this.getUserName(policy.getUpdateUser());
+		if (StringUtils.isNotBlank(updateUserName)){
+			policy.setUpdateUserName(updateUserName);
+		}
+		List<SalesPolicyItem> specialItemList = salesPolicyItemMapper.selectList(new QueryWrapper<SalesPolicyItem>().eq("pid", salesPolicy.getId())
+			.eq("tenant_id", SecureUtil.getTenantId()).eq("is_deleted", 0).eq("sales_type",1));
+		if (CollectionUtils.isNotEmpty(specialItemList)){
+			specialItemList.stream().forEach(item ->{
+				String createName = this.getUserName(item.getCreateUser());
+				if (StringUtils.isNotBlank(createName)){
+					item.setCreateUserName(createName);
+				}
+				String updateName = this.getUserName(item.getUpdateUser());
+				if (StringUtils.isNotBlank(updateName)){
+					item.setUpdateUserName(updateName);
+				}
+			});
+			policy.setSpecialItemList(specialItemList);
+		}
+		List<SalesPolicyItem> presentItemList = salesPolicyItemMapper.selectList(new QueryWrapper<SalesPolicyItem>().eq("pid", salesPolicy.getId())
+			.eq("tenant_id", SecureUtil.getTenantId()).eq("is_deleted", 0).eq("sales_type",2));
+		if (CollectionUtils.isNotEmpty(presentItemList)){
+			presentItemList.stream().forEach(item ->{
+				String createName = this.getUserName(item.getCreateUser());
+				if (StringUtils.isNotBlank(createName)){
+					item.setCreateUserName(createName);
+				}
+				String updateName = this.getUserName(item.getUpdateUser());
+				if (StringUtils.isNotBlank(updateName)){
+					item.setUpdateUserName(updateName);
+				}
+			});
+			policy.setPresentItemList(presentItemList);
+		}
+		return policy;
+	}
+	private String getUserName(Long user){
+		String userName = null;
+		R<User> create = userClient.userInfoById(user);
+		if (create.isSuccess() && create.getData() != null){
+			userName = create.getData().getName();
+		}
+		return userName;
+	}
+
+}

+ 21 - 0
blade-service/blade-mocha-item/src/main/resources/application-dev.yml

@@ -0,0 +1,21 @@
+#服务器端口
+server:
+  port: 10003
+  profile: D:/ruoyi/uploadPath
+
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.dev.url}
+    username: ${blade.datasource.dev.username}
+    password: ${blade.datasource.dev.password}
+#默认对象存储配置
+oss:
+  enabled: true
+  name: minio
+  tenant-mode: true
+  endpoint: http://127.0.0.1:9000
+  access-key: minioadmin
+  secret-key: minioadmin
+  bucket-name: bladex
+

+ 10 - 0
blade-service/blade-mocha-item/src/main/resources/application-prod.yml

@@ -0,0 +1,10 @@
+#服务器端口
+server:
+  port: 8105
+
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.prod.url}
+    username: ${blade.datasource.prod.username}
+    password: ${blade.datasource.prod.password}

+ 10 - 0
blade-service/blade-mocha-item/src/main/resources/application-test.yml

@@ -0,0 +1,10 @@
+#服务器端口
+server:
+  port: 8105
+
+#数据源配置
+spring:
+  datasource:
+    url: ${blade.datasource.test.url}
+    username: ${blade.datasource.test.username}
+    password: ${blade.datasource.test.password}

+ 3 - 2
blade-service/blade-purchase-sales/pom.xml

@@ -9,6 +9,7 @@
     </parent>
     <modelVersion>4.0.0</modelVersion>
 
+
     <artifactId>blade-purchase-sales</artifactId>
     <name>${project.artifactId}</name>
     <version>${bladex.project.version}</version>
@@ -29,13 +30,13 @@
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-client-api</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
         <dependency>
             <groupId>org.springblade</groupId>
             <artifactId>blade-user-api</artifactId>
-            <version>2.8.2.RELEASE</version>
+            <version>${bladex.project.version}</version>
             <scope>compile</scope>
         </dependency>
     </dependencies>

+ 4 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/PurchaseSalesApplication.java

@@ -26,6 +26,10 @@ import org.springframework.cloud.client.SpringCloudApplication;
  *
  * @author Chill
  */
+
+/**
+ * 销售订单模块
+ */
 @EnableBladeFeign
 @SpringCloudApplication
 // @SeataCloudApplication

+ 7 - 2
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/entity/OrderItems.java

@@ -57,11 +57,16 @@ public class OrderItems implements Serializable {
 		@ApiModelProperty(value = "排序")
 		private Integer sort;
 	/**
-	* 价格类别(销售政策 秒杀)
+	* 类别(销售政策 秒杀)
 	*/
-		@ApiModelProperty(value = "价格类别(销售政策 秒杀)")
+		@ApiModelProperty(value = "类别(销售政策 秒杀)")
 		private String priceCategory;
 	/**
+	 * 价格类别
+	 */
+	@ApiModelProperty(value = "价格类别")
+	private String priceType;
+	/**
 	* 货物id
 	*/
 		@ApiModelProperty(value = "货物id")

+ 2 - 1
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.java

@@ -16,6 +16,7 @@
  */
 package org.springblade.purchase.sales.mapper;
 
+import org.apache.ibatis.annotations.Param;
 import org.springblade.purchase.sales.entity.Order;
 import org.springblade.purchase.sales.vo.OrderVO;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
@@ -37,6 +38,6 @@ public interface OrderMapper extends BaseMapper<Order> {
 	 * @param order
 	 * @return
 	 */
-	List<OrderVO> selectOrderPage(IPage page, OrderVO order);
+	List<OrderVO> selectOrderPage(IPage page, @Param("Order") OrderVO order);
 
 }

+ 202 - 0
blade-service/blade-purchase-sales/src/main/java/org/springblade/purchase/sales/mapper/OrderMapper.xml

@@ -77,6 +77,208 @@
 
     <select id="selectOrderPage" resultMap="orderResultMap">
         select * from business_order where is_deleted = 0
+        <if test="Order.id!=null">
+            and id = #{Order.id}
+        </if>
+        <if test="Order.sysNo!=null and Order.sysNo != ''">
+            and sys_no = #{Order.sysNo}
+        </if>
+        <if test="Order.orderNo!=null and Order.orderNo != ''">
+            and order_no = #{Order.orderNo}
+        </if>
+        <if test="Order.morderNo!=null and Order.morderNo != ''">
+            and morder_no = #{Order.morderNo}
+        </if>
+        <if test="Order.orgOrderNo!=null and Order.orgOrderNo != ''">
+            and org_order_no = #{Order.orgOrderNo}
+        </if>
+        <if test="Order.srcOrderNo!=null and Order.srcOrderNo != ''">
+            and src_order_no = #{Order.srcOrderNo}
+        </if>
+        <if test="Order.srcId!=null">
+            and src_id = #{Order.srcId}
+        </if>
+        <if test="Order.billType!=null and Order.billType != ''">
+            and bill_type = #{Order.billType}
+        </if>
+        <if test="Order.orderType!=null and Order.orderType != ''">
+            and order_type = #{Order.orderType}
+        </if>
+        <if test="Order.businesDate!=null">
+            and busines_date = #{Order.businesDate}
+        </if>
+        <if test="Order.corpId!=null">
+            and corp_id = #{Order.corpId}
+        </if>
+        <if test="Order.purchaserId!=null">
+            and purchaser_id = #{Order.purchaserId}
+        </if>
+        <if test="Order.storageId!=null">
+            and storage_id = #{Order.storageId}
+        </if>
+        <if test="Order.shippingAddress!=null and Order.shippingAddress != ''">
+            and shipping_address = #{Order.shippingAddress}
+        </if>
+        <if test="Order.arrivalAddress!=null and Order.arrivalAddress != ''">
+            and arrival_address = #{Order.arrivalAddress}
+        </if>
+        <if test="Order.packageRemarks!=null and Order.packageRemarks != ''">
+            and package_remarks = #{Order.packageRemarks}
+        </if>
+        <if test="Order.freightRemarks!=null and Order.freightRemarks != ''">
+            and freight_remarks = #{Order.freightRemarks}
+        </if>
+        <if test="Order.banks!=null and Order.banks != ''">
+            and banks = #{Order.banks}
+        </if>
+        <if test="Order.banksAccountName!=null and Order.banksAccountName != ''">
+            and banks_account_name = #{Order.banksAccountName}
+        </if>
+        <if test="Order.requiredDeliveryDate!=null">
+            and required_delivery_date = #{Order.requiredDeliveryDate}
+        </if>
+        <if test="Order.requiredArrivalDate!=null">
+            and required_arrival_date = #{Order.requiredArrivalDate}
+        </if>
+        <if test="Order.orderRemark!=null and Order.orderRemark != ''">
+            and order_remark = #{Order.orderRemark}
+        </if>
+        <if test="Order.orderAmount!=null">
+            and order_amount = #{Order.orderAmount}
+        </if>
+        <if test="Order.otherAmount!=null">
+            and other_amount = #{Order.otherAmount}
+        </if>
+        <if test="Order.debitAmount!=null">
+            and debit_amount = #{Order.debitAmount}
+        </if>
+        <if test="Order.balanceAmount!=null">
+            and balance_amount = #{Order.balanceAmount}
+        </if>
+        <if test="Order.paymentType!=null and Order.paymentType != ''">
+            and payment_type = #{Order.paymentType}
+        </if>
+        <if test="Order.creditDate!=null">
+            and credit_date = #{Order.creditDate}
+        </if>
+        <if test="Order.advancePayment!=null">
+            and advance_payment = #{Order.advancePayment}
+        </if>
+        <if test="Order.overPayment!=null">
+            and over_payment = #{Order.overPayment}
+        </if>
+        <if test="Order.deposit!=null">
+            and deposit = #{Order.deposit}
+        </if>
+        <if test="Order.overDueAccounts!=null">
+            and over_due_accounts = #{Order.overDueAccounts}
+        </if>
+        <if test="Order.advanceCollectionDate!=null">
+            and advance_collection_date = #{Order.advanceCollectionDate}
+        </if>
+        <if test="Order.accountsCollectionDate!=null">
+            and accounts_collection_date = #{Order.accountsCollectionDate}
+        </if>
+        <if test="Order.grossProfitRate!=null">
+            and gross_profit_rate = #{Order.grossProfitRate}
+        </if>
+        <if test="Order.grossProfit!=null">
+            and gross_profit = #{Order.grossProfit}
+        </if>
+        <if test="Order.belongToCorpId!=null">
+            and belong_to_corp_id = #{Order.belongToCorpId}
+        </if>
+        <if test="Order.freightAmountHistory!=null">
+            and freight_amount_history = #{Order.freightAmountHistory}
+        </if>
+        <if test="Order.actualDeliveryDate!=null">
+            and actual_delivery_date = #{Order.actualDeliveryDate}
+        </if>
+        <if test="Order.arrivalDate!=null">
+            and arrival_date = #{Order.arrivalDate}
+        </if>
+        <if test="Order.procurementMethod!=null and Order.procurementMethod != ''">
+            and procurement_method = #{Order.procurementMethod}
+        </if>
+        <if test="Order.storageAmount!=null">
+            and storage_amount = #{Order.storageAmount}
+        </if>
+        <if test="Order.purchaseAmount!=null">
+            and purchase_amount = #{Order.purchaseAmount}
+        </if>
+        <if test="Order.storageQuantity!=null">
+            and storage_quantity = #{Order.storageQuantity}
+        </if>
+        <if test="Order.purchaseQuantity!=null">
+            and purchase_quantity = #{Order.purchaseQuantity}
+        </if>
+        <if test="Order.pointMutiple!=null">
+            and point_mutiple = #{Order.pointMutiple}
+        </if>
+        <if test="Order.specialRemarks!=null and Order.specialRemarks != ''">
+            and special_remarks = #{Order.specialRemarks}
+        </if>
+        <if test="Order.salesName!=null and Order.salesName != ''">
+            and sales_name = #{Order.salesName}
+        </if>
+        <if test="Order.commissionRate!=null and Order.commissionRate != ''">
+            and commission_rate = #{Order.commissionRate}
+        </if>
+        <if test="Order.salesPrice!=null">
+            and sales_price = #{Order.salesPrice}
+        </if>
+        <if test="Order.invoiceWeight!=null">
+            and invoice_weight = #{Order.invoiceWeight}
+        </if>
+        <if test="Order.billWeight!=null">
+            and bill_weight = #{Order.billWeight}
+        </if>
+        <if test="Order.currency!=null and Order.currency != ''">
+            and currency = #{Order.currency}
+        </if>
+        <if test="Order.exchangeRate!=null">
+            and exchange_rate = #{Order.exchangeRate}
+        </if>
+        <if test="Order.plannedDeliveryDate!=null">
+            and planned_delivery_date = #{Order.plannedDeliveryDate}
+        </if>
+        <if test="Order.proformInvoice!=null and Order.proformInvoice != ''">
+            and proform_invoice = #{Order.proformInvoice}
+        </if>
+        <if test="Order.portOfLoad!=null and Order.portOfLoad != ''">
+            and port_of_load = #{Order.portOfLoad}
+        </if>
+        <if test="Order.portOfDestination!=null and Order.portOfDestination != ''">
+            and port_of_destination = #{Order.portOfDestination}
+        </if>
+        <if test="Order.oceanFreight!=null">
+            and ocean_freight = #{Order.oceanFreight}
+        </if>
+        <if test="Order.version!=null and Order.version != ''">
+            and version = #{Order.version}
+        </if>
+        <if test="Order.tenantId!=null and Order.tenantId != ''">
+            and tenant_id = #{Order.tenantId}
+        </if>
+        <if test="Order.createUser!=null">
+            and create_user = #{Order.createUser}
+        </if>
+        <if test="Order.createDept!=null">
+            and create_dept = #{Order.createDept}
+        </if>
+        <if test="Order.createTime!=null">
+            and create_time = #{Order.createTime}
+        </if>
+        <if test="Order.updateUser!=null">
+            and update_user = #{Order.updateUser}
+        </if>
+        <if test="Order.updateTime!=null">
+            and update_time = #{Order.updateTime}
+        </if>
+        <if test="Order.status!=null">
+            and status = #{Order.status}
+        </if>
+        order by id
     </select>
 
 </mapper>

+ 4 - 0
blade-service/blade-stock/src/main/java/org/springblade/stock/StockApplication.java

@@ -26,6 +26,10 @@ import org.springframework.cloud.client.SpringCloudApplication;
  *
  * @author Chill
  */
+
+/**
+ * 库存管理模块
+ */
 @EnableBladeFeign
 @SpringCloudApplication
 // @SeataCloudApplication

+ 1 - 0
blade-service/pom.xml

@@ -25,6 +25,7 @@
         <module>blade-purchase-sales</module>
         <module>blade-deliver-goods</module>
         <module>blade-stock</module>
+        <module>blade-mocha-item</module>
     </modules>
 
     <dependencies>