Explorar el Código

Merge branch 'main' of http://1.94.207.143:3000/chongqing/store-windows

survive hace 2 semanas
padre
commit
b74d19de5e
Se han modificado 100 ficheros con 1813 adiciones y 476 borrados
  1. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/aspect/TActionLogAop.java
  2. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountDto.java
  3. 4 4
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountInfo.java
  4. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AddressDto.java
  5. 3 3
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ArticleDto.java
  6. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BalanceDto.java
  7. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BannerDto.java
  8. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BookDto.java
  9. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BookItemDto.java
  10. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionCashDto.java
  11. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionLogDto.java
  12. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionRelationDto.java
  13. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionRuleDto.java
  14. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ConfirmLogDto.java
  15. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CouponDto.java
  16. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GiveDto.java
  17. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GiveItemDto.java
  18. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsCateDto.java
  19. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsDto.java
  20. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsSkuDto.java
  21. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsSpecChildDto.java
  22. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsSpecItemDto.java
  23. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsTopDto.java
  24. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GroupMemberDto.java
  25. 56 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialDto.java
  26. 29 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialSearchDto.java
  27. 28 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialTypeDto.java
  28. 25 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialTypeSearchDto.java
  29. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MemberGroupDto.java
  30. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MemberTopDto.java
  31. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MyCouponDto.java
  32. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OpenGiftDto.java
  33. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OrderDto.java
  34. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OrderGoodsDto.java
  35. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OrderUserDto.java
  36. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/PointDto.java
  37. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/RefundDto.java
  38. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/RegionDto.java
  39. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ReqCouponDto.java
  40. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ReqCouponGroupDto.java
  41. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ReqSendLogDto.java
  42. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ResCartDto.java
  43. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/SettlementDto.java
  44. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/SettlementOrderDto.java
  45. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/SmsTemplateDto.java
  46. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/StaffDto.java
  47. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/StoreDto.java
  48. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserCouponDto.java
  49. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserDto.java
  50. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserGroupDto.java
  51. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserInfo.java
  52. 6 6
      fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserOrderDto.java
  53. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/param/CommissionRuleParam.java
  54. 3 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/permission/PermissionService.java
  55. 3 3
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/AccountService.java
  56. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/CouponService.java
  57. 6 6
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/DutyService.java
  58. 81 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/MaterialService.java
  59. 89 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/MaterialTypeService.java
  60. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/MerchantService.java
  61. 4 4
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/SettingService.java
  62. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/SourceService.java
  63. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/StaffService.java
  64. 3 3
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/StoreService.java
  65. 9 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableCategoryService.java
  66. 16 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableInfoService.java
  67. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableService.java
  68. 6 6
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/UserCouponService.java
  69. 12 12
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/WeixinService.java
  70. 5 5
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java
  71. 3 3
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AlipayServiceImpl.java
  72. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/CartServiceImpl.java
  73. 7 7
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/DutyServiceImpl.java
  74. 231 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MaterialServiceImpl.java
  75. 268 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MaterialTypeServiceImpl.java
  76. 4 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java
  77. 12 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/TableCategoryServiceImpl.java
  78. 52 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/TableInfoServiceImpl.java
  79. 17 17
      fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java
  80. 16 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TimeUtils.java
  81. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TokenUtil.java
  82. 32 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/MaterialTypeVo.java
  83. 45 0
      fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/MaterialVo.java
  84. 2 5
      fuintBackend/fuint-application/src/main/java/com/fuint/common/web/ClientUserInterceptor.java
  85. 9 9
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendAccountController.java
  86. 38 29
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCashierController.java
  87. 2 2
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommonController.java
  88. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGoodsController.java
  89. 176 0
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialController.java
  90. 130 0
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialTypeController.java
  91. 280 279
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java
  92. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/AccountInfoRequest.java
  93. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/CommissionCashRequest.java
  94. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/CommissionLogRequest.java
  95. 1 0
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientCartController.java
  96. 1 1
      fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/request/MyCouponRequest.java
  97. 7 2
      fuintBackend/fuint-application/src/main/resources/application.properties
  98. 24 0
      fuintBackend/fuint-framework/src/main/java/com/fuint/framework/web/PageResult.java
  99. 1 1
      fuintBackend/fuint-repository/src/main/java/com/fuint/repository/bean/GoodsTopBean.java
  100. 1 1
      fuintBackend/fuint-repository/src/main/java/com/fuint/repository/bean/MemberTopBean.java

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/aspect/TActionLogAop.java

@@ -53,8 +53,8 @@ public class TActionLogAop {
     private AccountService tAccountService;
 
     private String userName = ""; // 用户名
-    private Integer merchantId = 0; // 商户ID
-    private Integer storeId = 0; // 店铺ID
+    private Long merchantId = 0L; // 商户ID
+    private Long storeId = 0L; // 店铺ID
     private Long startTimeMillis = 0l; // 开始时间
     private Long endTimeMillis = 0l; // 结束时间
     private String clientIp = "";

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountDto.java

@@ -17,7 +17,7 @@ import java.util.Date;
 public class AccountDto {
 
     @ApiModelProperty("账户主键id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("账户编码")
     private String accountKey;

+ 4 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AccountInfo.java

@@ -16,7 +16,7 @@ import java.util.Date;
 public class AccountInfo implements Serializable {
 
     @ApiModelProperty("账户主键id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("账户编码")
     private String accountKey;
@@ -54,19 +54,19 @@ public class AccountInfo implements Serializable {
     private String realName;
 
     @ApiModelProperty("所属商户ID")
-    private Integer merchantId;
+    private Long merchantId;
 
     @ApiModelProperty("所属商户名称")
     private String merchantName;
 
     @ApiModelProperty("所属店铺ID")
-    private Integer storeId;
+    private Long storeId;
 
     @ApiModelProperty("所属店铺名称")
     private String storeName;
 
     @ApiModelProperty("关联员工ID")
-    private Integer staffId;
+    private Long staffId;
 
     @ApiModelProperty("登录的Token")
     private String token;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/AddressDto.java

@@ -16,7 +16,7 @@ import java.io.Serializable;
 public class AddressDto implements Serializable {
 
     @ApiModelProperty("账户主键ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员ID")
     private Integer userId;

+ 3 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ArticleDto.java

@@ -12,7 +12,7 @@ public class ArticleDto implements Serializable {
     /**
     * 自增ID 
     */
-    private Integer id;
+    private Long id;
 
    /**
     * 标题 
@@ -79,10 +79,10 @@ public class ArticleDto implements Serializable {
      * */
     private Integer sort;
 
-    public Integer getId(){
+    public Long getId(){
         return id;
     }
-    public void setId(Integer id){
+    public void setId(Long id){
     this.id=id;
     }
     public String getTitle(){

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BalanceDto.java

@@ -21,7 +21,7 @@ import java.util.Date;
 public class BalanceDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员ID")
     private Integer userId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BannerDto.java

@@ -19,7 +19,7 @@ import java.util.Date;
 public class BannerDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("标题")
     private String title;

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BookDto.java

@@ -20,8 +20,8 @@ public class BookDto implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty("自增ID")
-    @TableId(value = "ID", type = IdType.AUTO)
-    private Integer id;
+    @TableId(value = "ID", type = IdType.ID_WORKER)
+    private Long id;
 
     @ApiModelProperty("预约名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/BookItemDto.java

@@ -19,7 +19,7 @@ public class BookItemDto implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("所属商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionCashDto.java

@@ -17,7 +17,7 @@ import java.util.Date;
 public class CommissionCashDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("结算单号")
     private String settleNo;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionLogDto.java

@@ -19,7 +19,7 @@ import java.util.Date;
 public class CommissionLogDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("分佣类型")
     private String type;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionRelationDto.java

@@ -16,7 +16,7 @@ import java.util.Date;
 public class CommissionRelationDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("所属商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CommissionRuleDto.java

@@ -15,7 +15,7 @@ import java.util.List;
 public class CommissionRuleDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("规则名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ConfirmLogDto.java

@@ -23,7 +23,7 @@ import java.util.Date;
 public class ConfirmLogDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("核销编码")
     private String code;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/CouponDto.java

@@ -15,7 +15,7 @@ import java.math.BigDecimal;
 public class CouponDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("卡券名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GiveDto.java

@@ -19,7 +19,7 @@ import java.math.BigDecimal;
 public class GiveDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("获赠者会员ID")
     private Integer userId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GiveItemDto.java

@@ -20,7 +20,7 @@ import java.util.Date;
 public class GiveItemDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("赠予对象手机号")
     private String mobile;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsCateDto.java

@@ -19,7 +19,7 @@ import lombok.Setter;
 public class GoodsCateDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("所属商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsDto.java

@@ -25,7 +25,7 @@ import java.util.List;
 public class GoodsDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("所属店铺ID")
     private Integer storeId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsSkuDto.java

@@ -20,7 +20,7 @@ import java.math.BigDecimal;
 public class GoodsSkuDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("sku编码")
     private String skuNo;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsSpecChildDto.java

@@ -17,7 +17,7 @@ import java.io.Serializable;
 public class GoodsSpecChildDto implements Serializable {
 
    @ApiModelProperty("自增ID")
-   private Integer id;
+   private Long id;
 
    @ApiModelProperty("规格名称")
    private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsSpecItemDto.java

@@ -18,7 +18,7 @@ import java.util.List;
 public class GoodsSpecItemDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("规格名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GoodsTopDto.java

@@ -18,7 +18,7 @@ import java.math.BigDecimal;
 public class GoodsTopDto implements Serializable {
 
     @ApiModelProperty("商品ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商品名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/GroupMemberDto.java

@@ -16,7 +16,7 @@ import java.io.Serializable;
 public class GroupMemberDto implements Serializable {
 
     @ApiModelProperty("会员ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员名称")
     private String name;

+ 56 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialDto.java

@@ -0,0 +1,56 @@
+package com.fuint.common.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+import java.util.Date;
+
+/**
+ * 材料DTO
+ */
+@Getter
+@Setter
+public class MaterialDto {
+
+	@ApiModelProperty("材料表id")
+	private Long id;
+
+	@ApiModelProperty("材料名称")
+	private String name;
+
+	@ApiModelProperty("材料文件/图片id")
+	private String fileId;
+
+	@ApiModelProperty("库存数量")
+	private Integer inventory;
+
+	@ApiModelProperty("材料编号")
+	private String materialNo;
+
+	@ApiModelProperty("材料类别id")
+	private String materialTypeId;
+
+	@ApiModelProperty("采购期数")
+	private Integer purchasePeriod;
+
+	@ApiModelProperty("保质期")
+	private Integer shelfLife;
+
+	@ApiModelProperty("规格")
+	private String specification;
+
+	@ApiModelProperty("状态(0下架1上架)")
+	private Integer status;
+
+	@ApiModelProperty("单位")
+	private String unit;
+
+	@ApiModelProperty("项目标识")
+	private String project;
+
+	@ApiModelProperty("店铺id")
+	private String storeId;
+}

+ 29 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialSearchDto.java

@@ -0,0 +1,29 @@
+package com.fuint.common.dto;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 材料搜索条件
+ */
+@Data
+public class MaterialSearchDto{
+
+	@ApiModelProperty("材料名称")
+	private String name;
+
+	@ApiModelProperty("状态(0下架1上架)")
+	private Integer status;
+
+	@ApiModelProperty("创建时间(格式:yyyy-MM-dd)")
+	private String createTime;
+
+	@ApiModelProperty("店铺ID")
+	private String storeId;
+
+	@ApiModelProperty("页号")
+	private Integer pageNo;// 页号
+
+	@ApiModelProperty("每页行数")
+	private Integer pageSize;// 每页行数
+}

+ 28 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialTypeDto.java

@@ -0,0 +1,28 @@
+package com.fuint.common.dto;
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 材料类型DTO
+ */
+@Data
+public class MaterialTypeDto {
+
+	@ApiModelProperty("id")
+	@TableId(value = "ID", type = IdType.ID_WORKER)
+	private Long id;
+
+	@ApiModelProperty("类型名称")
+	private String name;
+
+	@ApiModelProperty("项目标识")
+	private String project;
+
+	@ApiModelProperty("店铺id")
+	private Long storeId;
+
+	@ApiModelProperty("是否启用 0 否 1是")
+	private Integer enable;
+}

+ 25 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MaterialTypeSearchDto.java

@@ -0,0 +1,25 @@
+package com.fuint.common.dto;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+/**
+ * 材料类型搜索dto
+ */
+@Data
+public class MaterialTypeSearchDto {
+
+	@ApiModelProperty("类型名称")
+	private String name;
+
+	@ApiModelProperty("是否启用 0 否 1是")
+	private Integer enable;
+
+	@ApiModelProperty("页号")
+	private Integer pageNo;// 页号
+
+	@ApiModelProperty("每页行数")
+	private Integer pageSize;// 每页行数
+}

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MemberGroupDto.java

@@ -19,7 +19,7 @@ public class MemberGroupDto implements Serializable {
     private static final long serialVersionUID = 1L;
 
     @ApiModelProperty("分组ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("分组名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MemberTopDto.java

@@ -18,7 +18,7 @@ import java.math.BigDecimal;
 public class MemberTopDto implements Serializable {
 
     @ApiModelProperty("会员ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/MyCouponDto.java

@@ -21,7 +21,7 @@ import java.util.Date;
 public class MyCouponDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("卡券名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OpenGiftDto.java

@@ -20,7 +20,7 @@ import java.io.Serializable;
 public class OpenGiftDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("店铺信息")
     private MtStore storeInfo;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OrderDto.java

@@ -19,7 +19,7 @@ import java.util.Date;
 public class OrderDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("订单类型")
     private String type;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OrderGoodsDto.java

@@ -18,7 +18,7 @@ import java.util.List;
 public class OrderGoodsDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商品ID")
     private Integer goodsId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/OrderUserDto.java

@@ -16,7 +16,7 @@ import java.io.Serializable;
 public class OrderUserDto implements Serializable {
 
     @ApiModelProperty("会员ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员号")
     private String no;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/PointDto.java

@@ -19,7 +19,7 @@ import java.util.Date;
 public class PointDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员ID")
     private Integer userId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/RefundDto.java

@@ -19,7 +19,7 @@ import java.util.List;
 public class RefundDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("订单ID")
     private Integer orderId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/RegionDto.java

@@ -18,7 +18,7 @@ import java.util.List;
 public class RegionDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ReqCouponDto.java

@@ -18,7 +18,7 @@ import java.math.BigDecimal;
 public class ReqCouponDto implements Serializable {
 
     @ApiModelProperty("卡券ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ReqCouponGroupDto.java

@@ -17,7 +17,7 @@ import java.math.BigDecimal;
 public class ReqCouponGroupDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ReqSendLogDto.java

@@ -18,7 +18,7 @@ import java.util.Date;
 public class ReqSendLogDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/ResCartDto.java

@@ -19,7 +19,7 @@ import java.util.List;
 public class ResCartDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员ID")
     private Integer userId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/SettlementDto.java

@@ -19,7 +19,7 @@ import lombok.Setter;
 public class SettlementDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("结算单号")
     private String settlementNo;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/SettlementOrderDto.java

@@ -17,7 +17,7 @@ import lombok.Setter;
 public class SettlementOrderDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("结算ID")
     private Integer settlementId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/SmsTemplateDto.java

@@ -18,7 +18,7 @@ import java.util.Date;
 public class SmsTemplateDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商户ID")
     private Integer merchantId;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/StaffDto.java

@@ -17,7 +17,7 @@ import java.util.Date;
 public class StaffDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("员工类别")
     private Integer category;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/StoreDto.java

@@ -17,7 +17,7 @@ import java.util.Date;
 public class StoreDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商户ID")
     private Integer merchantId;

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserCouponDto.java

@@ -20,7 +20,7 @@ import java.util.List;
 public class UserCouponDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("卡券名称")
     private String name;
@@ -32,7 +32,7 @@ public class UserCouponDto implements Serializable {
     private String status;
 
     @ApiModelProperty("卡券ID")
-    private Integer couponId;
+    private Long couponId;
 
     @ApiModelProperty("使用规则")
     private String useRule;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserDto.java

@@ -20,7 +20,7 @@ import lombok.Setter;
 public class UserDto implements Serializable {
 
     @ApiModelProperty("会员ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("会员号")
     private String userNo;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserGroupDto.java

@@ -18,7 +18,7 @@ import lombok.Setter;
 public class UserGroupDto implements Serializable {
 
     @ApiModelProperty("分组ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("分组名称")
     private String name;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserInfo.java

@@ -14,7 +14,7 @@ import java.io.Serializable;
 public class UserInfo implements Serializable {
 
     @ApiModelProperty("会员ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("登录Token")
     private String token;

+ 6 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/common/dto/UserOrderDto.java

@@ -23,10 +23,10 @@ import java.util.List;
 public class UserOrderDto implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("商户ID")
-    private Integer merchantId;
+    private Long merchantId;
 
     @ApiModelProperty("订单号")
     private String orderSn;
@@ -47,10 +47,10 @@ public class UserOrderDto implements Serializable {
     private Boolean isVerify;
 
     @ApiModelProperty("卡券ID")
-    private Integer couponId;
+    private Long couponId;
 
     @ApiModelProperty("会员ID")
-    private Integer userId;
+    private Long userId;
 
     @ApiModelProperty("是否游客")
     private String isVisitor;
@@ -59,7 +59,7 @@ public class UserOrderDto implements Serializable {
     private String verifyCode;
 
     @ApiModelProperty("员工ID")
-    private Integer staffId;
+    private Long staffId;
 
     @ApiModelProperty("总金额")
     private BigDecimal amount;
@@ -74,7 +74,7 @@ public class UserOrderDto implements Serializable {
     private BigDecimal deliveryFee;
 
     @ApiModelProperty("使用积分")
-    private Integer usePoint;
+    private Long usePoint;
 
     @ApiModelProperty("积分金额")
     private BigDecimal pointAmount;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/param/CommissionRuleParam.java

@@ -14,7 +14,7 @@ import java.util.List;
 public class CommissionRuleParam implements Serializable {
 
     @ApiModelProperty("自增ID")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty("规则名称")
     private String name;

+ 3 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/permission/PermissionService.java

@@ -50,8 +50,9 @@ public class PermissionService {
         }
 
         Set<String> allPermission = new HashSet<>();
+
         List<TSource> sources = sourceService.getMenuListByUserId(accountInfo.getMerchantId(), accountInfo.getId());
-        if (sources != null && sources.size() > 0) {
+        if (sources != null && !sources.isEmpty()) {
             for (TSource tSource : sources) {
                 allPermission.add(tSource.getPath().replaceAll("/", ":"));
             }
@@ -70,4 +71,4 @@ public class PermissionService {
     private boolean hasPermissions(Set<String> permissions, String permission) {
         return permissions.contains(ALL_PERMISSION) || permissions.contains(StringUtil.trim(permission));
     }
-}
+}

+ 3 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/AccountService.java

@@ -42,7 +42,7 @@ public interface AccountService extends IService<TAccount> {
      * @param id 账号ID
      * @return
      */
-    TAccount getAccountInfoById(Integer id);
+    TAccount getAccountInfoById(Long id);
 
     /**
      * 创建账号信息
@@ -59,7 +59,7 @@ public interface AccountService extends IService<TAccount> {
      * @param accountId 账号ID
      * @return
      * */
-    List<Long> getRoleIdsByAccountId(Integer accountId);
+    List<Long> getRoleIdsByAccountId(Long accountId);
 
     /**
      * 修改账户
@@ -76,7 +76,7 @@ public interface AccountService extends IService<TAccount> {
      * @param accountId 账户
      * @return 角色ID集合
      */
-    List<Integer> getDutyIdsByAccountId(Integer accountId);
+    List<Integer> getDutyIdsByAccountId(Long accountId);
 
     /**
      * 更新账户信息

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/CouponService.java

@@ -45,7 +45,7 @@ public interface CouponService extends IService<MtCoupon> {
      * @throws BusinessCheckException
      * @return
      */
-    MtCoupon queryCouponById(Integer id) throws BusinessCheckException;
+    MtCoupon queryCouponById(Long id) throws BusinessCheckException;
 
     /**
      * 删除卡券信息
@@ -76,7 +76,7 @@ public interface CouponService extends IService<MtCoupon> {
      * @throws BusinessCheckException
      * @return
      */
-    void sendCoupon(Integer couponId, Integer userId, Integer num, Boolean sendMessage, String uuid, String operator) throws BusinessCheckException;
+    void sendCoupon(Long couponId, Long userId, Integer num, Boolean sendMessage, String uuid, String operator) throws BusinessCheckException;
 
     /**
      * 发放卡券

+ 6 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/DutyService.java

@@ -33,7 +33,7 @@ public interface DutyService extends IService<TDuty> {
      * @param accountId  账号ID
      * @return
      */
-    List<TDuty> getAvailableRoles(Integer merchantId, Integer accountId);
+    List<TDuty> getAvailableRoles(Long merchantId, Long accountId);
 
     /**
      * 根据ID获取角色实体
@@ -66,7 +66,7 @@ public interface DutyService extends IService<TDuty> {
      * @param dutyId 角色ID
      * @return
      */
-    void deleteDuty(Integer merchantId, long dutyId) throws BusinessCheckException;
+    void deleteDuty(Long merchantId, long dutyId) throws BusinessCheckException;
 
     /**
      * 更新状态
@@ -75,7 +75,7 @@ public interface DutyService extends IService<TDuty> {
      * @param dutyStatusRequest
      * @return
      */
-    void updateStatus(Integer merchantId, DutyStatusRequest dutyStatusRequest) throws BusinessCheckException;
+    void updateStatus(Long merchantId, DutyStatusRequest dutyStatusRequest) throws BusinessCheckException;
 
     /**
      * 修改角色
@@ -93,7 +93,7 @@ public interface DutyService extends IService<TDuty> {
      * @param name 角色名称
      * @return
      */
-    TDuty findByName(Integer merchantId, String name);
+    TDuty findByName(Long merchantId, String name);
 
     /**
      * 根据角色名称获取已经分配的菜单ID集合
@@ -109,7 +109,7 @@ public interface DutyService extends IService<TDuty> {
      * @param merchantId 商户ID
      * @return
      */
-    List<TreeNode> getDutyTree(Integer merchantId);
+    List<TreeNode> getDutyTree(Long merchantId);
 
     /**
      * 根据账户获取角色
@@ -117,5 +117,5 @@ public interface DutyService extends IService<TDuty> {
      * @param accountId 账号ID
      * @return
      */
-    List<Long> findDutiesByAccountId(Integer accountId);
+    List<Long> findDutiesByAccountId(Long accountId);
 }

+ 81 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/MaterialService.java

@@ -0,0 +1,81 @@
+package com.fuint.common.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.common.dto.MaterialSearchDto;
+import com.fuint.common.vo.MaterialVo;
+import com.fuint.framework.pagination.PaginationRequest;
+import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
+import com.fuint.repository.model.MtMaterial;
+import com.fuint.framework.exception.BusinessCheckException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 材料表业务接口
+ *
+ * Created by PZG
+ * CopyRight https://www.fuint.cn
+ */
+public interface MaterialService extends IService<MtMaterial> {
+
+    /**
+     * 分页查询列表
+     *
+     * @param paginationRequest
+     * @return
+     */
+    PaginationResponse<MtMaterial> queryMaterialListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;
+
+    /**
+     * 添加材料表
+     *
+     * @param  mtMaterial
+     * @throws BusinessCheckException
+     * @return
+     */
+    MtMaterial addMaterial(MtMaterial mtMaterial) throws BusinessCheckException;
+
+    /**
+     * 根据ID获取材料表信息
+     *
+     * @param id ID
+     * @throws BusinessCheckException
+     * @return
+     */
+    MtMaterial queryMaterialById(Long id) throws BusinessCheckException;
+
+    /**
+     * 根据ID删除材料表
+     *
+     * @param id ID
+     * @param operator 操作人
+     * @throws BusinessCheckException
+     * @return
+     */
+    void deleteMaterial(Long id, String operator) throws BusinessCheckException;
+
+    /**
+     * 更新材料表
+     * @param  mtMaterial
+     * @throws BusinessCheckException
+     * @return
+     * */
+    MtMaterial updateMaterial(MtMaterial mtMaterial) throws BusinessCheckException;
+
+    /**
+     * 根据条件搜索材料表
+     *
+     * @param params 查询参数
+     * @throws BusinessCheckException
+     * @return
+     * */
+    List<MtMaterial> queryMaterialListByParams(Map<String, Object> params) throws BusinessCheckException;
+
+    /**
+     * 分页查询数据
+     * @param materialSearchDto 参数体
+     * @return 结果
+     */
+	PageResult<MaterialVo> selectMaterialList(MaterialSearchDto materialSearchDto);
+}

+ 89 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/MaterialTypeService.java

@@ -0,0 +1,89 @@
+package com.fuint.common.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.common.dto.MaterialTypeSearchDto;
+import com.fuint.common.vo.MaterialTypeVo;
+import com.fuint.framework.pagination.PaginationRequest;
+import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
+import com.fuint.framework.web.ResponseObject;
+import com.fuint.repository.model.MtMaterialType;
+import com.fuint.framework.exception.BusinessCheckException;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * 材料类型表业务接口
+ *
+ * Created by PZG
+ * CopyRight https://www.fuint.cn
+ */
+public interface MaterialTypeService extends IService<MtMaterialType> {
+
+    /**
+     * 分页查询列表
+     *
+     * @param paginationRequest
+     * @return
+     */
+    PaginationResponse<MtMaterialType> queryMaterialTypeListByPagination(PaginationRequest paginationRequest) throws BusinessCheckException;
+
+    /**
+     * 添加材料类型表
+     *
+     * @param  mtMaterialType
+     * @throws BusinessCheckException
+     * @return
+     */
+    ResponseObject addMaterialType(MtMaterialType mtMaterialType) throws BusinessCheckException;
+
+    /**
+     * 根据ID获取材料类型表信息
+     *
+     * @param id ID
+     * @throws BusinessCheckException
+     * @return
+     */
+    MtMaterialType queryMaterialTypeById(Long id) throws BusinessCheckException;
+
+    /**
+     * 根据ID删除材料类型表
+     *
+     * @param id ID
+     * @param operator 操作人
+     * @throws BusinessCheckException
+     * @return
+     */
+    void deleteMaterialType(Long id, String operator) throws BusinessCheckException;
+
+    /**
+     * 更新材料类型表
+     * @param  mtMaterialType
+     * @throws BusinessCheckException
+     * @return
+     * */
+    MtMaterialType updateMaterialType(MtMaterialType mtMaterialType) throws BusinessCheckException;
+
+    /**
+     * 根据条件搜索材料类型表
+     *
+     * @param params 查询参数
+     * @throws BusinessCheckException
+     * @return
+     * */
+    List<MtMaterialType> queryMaterialTypeListByParams(Map<String, Object> params) throws BusinessCheckException;
+
+    /**
+     * 材料类型表列表查询
+     *
+     * @return 材料类型表列表
+     */
+	PageResult<MaterialTypeVo> selectMaterialTypeList(MaterialTypeSearchDto materialTypeSearchDto);
+
+    /**
+     * 根据id删除材料类型数据
+     *
+     * @return 结果
+     */
+    ResponseObject deleteHandler(Long id) throws BusinessCheckException;
+}

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/MerchantService.java

@@ -40,7 +40,7 @@ public interface MerchantService extends IService<MtMerchant> {
      * @throws BusinessCheckException
      * @return
      */
-    MtMerchant queryMerchantById(Integer id) throws BusinessCheckException;
+    MtMerchant queryMerchantById(Long id) throws BusinessCheckException;
 
     /**
      * 根据名称获取商户信息
@@ -76,7 +76,7 @@ public interface MerchantService extends IService<MtMerchant> {
      * @throws BusinessCheckException
      * @return
      */
-    void updateStatus(Integer id, String operator, String status) throws BusinessCheckException;
+    void updateStatus(Long id, String operator, String status) throws BusinessCheckException;
 
     /**
      * 根据条件查询商户

+ 4 - 4
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/SettingService.java

@@ -22,7 +22,7 @@ public interface SettingService extends IService<MtSetting> {
      * @param  name 配置名称
      * @throws BusinessCheckException
      */
-    void removeSetting(Integer merchantId, String type, String name) throws BusinessCheckException;
+    void removeSetting(Long merchantId, String type, String name) throws BusinessCheckException;
 
     /**
      * 保存配置
@@ -38,7 +38,7 @@ public interface SettingService extends IService<MtSetting> {
      * @param  type
      * @throws BusinessCheckException
      */
-    List<MtSetting> getSettingList(Integer merchantId, String type) throws BusinessCheckException;
+    List<MtSetting> getSettingList(Long merchantId, String type) throws BusinessCheckException;
 
     /**
      * 根据配置名称获取配置信息
@@ -48,7 +48,7 @@ public interface SettingService extends IService<MtSetting> {
      * @param  name 配置名称
      * @throws BusinessCheckException
      */
-    MtSetting querySettingByName(Integer merchantId, String type, String name) throws BusinessCheckException;
+    MtSetting querySettingByName(Long merchantId, String type, String name) throws BusinessCheckException;
 
     /**
      * 根据配置名称获取配置信息
@@ -59,7 +59,7 @@ public interface SettingService extends IService<MtSetting> {
      * @param  name 配置名称
      * @throws BusinessCheckException
      */
-    MtSetting querySettingByName(Integer merchantId, Integer storeId, String type, String name) throws BusinessCheckException;
+    MtSetting querySettingByName(Long merchantId, Long storeId, String type, String name) throws BusinessCheckException;
 
     /**
      * 获取系统上传文件的根路径

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/SourceService.java

@@ -50,7 +50,7 @@ public interface SourceService extends IService<TSource> {
      * @throws BusinessCheckException
      * @return
      */
-    List<TSource> getMenuListByUserId(Integer merchantId, Integer accountId) throws BusinessCheckException;
+    List<TSource> getMenuListByUserId(Long merchantId, Long accountId) throws BusinessCheckException;
 
     /**
      * 构建前端路由所需要的菜单
@@ -83,7 +83,7 @@ public interface SourceService extends IService<TSource> {
      * @param accountId
      * @return
      */
-    void addSource(TSource tSource, Integer accountId);
+    void addSource(TSource tSource, Long accountId);
 
     /**
      * 修改后台菜单

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/StaffService.java

@@ -41,7 +41,7 @@ public interface StaffService extends IService<MtStaff> {
      * @param  id 员工id
      * @throws BusinessCheckException
      */
-    MtStaff queryStaffById(Integer id) throws BusinessCheckException;
+    MtStaff queryStaffById(Long id) throws BusinessCheckException;
 
     /**
      * 审核更改状态(禁用,审核通过)
@@ -50,7 +50,7 @@ public interface StaffService extends IService<MtStaff> {
      * @throws BusinessCheckException
      * @return
      */
-    Integer updateAuditedStatus(Integer id, String statusEnum) throws BusinessCheckException;
+    Integer updateAuditedStatus(Long id, String statusEnum) throws BusinessCheckException;
 
     /**
      * 根据条件搜索员工

+ 3 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/StoreService.java

@@ -48,7 +48,7 @@ public interface StoreService extends IService<MtStore> {
      * @throws BusinessCheckException
      * @return
      */
-    MtStore queryStoreById(Integer id) throws BusinessCheckException;
+    MtStore queryStoreById(Long id) throws BusinessCheckException;
 
     /**
      * 根据店铺名称获取店铺信息
@@ -65,7 +65,7 @@ public interface StoreService extends IService<MtStore> {
      * @return
      * @throws BusinessCheckException
      */
-    StoreDto queryStoreDtoById(Integer id) throws BusinessCheckException;
+    StoreDto queryStoreDtoById(Long id) throws BusinessCheckException;
 
     /**
      * 更新店铺状态
@@ -75,7 +75,7 @@ public interface StoreService extends IService<MtStore> {
      * @param  status   状态
      * @throws BusinessCheckException
      */
-    void updateStatus(Integer id, String operator, String status) throws BusinessCheckException;
+    void updateStatus(Long id, String operator, String status) throws BusinessCheckException;
 
     /**
      * 根据条件查询店铺列表

+ 9 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableCategoryService.java

@@ -0,0 +1,9 @@
+package com.fuint.common.service;
+
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.repository.model.MtTableCategory;
+
+
+public interface TableCategoryService extends IService<MtTableCategory> {
+
+}

+ 16 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableInfoService.java

@@ -0,0 +1,16 @@
+package com.fuint.common.service;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.fuint.repository.model.MtTableInfo;
+
+import java.util.List;
+
+public interface TableInfoService extends IService<MtTableInfo> {
+
+
+	/**
+	 * 获取餐桌列表
+	 * @param storeId 店铺id
+	 * @return 结果
+	 */
+	List<MtTableInfo> selectTableListByStoreId(Long storeId,Long categoryId);
+}

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/TableService.java

@@ -42,7 +42,7 @@ public interface TableService extends IService<MtTable> {
      * @throws BusinessCheckException
      * @return
      */
-    MtTable queryTableById(Integer id) throws BusinessCheckException;
+    MtTable queryTableById(Long id) throws BusinessCheckException;
 
     /**
      * 根据ID删除桌码
@@ -52,7 +52,7 @@ public interface TableService extends IService<MtTable> {
      * @throws BusinessCheckException
      * @return
      */
-    void deleteTable(Integer id, String operator) throws BusinessCheckException;
+    void deleteTable(Long id, String operator) throws BusinessCheckException;
 
     /**
      * 更新桌码

+ 6 - 6
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/UserCouponService.java

@@ -49,7 +49,7 @@ public interface UserCouponService extends IService<MtUserCoupon> {
      * @param status
      * @return
      * */
-    List<MtUserCoupon> getUserCouponList(Integer userId, List<String> status) throws BusinessCheckException;
+    List<MtUserCoupon> getUserCouponList(Long userId, List<String> status) throws BusinessCheckException;
 
     /**
      * 获取用户的卡券
@@ -66,14 +66,14 @@ public interface UserCouponService extends IService<MtUserCoupon> {
      * @param useFor 用途
      * @return
      * */
-    List<CouponDto> getPayAbleCouponList(Integer userId, Integer storeId, String useFor) throws BusinessCheckException;
+    List<CouponDto> getPayAbleCouponList(Long userId, Long storeId, String useFor) throws BusinessCheckException;
 
     /**
      * 获取会员卡券详情
      * @param userId
      * @param couponId
      * */
-    List<MtUserCoupon> getUserCouponDetail(Integer userId, Integer couponId) throws BusinessCheckException;
+    List<MtUserCoupon> getUserCouponDetail(Long userId, Long couponId) throws BusinessCheckException;
 
     /**
      * 获取会员卡券详情
@@ -81,7 +81,7 @@ public interface UserCouponService extends IService<MtUserCoupon> {
      * @param userCouponId
      * @return
      * */
-    MtUserCoupon getUserCouponDetail(Integer userCouponId) throws BusinessCheckException;
+    MtUserCoupon getUserCouponDetail(Long userCouponId) throws BusinessCheckException;
 
     /**
      * 根据过期时间查询会员卡券
@@ -92,7 +92,7 @@ public interface UserCouponService extends IService<MtUserCoupon> {
      * @param endTime
      * @return
      * */
-    List<MtUserCoupon> getUserCouponListByExpireTime(Integer userId, String status, String startTime, String endTime) throws BusinessCheckException;
+    List<MtUserCoupon> getUserCouponListByExpireTime(Long userId, String status, String startTime, String endTime) throws BusinessCheckException;
 
     /**
      * 给会员发送卡券(会员购买)
@@ -104,5 +104,5 @@ public interface UserCouponService extends IService<MtUserCoupon> {
      * @param num 购买数量
      * @return
      * */
-    boolean buyCouponItem(Integer orderId, Integer couponId, Integer userId, String mobile, Integer num) throws BusinessCheckException;
+    boolean buyCouponItem(Long orderId, Long couponId, Long userId, String mobile, Integer num) throws BusinessCheckException;
 }

+ 12 - 12
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/WeixinService.java

@@ -27,7 +27,7 @@ public interface WeixinService {
      * @param useCache 是否从缓存中读取
      * @return
      * */
-    String getAccessToken(Integer merchantId, boolean isMinApp, boolean useCache) throws BusinessCheckException;
+    String getAccessToken(Long merchantId, boolean isMinApp, boolean useCache) throws BusinessCheckException;
 
     /**
      * 提交预支付订单
@@ -68,7 +68,7 @@ public interface WeixinService {
      * @param code 登录编码
      * @return
      * */
-    JSONObject getWxProfile(Integer merchantId, String code) throws BusinessCheckException;
+    JSONObject getWxProfile(Long merchantId, String code) throws BusinessCheckException;
 
     /**
      * 获取微信openId
@@ -77,7 +77,7 @@ public interface WeixinService {
      * @param code 登录编码
      * @return
      * */
-    JSONObject getWxOpenId(Integer merchantId, String code) throws BusinessCheckException;
+    JSONObject getWxOpenId(Long merchantId, String code) throws BusinessCheckException;
 
     /**
      * 获取会员微信绑定的手机号
@@ -101,7 +101,7 @@ public interface WeixinService {
      * @param sendTime 发送时间
      * @return
      * */
-    Boolean sendSubscribeMessage(Integer merchantId, Integer userId, String toUserOpenId, String key, String page, Map<String,Object> params, Date sendTime) throws BusinessCheckException;
+    Boolean sendSubscribeMessage(Long merchantId, Long userId, String toUserOpenId, String key, String page, Map<String,Object> params, Date sendTime) throws BusinessCheckException;
 
     /**
      * 发送订阅消息
@@ -110,7 +110,7 @@ public interface WeixinService {
      * @param reqDataJsonStr 发送参数
      * @return
      * */
-    Boolean doSendSubscribeMessage(Integer merchantId, String reqDataJsonStr);
+    Boolean doSendSubscribeMessage(Long merchantId, String reqDataJsonStr);
 
     /**
      * 查询支付订单
@@ -120,7 +120,7 @@ public interface WeixinService {
      * @param orderSn 订单号
      * @return
      * */
-    Map<String, String> queryPaidOrder(Integer storeId, String transactionId, String orderSn);
+    Map<String, String> queryPaidOrder(Long storeId, String transactionId, String orderSn);
 
     /**
      * 发起售后
@@ -132,7 +132,7 @@ public interface WeixinService {
      * @param platform 平台
      * @return
      * */
-    Boolean doRefund(Integer storeId, String orderSn, BigDecimal totalAmount, BigDecimal refundAmount, String platform) throws BusinessCheckException;
+    Boolean doRefund(Long storeId, String orderSn, BigDecimal totalAmount, BigDecimal refundAmount, String platform) throws BusinessCheckException;
 
     /**
      * 生成二维码
@@ -144,7 +144,7 @@ public interface WeixinService {
      * @param width 宽度
      * @return
      * */
-    String createQrCode(Integer merchantId, String type, Integer id, String page, Integer width) throws BusinessCheckException;
+    String createQrCode(Long merchantId, String type, Long id, String page, Integer width) throws BusinessCheckException;
 
     /**
      * 开通微信卡券
@@ -153,7 +153,7 @@ public interface WeixinService {
      * @param wxCardId 微信会员卡ID
      * @return
      * */
-    String createWxCard(Integer merchantId, String wxCardId) throws BusinessCheckException;
+    String createWxCard(Long merchantId, String wxCardId) throws BusinessCheckException;
 
     /**
      * 创建微信卡券领取的二维码
@@ -163,7 +163,7 @@ public interface WeixinService {
      * @param code 会员卡编码
      * @return
      * */
-    String createCardQrCode(Integer merchantId, String cardId, String code);
+    String createCardQrCode(Long merchantId, String cardId, String code);
 
     /**
      * 是否已领取卡券
@@ -173,7 +173,7 @@ public interface WeixinService {
      * @param openId openId
      * @return
      * */
-    Boolean isOpenCard(Integer merchantId, String cardId, String openId);
+    Boolean isOpenCard(Long merchantId, String cardId, String openId);
 
     /**
      * 生成小程序链接
@@ -182,6 +182,6 @@ public interface WeixinService {
      * @param path 页面路径
      * @return
      * */
-    String createMiniAppLink(Integer merchantId, String path);
+    String createMiniAppLink(Long merchantId, String path);
 
 }

+ 5 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AccountServiceImpl.java

@@ -180,7 +180,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
      * @return
      * */
     @Override
-    public TAccount getAccountInfoById(Integer userId) {
+    public TAccount getAccountInfoById(Long userId) {
         TAccount tAccount = tAccountMapper.selectById(userId);
         return tAccount;
     }
@@ -201,7 +201,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
         account.setRealName(tAccount.getRealName());
         account.setRoleIds(tAccount.getRoleIds());
         account.setStaffId(tAccount.getStaffId());
-        Integer storeId = tAccount.getStoreId() == null ? 0 : tAccount.getStoreId();
+        Long storeId = tAccount.getStoreId() == null ? 0 : tAccount.getStoreId();
         if (tAccount.getMerchantId() == null || tAccount.getMerchantId() <= 0) {
             MtStore mtStore = storeService.queryStoreById(storeId);
             if (mtStore != null) {
@@ -216,7 +216,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
         account.setStaffId(tAccount.getStaffId());
         account.setPassword(tAccount.getPassword());
         this.entryptPassword(account);
-        int id = tAccountMapper.insert(account);
+        long id = tAccountMapper.insert(account);
 
         if (id > 0 && duties != null && duties.size() > 0) {
             for (TDuty tDuty : duties) {
@@ -241,7 +241,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
      * @return
      * */
     @Override
-    public List<Long> getRoleIdsByAccountId(Integer accountId) {
+    public List<Long> getRoleIdsByAccountId(Long accountId) {
         List<Long> roleIds = tDutyMapper.getRoleIdsByAccountId(accountId);
         return roleIds;
     }
@@ -376,7 +376,7 @@ public class AccountServiceImpl extends ServiceImpl<TAccountMapper, TAccount> im
                 throw new BusinessCheckException("登录账号或密码有误");
             }
 
-            TAccount tAccount = getAccountInfoById(accountInfo.getId());
+            TAccount tAccount = getAccountInfoById(Math.toIntExact(accountInfo.getId()));
             String myPassword = tAccount.getPassword();
             String inputPassword = getEntryptPassword(password, tAccount.getSalt());
             if (!myPassword.equals(inputPassword) || !tAccount.getAccountStatus().toString().equals("1")) {

+ 3 - 3
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/AlipayServiceImpl.java

@@ -138,7 +138,7 @@ public class AlipayServiceImpl implements AlipayService {
     @Override
     public Boolean checkCallBack(Map<String, String> params) throws Exception {
         String orderSn = params.get("out_trade_no") != null ? params.get("out_trade_no") : "";
-        Integer storeId = 0;
+        Long storeId = 0L;
         UserOrderDto orderDto = orderService.getOrderByOrderSn(orderSn);
         if (orderDto != null && orderDto.getStoreInfo() != null) {
             storeId = orderDto.getStoreInfo().getId();
@@ -153,7 +153,7 @@ public class AlipayServiceImpl implements AlipayService {
      * @param storeId 店铺ID
      * @return
      * */
-    public AliPayApiConfig getApiConfig(Integer storeId) throws BusinessCheckException {
+    public AliPayApiConfig getApiConfig(Long storeId) throws BusinessCheckException {
         AliPayApiConfig aliPayApiConfig;
         String appId = aliPayBean.getAppId();
         String privateKey = aliPayBean.getPrivateKey();
@@ -191,7 +191,7 @@ public class AlipayServiceImpl implements AlipayService {
      * @return
      * */
     @Override
-    public Map<String, String> queryPaidOrder(Integer storeId, String tradeNo, String orderSn) throws BusinessCheckException {
+    public Map<String, String> queryPaidOrder(Long storeId, String tradeNo, String orderSn) throws BusinessCheckException {
         try {
             AlipayTradeQueryModel model = new AlipayTradeQueryModel();
             if (StringUtil.isNotEmpty(orderSn)) {

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/CartServiceImpl.java

@@ -112,7 +112,7 @@ public class CartServiceImpl extends ServiceImpl<MtCartMapper, MtCart> implement
             } else {
                 totalStock = mtGoods.getStock();
             }
-            // 判断库存,库存小于要添加的购物车数量、已添加的购物车数大于库存
+            // 判断库存,库存小于要添加的购物车数量、已添加的购物车数大于库存
             if (totalStock < reqDto.getNum() || totalStock <= cartNum) {
                 if (!action.equals("=") && reqDto.getNum() > cartNum) {
                     throw new BusinessCheckException(mtGoods.getName() + "库存不足了");

+ 7 - 7
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/DutyServiceImpl.java

@@ -52,7 +52,7 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
      * @return
      */
     @Override
-    public List<TDuty> getAvailableRoles(Integer merchantId, Integer accountId) {
+    public List<TDuty> getAvailableRoles(Long merchantId, Long accountId) {
         List<TDuty> result = tDutyMapper.findByStatus(merchantId, StatusEnum.ENABLED.getKey());
         List<Long> ids = new ArrayList<>();
         if (result != null && result.size() > 0) {
@@ -106,12 +106,12 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
     @Override
     @Transactional(rollbackFor = Exception.class)
     @OperationServiceLog(description = "删除后台角色")
-    public void deleteDuty(Integer merchantId, long dutyId) {
+    public void deleteDuty(Long merchantId, long dutyId) {
         TDuty tDuty = getRoleById(dutyId);
         if (!merchantId.equals(tDuty.getMerchantId()) && merchantId > 0) {
             throw new BusinessRuntimeException("抱歉,您没有删除的权限");
         }
-        tDutySourceMapper.deleteSourcesByDutyId((int) dutyId);
+        tDutySourceMapper.deleteSourcesByDutyId(dutyId);
         tDutyMapper.deleteById(dutyId);
     }
 
@@ -125,7 +125,7 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
     @Override
     @Transactional(rollbackFor = Exception.class)
     @OperationServiceLog(description = "更新后台角色状态")
-    public void updateStatus(Integer merchantId, DutyStatusRequest dutyStatusRequest) throws BusinessCheckException {
+    public void updateStatus(Long merchantId, DutyStatusRequest dutyStatusRequest) throws BusinessCheckException {
         TDuty tDuty = tDutyMapper.selectById(dutyStatusRequest.getRoleId());
 
         if (!merchantId.equals(tDuty.getMerchantId()) && merchantId > 0) {
@@ -187,7 +187,7 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
      * @return
      */
     @Override
-    public TDuty findByName(Integer merchantId, String name) {
+    public TDuty findByName(Long merchantId, String name) {
         return tDutyMapper.findByName(merchantId, name);
     }
 
@@ -274,7 +274,7 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
      * @return
      */
     @Override
-    public List<TreeNode> getDutyTree(Integer merchantId) {
+    public List<TreeNode> getDutyTree(Long merchantId) {
         List<TDuty> tDuties = getAvailableRoles(merchantId, 0);
         List<TreeNode> trees = new ArrayList<TreeNode>();
         if (tDuties != null && tDuties.size() > 0) {
@@ -298,7 +298,7 @@ public class DutyServiceImpl extends ServiceImpl<TDutyMapper, TDuty> implements
      * @return
      */
     @Override
-    public List<Long> findDutiesByAccountId(Integer accountId) {
+    public List<Long> findDutiesByAccountId(Long accountId) {
         return tDutyMapper.getRoleIdsByAccountId(accountId);
     }
 }

+ 231 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MaterialServiceImpl.java

@@ -0,0 +1,231 @@
+package com.fuint.common.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.common.Constants;
+import com.fuint.common.dto.MaterialSearchDto;
+import com.fuint.common.util.TimeUtils;
+import com.fuint.common.vo.MaterialVo;
+import com.fuint.framework.annoation.OperationServiceLog;
+import com.fuint.framework.exception.BusinessCheckException;
+import com.fuint.framework.pagination.PaginationRequest;
+import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
+import com.fuint.repository.mapper.MtMaterialTypeMapper;
+import com.fuint.repository.mapper.MtStoreMapper;
+import com.fuint.repository.model.MtMaterial;
+import com.fuint.common.service.MaterialService;
+import com.fuint.common.enums.StatusEnum;
+import com.fuint.repository.mapper.MtMaterialMapper;
+import com.fuint.repository.model.MtMaterialType;
+import com.fuint.repository.model.MtStore;
+import com.github.pagehelper.PageHelper;
+import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.github.pagehelper.Page;
+import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.*;
+import java.util.concurrent.CompletableFuture;
+import java.util.stream.Collectors;
+
+/**
+ * 材料表服务接口
+ * <p>
+ * Created by PZG
+ * CopyRight https://www.fuint.cn
+ */
+@Service
+@AllArgsConstructor
+public class MaterialServiceImpl extends ServiceImpl<MtMaterialMapper, MtMaterial> implements MaterialService {
+
+	private static final Logger logger = LoggerFactory.getLogger(MaterialServiceImpl.class);
+
+	private MtMaterialMapper mtMaterialMapper;
+
+	private MtStoreMapper storeMapper;
+
+    private MtMaterialTypeMapper mtMaterialTypeMapper;
+
+
+	/**
+	 * 分页查询数据列表
+	 *
+	 * @param paginationRequest
+	 * @return
+	 */
+	@Override
+	public PaginationResponse<MtMaterial> queryMaterialListByPagination(PaginationRequest paginationRequest) {
+		Page<MtMaterial> pageHelper = PageHelper.startPage(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
+		LambdaQueryWrapper<MtMaterial> lambdaQueryWrapper = Wrappers.lambdaQuery();
+		lambdaQueryWrapper.ne(MtMaterial::getDeleteFlag, 0);
+
+		lambdaQueryWrapper.orderByAsc(MtMaterial::getId);
+		List<MtMaterial> dataList = mtMaterialMapper.selectList(lambdaQueryWrapper);
+
+		PageRequest pageRequest = PageRequest.of(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
+		PageImpl pageImpl = new PageImpl(dataList, pageRequest, pageHelper.getTotal());
+		PaginationResponse<MtMaterial> paginationResponse = new PaginationResponse(pageImpl, MtMaterial.class);
+		paginationResponse.setTotalPages(pageHelper.getPages());
+		paginationResponse.setTotalElements(pageHelper.getTotal());
+		paginationResponse.setContent(dataList);
+
+		return paginationResponse;
+	}
+
+	/**
+	 * 添加材料表
+	 *
+	 * @param mtMaterial 材料表信息
+	 * @return
+	 */
+	@Override
+	@OperationServiceLog(description = "新增材料表")
+	public MtMaterial addMaterial(MtMaterial mtMaterial) throws BusinessCheckException {
+		MtStore mtStore = storeMapper.selectById(mtMaterial.getStoreId());
+		if (Objects.isNull(mtStore)){
+			throw new BusinessCheckException("店铺不存在");
+		}
+		mtMaterial.setDeleteFlag(0);
+		mtMaterial.setUpdateTime(new Date());
+		mtMaterial.setCreateTime(new Date());
+		int id = mtMaterialMapper.insert(mtMaterial);
+		if (id > 0) {
+			return mtMaterial;
+		} else {
+			throw new BusinessCheckException("新增材料表数据失败");
+		}
+	}
+
+	/**
+	 * 根据ID获材料表取息
+	 *
+	 * @param id 材料表ID
+	 * @return
+	 */
+	@Override
+	public MtMaterial queryMaterialById(Long id) {
+		return mtMaterialMapper.selectById(id);
+	}
+
+	/**
+	 * 根据ID删除材料表
+	 *
+	 * @param id       材料表ID
+	 * @param operator 操作人
+	 * @return
+	 */
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@OperationServiceLog(description = "删除材料表")
+	public void deleteMaterial(Long id, String operator) {
+		MtMaterial mtMaterial = queryMaterialById(id);
+		if (null == mtMaterial) {
+			return;
+		}
+		mtMaterial.setUpdateUserId(operator);
+		mtMaterial.setDeleteFlag(1);
+		mtMaterial.setUpdateTime(new Date());
+		mtMaterialMapper.updateById(mtMaterial);
+	}
+
+	/**
+	 * 修改材料表数据
+	 *
+	 * @param mtMaterial
+	 * @return
+	 * @throws BusinessCheckException
+	 */
+	@Override
+	@Transactional(rollbackFor = Exception.class)
+	@OperationServiceLog(description = "更新材料表")
+	public MtMaterial updateMaterial(MtMaterial mtMaterial) throws BusinessCheckException {
+		mtMaterialMapper.updateById(mtMaterial);
+		return mtMaterial;
+	}
+
+	/**
+	 * 根据条件搜索材料表
+	 *
+	 * @param params 查询参数
+	 * @return
+	 * @throws BusinessCheckException
+	 */
+	@Override
+	public List<MtMaterial> queryMaterialListByParams(Map<String, Object> params) {
+		String status = params.get("status") == null ? StatusEnum.ENABLED.getKey() : params.get("status").toString();
+		String storeId = params.get("storeId") == null ? "" : params.get("storeId").toString();
+		String merchantId = params.get("materialTypeId") == null ? "" : params.get("materialTypeId").toString();
+
+		LambdaQueryWrapper<MtMaterial> lambdaQueryWrapper = Wrappers.lambdaQuery();
+		if (StringUtils.isNotBlank(status)) {
+			lambdaQueryWrapper.eq(MtMaterial::getDeleteFlag, status);
+		}
+		if (StringUtils.isNotBlank(merchantId)) {
+			lambdaQueryWrapper.eq(MtMaterial::getMaterialTypeId, merchantId);
+		}
+		if (StringUtils.isNotBlank(storeId)) {
+			lambdaQueryWrapper.and(wq -> wq
+					.eq(MtMaterial::getStoreId, 0)
+					.or()
+					.eq(MtMaterial::getStoreId, storeId));
+		}
+
+		lambdaQueryWrapper.orderByAsc(MtMaterial::getId);
+		List<MtMaterial> dataList = mtMaterialMapper.selectList(lambdaQueryWrapper);
+		return dataList;
+	}
+
+	@SneakyThrows
+    @Override
+	public PageResult<MaterialVo> selectMaterialList(MaterialSearchDto materialSearchDto) {
+		int pageNo = materialSearchDto.getPageNo() == null ? Constants.PAGE_NUMBER : materialSearchDto.getPageNo();
+		int pageSize = materialSearchDto.getPageSize() == null ? Constants.PAGE_SIZE : materialSearchDto.getPageSize();
+		//构件查询条件
+		LambdaQueryWrapper<MtMaterial> queryWrapper = new LambdaQueryWrapper<>();
+		if (StringUtils.isNotBlank(materialSearchDto.getName())){
+			queryWrapper.eq(MtMaterial::getName, materialSearchDto.getName());
+		}
+		if (Objects.nonNull(materialSearchDto.getStatus())){
+			queryWrapper.eq(MtMaterial::getStatus, materialSearchDto.getStatus());
+		}
+		if (StringUtils.isNotBlank(materialSearchDto.getStoreId()) && Long.parseLong(materialSearchDto.getStoreId())>0){
+			queryWrapper.eq(MtMaterial::getStoreId, Long.valueOf(materialSearchDto.getStoreId()));
+		}
+		if (StringUtils.isNotBlank(materialSearchDto.getCreateTime())){
+			queryWrapper.between(MtMaterial::getCreateTime,
+					TimeUtils.getStartAndEndOfDay(materialSearchDto.getCreateTime())[0],
+					TimeUtils.getStartAndEndOfDay(materialSearchDto.getCreateTime())[1]);
+		}
+		//获取总条数
+        CompletableFuture<Integer> future = CompletableFuture.supplyAsync(() -> mtMaterialMapper.selectCount(queryWrapper));
+       //构建分页
+        PageHelper.startPage(Math.toIntExact(pageNo), Math.toIntExact(pageSize));
+		//查询数据
+        List<MtMaterial> mtMaterials = mtMaterialMapper.selectList(queryWrapper);
+		List<MaterialVo> materialVos = mtMaterials.stream().map(mtMaterial -> {
+			MaterialVo materialVo = new MaterialVo();
+			BeanUtils.copyProperties(mtMaterial, materialVo);
+			MtStore mtStore = storeMapper.selectById(mtMaterial.getStoreId());
+            MtMaterialType mtMaterialType = mtMaterialTypeMapper.selectById(mtMaterial.getMaterialTypeId());
+            if (Objects.nonNull(mtStore)){
+	            materialVo.setStoreName(mtStore.getName());
+            }
+			if (Objects.nonNull(mtMaterialType)){
+				materialVo.setMaterialType(mtMaterialType.getName());
+
+			}
+			return materialVo;
+		}).collect(Collectors.toList());
+		return PageResult.<MaterialVo>builder().data(materialVos).total(future.get()).build();
+	}
+}

+ 268 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/MaterialTypeServiceImpl.java

@@ -0,0 +1,268 @@
+package com.fuint.common.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.common.Constants;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.MaterialTypeSearchDto;
+import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.vo.MaterialTypeVo;
+import com.fuint.framework.FrameworkConstants;
+import com.fuint.framework.annoation.OperationServiceLog;
+import com.fuint.framework.exception.BusinessCheckException;
+import com.fuint.framework.pagination.PaginationRequest;
+import com.fuint.framework.pagination.PaginationResponse;
+import com.fuint.framework.web.PageResult;
+import com.fuint.framework.web.ResponseObject;
+import com.fuint.repository.mapper.MtStoreMapper;
+import com.fuint.repository.mapper.TAccountMapper;
+import com.fuint.repository.model.MtMaterialType;
+import com.fuint.common.service.MaterialTypeService;
+import com.fuint.common.enums.StatusEnum;
+import com.fuint.repository.mapper.MtMaterialTypeMapper;
+import com.fuint.repository.model.MtStore;
+import com.fuint.repository.model.TAccount;
+import com.fuint.utils.PropertiesUtil;
+import com.github.pagehelper.PageHelper;
+import lombok.AllArgsConstructor;
+import lombok.SneakyThrows;
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import com.github.pagehelper.Page;
+import org.springframework.beans.BeanUtils;
+import org.springframework.data.domain.PageImpl;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import java.util.*;
+import java.util.concurrent.CompletableFuture;
+import java.util.stream.Collectors;
+
+/**
+ * 材料类型表服务接口
+ *
+ * Created by PZG
+ * CopyRight https://www.fuint.cn
+ */
+@Service
+@AllArgsConstructor
+public class MaterialTypeServiceImpl extends ServiceImpl<MtMaterialTypeMapper, MtMaterialType> implements MaterialTypeService {
+
+    private static final Logger logger = LoggerFactory.getLogger(MaterialTypeServiceImpl.class);
+
+    private MtMaterialTypeMapper mtMaterialTypeMapper;
+
+    private MtStoreMapper storeMapper;
+
+    private TAccountMapper accountMapper;
+
+
+
+    /**
+     * 分页查询数据列表
+     *
+     * @param paginationRequest
+     * @return
+     */
+    @Override
+    public PaginationResponse<MtMaterialType> queryMaterialTypeListByPagination(PaginationRequest paginationRequest) {
+        Page<MtMaterialType> pageHelper = PageHelper.startPage(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
+        LambdaQueryWrapper<MtMaterialType> lambdaQueryWrapper = Wrappers.lambdaQuery();
+        lambdaQueryWrapper.ne(MtMaterialType::getDeleteFlag, 0);
+
+        lambdaQueryWrapper.orderByAsc(MtMaterialType::getId);
+        List<MtMaterialType> dataList = mtMaterialTypeMapper.selectList(lambdaQueryWrapper);
+
+        PageRequest pageRequest = PageRequest.of(paginationRequest.getCurrentPage(), paginationRequest.getPageSize());
+        PageImpl pageImpl = new PageImpl(dataList, pageRequest, pageHelper.getTotal());
+        PaginationResponse<MtMaterialType> paginationResponse = new PaginationResponse(pageImpl, MtMaterialType.class);
+        paginationResponse.setTotalPages(pageHelper.getPages());
+        paginationResponse.setTotalElements(pageHelper.getTotal());
+        paginationResponse.setContent(dataList);
+
+        return paginationResponse;
+    }
+
+    /**
+     * 添加材料类型表
+     *
+     * @param mtMaterialType 材料类型表信息
+     * @return
+     */
+    @Override
+    @OperationServiceLog(description = "新增材料类型表")
+    public ResponseObject addMaterialType(MtMaterialType mtMaterialType) throws BusinessCheckException {
+        mtMaterialType.setDeleteFlag(0);
+        mtMaterialType.setUpdateTime(new Date());
+        mtMaterialType.setCreateTime(new Date());
+        mtMaterialType.setCreateUserId(String.valueOf(AuthUserUtil.get().getId()));
+        mtMaterialType.setUpdateUserId(String.valueOf(AuthUserUtil.get().getId()));
+        Integer count = mtMaterialTypeMapper.selectCount(new LambdaQueryWrapper<MtMaterialType>()
+                .eq(MtMaterialType::getName, mtMaterialType.getName())
+                .eq(MtMaterialType::getStoreId, mtMaterialType.getStoreId()));
+        if (count>0){
+            return new ResponseObject(FrameworkConstants.HTTP_RESPONSE_CODE_SUCCESS, "操作成功",null);
+        }
+        int id = mtMaterialTypeMapper.insert(mtMaterialType);
+        if (id > 0) {
+            return new ResponseObject(FrameworkConstants.HTTP_RESPONSE_CODE_SUCCESS, "操作成功",null);
+        } else {
+            throw new BusinessCheckException("新增材料类型表数据失败");
+        }
+    }
+
+    /**
+     * 根据ID获材料类型表取息
+     *
+     * @param id 材料类型表ID
+     * @return
+     */
+    @Override
+    public MtMaterialType queryMaterialTypeById(Long id) {
+        return mtMaterialTypeMapper.selectById(id);
+    }
+
+    /**
+     * 根据ID删除材料类型表
+     *
+     * @param id 材料类型表ID
+     * @param operator 操作人
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    @OperationServiceLog(description = "删除材料类型表")
+    public void deleteMaterialType(Long id, String operator) {
+        MtMaterialType mtMaterialType = queryMaterialTypeById(id);
+        if (null == mtMaterialType) {
+            return;
+        }
+        mtMaterialType.setDeleteFlag(1);
+        mtMaterialType.setUpdateTime(new Date());
+        mtMaterialTypeMapper.updateById(mtMaterialType);
+    }
+
+    /**
+     * 修改材料类型表数据
+     *
+     * @param mtMaterialType
+     * @throws BusinessCheckException
+     * @return
+     */
+    @Override
+    @Transactional(rollbackFor = Exception.class)
+    @OperationServiceLog(description = "更新材料类型表")
+    public MtMaterialType updateMaterialType(MtMaterialType mtMaterialType) throws BusinessCheckException {
+        mtMaterialType.setUpdateTime(new Date());
+        mtMaterialType.setUpdateUserId(String.valueOf(AuthUserUtil.get().getId()));
+        mtMaterialTypeMapper.updateById(mtMaterialType);
+        return mtMaterialType;
+    }
+
+   /**
+    * 根据条件搜索材料类型表
+    *
+    * @param  params 查询参数
+    * @throws BusinessCheckException
+    * @return
+    * */
+    @Override
+    public List<MtMaterialType> queryMaterialTypeListByParams(Map<String, Object> params) {
+        String status =  params.get("status") == null ? StatusEnum.ENABLED.getKey(): params.get("status").toString();
+        String storeId =  params.get("storeId") == null ? "" : params.get("storeId").toString();
+
+        LambdaQueryWrapper<MtMaterialType> lambdaQueryWrapper = Wrappers.lambdaQuery();
+        if (StringUtils.isNotBlank(status)) {
+            lambdaQueryWrapper.eq(MtMaterialType::getDeleteFlag, status);
+        }
+        if (StringUtils.isNotBlank(storeId)) {
+            lambdaQueryWrapper.and(wq -> wq
+                    .eq(MtMaterialType::getStoreId, 0)
+                    .or()
+                    .eq(MtMaterialType::getStoreId, storeId));
+        }
+
+        lambdaQueryWrapper.orderByAsc(MtMaterialType::getId);
+        List<MtMaterialType> dataList = mtMaterialTypeMapper.selectList(lambdaQueryWrapper);
+        return dataList;
+    }
+
+    /**
+     * 材料类型表列表查询
+     *
+     * @return 材料类型表列表
+     */
+    @SneakyThrows
+    @Override
+    public PageResult<MaterialTypeVo> selectMaterialTypeList(MaterialTypeSearchDto materialTypeSearchDto) {
+        LambdaQueryWrapper<MtMaterialType> queryWrapper = new LambdaQueryWrapper<>();
+        //获取查询条件信息
+        String name = materialTypeSearchDto.getName();
+        Integer enable = materialTypeSearchDto.getEnable();
+        int pageNo = materialTypeSearchDto.getPageNo() == null ? Constants.PAGE_NUMBER : materialTypeSearchDto.getPageNo();
+        int pageSize = materialTypeSearchDto.getPageSize() == null ? Constants.PAGE_SIZE : materialTypeSearchDto.getPageSize();
+       //如果材料分类名称不为空
+        if (StringUtils.isNotBlank(name)){
+            queryWrapper.eq(MtMaterialType::getName,name);
+        }
+        //如果是否启用字段不为空
+        if (Objects.nonNull(enable)){
+            queryWrapper.eq(MtMaterialType::getEnable,enable);
+        }
+        Integer storeId = AuthUserUtil.get().getStoreId();
+        if (Objects.nonNull(storeId) && storeId>0){
+            queryWrapper.eq(MtMaterialType::getStoreId,storeId);
+        }
+        CompletableFuture<Integer> future = CompletableFuture.supplyAsync(() -> this.baseMapper.selectCount(queryWrapper));
+        //构建分页
+        PageHelper.startPage(pageNo,pageSize);
+        //获取数据
+        List<MtMaterialType> mtMaterialTypes = this.baseMapper.selectList(queryWrapper);
+       //填充剩余字段
+        List<MaterialTypeVo> typeVoList = mtMaterialTypes.stream().map(mtMaterialType -> {
+            MaterialTypeVo materialTypeVo = new MaterialTypeVo();
+            BeanUtils.copyProperties(mtMaterialType, materialTypeVo);
+            //获取创建人
+            TAccount tAccount = accountMapper.selectById(mtMaterialType.getCreateUserId());
+            if (Objects.nonNull(tAccount)) {
+                //填充
+                materialTypeVo.setUpdateUserName(tAccount.getRealName());
+            }
+            //获取店铺
+            MtStore mtStore = storeMapper.selectById(mtMaterialType.getStoreId());
+            if (Objects.nonNull(mtStore)) {
+                //填充
+                materialTypeVo.setStoreName(mtStore.getName());
+            }
+            return materialTypeVo;
+        }).collect(Collectors.toList());
+        return PageResult.<MaterialTypeVo>builder().data(typeVoList).total(future.get()).build();
+    }
+
+    /**
+     * 根据id删除材料类型数据
+     *
+     * @return 结果
+     */
+    @Override
+    public ResponseObject deleteHandler(Long id) throws BusinessCheckException {
+
+        MtMaterialType materialType = this.baseMapper.selectById(id);
+        AccountInfo accountInfo = AuthUserUtil.get();
+        Integer storeId = accountInfo.getStoreId();
+        //校验是否在账号下的店铺操作
+        if (Objects.nonNull(storeId) && storeId>0){
+            if (!Long.valueOf(storeId).equals(materialType.getStoreId())){
+                throw new BusinessCheckException("该售后订单状态异常");
+            }
+        }
+        //更新数据(逻辑删除)
+        materialType.setDeleteFlag(1);
+        materialType.setUpdateUserId(String.valueOf(accountInfo.getId()));
+        boolean updateById = this.updateById(materialType);
+        return updateById?new ResponseObject(FrameworkConstants.HTTP_RESPONSE_CODE_SUCCESS, "操作成功", null):
+                new ResponseObject(1001, PropertiesUtil.getResponseErrorMessageByCode(1001), null);
+    }
+}

+ 4 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/OrderServiceImpl.java

@@ -713,9 +713,11 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
         String operator = null;
         Integer staffId = 0;
         String isVisitor = YesOrNoEnum.NO.getKey();
+        //获取当前操作结算的用户信息
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo != null) {
             operator = accountInfo.getAccountName();
+            //获取店员id
             staffId = accountInfo.getStaffId() == null ? 0 : accountInfo.getStaffId();
 
             if (param.getStaffId() != null && param.getStaffId() > 0) {
@@ -725,8 +727,10 @@ public class OrderServiceImpl extends ServiceImpl<MtOrderMapper, MtOrder> implem
             storeId = accountInfo.getStoreId();
             merchantId = accountInfo.getMerchantId();
             if (storeId <= 0) {
+                //获取商户信息
                 MtMerchant mtMerchant = merchantService.queryMerchantById(merchantId);
                 if (mtMerchant != null) {
+                    //通过商户号获取店铺id
                     MtStore mtStore = storeService.getDefaultStore(mtMerchant.getNo());
                     if (mtStore != null) {
                         storeId = mtStore.getId();

+ 12 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/TableCategoryServiceImpl.java

@@ -0,0 +1,12 @@
+package com.fuint.common.service.impl;
+
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.common.service.TableCategoryService;
+import com.fuint.repository.mapper.MtTableCategoryMapper;
+import com.fuint.repository.model.MtTableCategory;
+import org.springframework.stereotype.Service;
+
+@Service
+public class TableCategoryServiceImpl extends ServiceImpl<MtTableCategoryMapper,MtTableCategory> implements TableCategoryService {
+
+}

+ 52 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/TableInfoServiceImpl.java

@@ -0,0 +1,52 @@
+package com.fuint.common.service.impl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.IService;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.fuint.common.service.TableCategoryService;
+import com.fuint.common.service.TableInfoService;
+import com.fuint.repository.mapper.MtTableCategoryMapper;
+import com.fuint.repository.mapper.MtTableInfoMapper;
+import com.fuint.repository.model.MtTableCategory;
+import com.fuint.repository.model.MtTableInfo;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.util.CollectionUtils;
+
+import java.util.ArrayList;
+import java.util.List;
+import java.util.Objects;
+import java.util.Set;
+import java.util.stream.Collectors;
+
+/**
+ * 《餐桌》服务层
+ */
+@Service
+public class TableInfoServiceImpl extends ServiceImpl<MtTableInfoMapper, MtTableInfo> implements TableInfoService {
+
+	@Autowired
+	private MtTableCategoryMapper tableCategoryMapper;
+
+	/**
+	 * 获取餐桌列表
+	 *
+	 * @param storeId 店铺id
+	 * @return 结果
+	 */
+	@Override
+	public List<MtTableInfo> selectTableListByStoreId(Long storeId, Long categoryId) {
+		//通过店铺id获取店铺下的餐桌分类
+		MtTableCategory mtTableCategory = tableCategoryMapper.selectOne(new LambdaQueryWrapper<MtTableCategory>()
+				.select(MtTableCategory::getId,MtTableCategory::getStoreId)
+				.eq(MtTableCategory::getId, categoryId));
+		if (Objects.isNull(mtTableCategory) || !storeId.equals(mtTableCategory.getStoreId())) {
+			return new ArrayList<>();
+		}
+		//返回结果
+		return this.list(new LambdaQueryWrapper<MtTableInfo>()
+				.select(MtTableInfo::getId, MtTableInfo::getTableNumber)
+				.eq(MtTableInfo::getCategoryId, categoryId)
+				.eq(MtTableInfo::getTableStatus, "A"));
+	}
+}

+ 17 - 17
fuintBackend/fuint-application/src/main/java/com/fuint/common/service/impl/WeixinServiceImpl.java

@@ -113,7 +113,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public String getAccessToken(Integer merchantId, boolean isMinApp, boolean useCache) throws BusinessCheckException {
+    public String getAccessToken(Long merchantId, boolean isMinApp, boolean useCache) throws BusinessCheckException {
         String platForm = isMinApp == true ? "minApp" : "mp";
         String wxAppId = env.getProperty("weixin.official.appId");
         String wxAppSecret = env.getProperty("weixin.official.appSecret");
@@ -262,7 +262,7 @@ public class WeixinServiceImpl implements WeixinService {
             String orderSn = result.get("out_trade_no");
             logger.info("支付通知,xml = {}, orderSn = {}", xmlMsg, orderSn);
 
-            Integer storeId = 0;
+            Long storeId = 0L;
             String platform = PlatformTypeEnum.MP_WEIXIN.getCode();
             if (StringUtil.isNotEmpty(orderSn)) {
                 MtOrder mtOrder = orderService.getOrderInfoByOrderSn(orderSn);
@@ -328,7 +328,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public JSONObject getWxProfile(Integer merchantId, String code) throws BusinessCheckException {
+    public JSONObject getWxProfile(Long merchantId, String code) throws BusinessCheckException {
         String wxAppId = env.getProperty("wxpay.appId");
         String wxAppSecret = env.getProperty("wxpay.appSecret");
 
@@ -366,7 +366,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public JSONObject getWxOpenId(Integer merchantId, String code) throws BusinessCheckException {
+    public JSONObject getWxOpenId(Long merchantId, String code) throws BusinessCheckException {
         String wxAppId = env.getProperty("weixin.official.appId");
         String wxAppSecret = env.getProperty("weixin.official.appSecret");
 
@@ -455,7 +455,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public Boolean sendSubscribeMessage(Integer merchantId, Integer userId, String toUserOpenId, String key, String page, Map<String,Object> params, Date sendTime) throws BusinessCheckException {
+    public Boolean sendSubscribeMessage(Long merchantId, Long userId, String toUserOpenId, String key, String page, Map<String,Object> params, Date sendTime) throws BusinessCheckException {
         if (StringUtil.isEmpty(toUserOpenId) || StringUtil.isEmpty(key) || userId < 1) {
             return false;
         }
@@ -534,7 +534,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public Boolean doSendSubscribeMessage(Integer merchantId, String reqDataJsonStr) {
+    public Boolean doSendSubscribeMessage(Long merchantId, String reqDataJsonStr) {
         try {
             String url = "https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=" + getAccessToken(merchantId, true,true);
             String response = HttpRESTDataClient.requestPost(url, "application/json; charset=utf-8", reqDataJsonStr);
@@ -566,7 +566,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public Map<String, String> queryPaidOrder(Integer storeId, String transactionId, String orderSn) {
+    public Map<String, String> queryPaidOrder(Long storeId, String transactionId, String orderSn) {
         try {
             MtOrder mtOrder = orderService.getOrderInfoByOrderSn(orderSn);
             String platform = PlatformTypeEnum.MP_WEIXIN.getCode();
@@ -609,7 +609,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public Boolean doRefund(Integer storeId, String orderSn, BigDecimal totalAmount, BigDecimal refundAmount, String platform) throws BusinessCheckException {
+    public Boolean doRefund(Long storeId, String orderSn, BigDecimal totalAmount, BigDecimal refundAmount, String platform) throws BusinessCheckException {
         try {
             logger.info("WeixinService.doRefund orderSn = {}, totalFee = {}, refundFee = {}", orderSn, totalAmount, refundAmount);
             if (StringUtil.isEmpty(orderSn)) {
@@ -667,7 +667,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public String createQrCode(Integer merchantId, String type, Integer id, String page, Integer width) throws BusinessCheckException {
+    public String createQrCode(Long merchantId, String type, Long id, String page, Integer width) throws BusinessCheckException {
         try {
             String accessToken = getAccessToken(merchantId, true,true);
             if (StringUtil.isEmpty(accessToken)) {
@@ -743,7 +743,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public String createWxCard(Integer merchantId, String wxCardId) throws BusinessCheckException {
+    public String createWxCard(Long merchantId, String wxCardId) throws BusinessCheckException {
         String cardId = "";
         try {
             MtSetting mtSetting = settingService.querySettingByName(merchantId, SettingTypeEnum.USER.getKey(),UserSettingEnum.WX_MEMBER_CARD.getKey());
@@ -879,7 +879,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public String createCardQrCode(Integer merchantId, String cardId, String code) {
+    public String createCardQrCode(Long merchantId, String cardId, String code) {
         try {
             String accessToken = getAccessToken(merchantId, false, true);
             String url = "https://api.weixin.qq.com/card/qrcode/create?access_token="+accessToken;
@@ -929,7 +929,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public Boolean isOpenCard(Integer merchantId, String cardId, String openId) {
+    public Boolean isOpenCard(Long merchantId, String cardId, String openId) {
         try {
             String accessToken = getAccessToken(merchantId, false,true);
             String url = "https://api.weixin.qq.com/card/user/getcardlist?access_token="+accessToken;
@@ -965,7 +965,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @return
      * */
     @Override
-    public String createMiniAppLink(Integer merchantId, String path) {
+    public String createMiniAppLink(Long merchantId, String path) {
         String link = "";
         try {
             String accessToken = getAccessToken(merchantId, true,true);
@@ -1005,7 +1005,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @param platform 支付平台
      * @return
      * */
-    private Map<String, String> microPay(Integer storeId, Map<String, String> reqData, String ip, String platform) {
+    private Map<String, String> microPay(Long storeId, Map<String, String> reqData, String ip, String platform) {
         try {
             String orderSn = reqData.get("out_trade_no");
 
@@ -1091,7 +1091,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @param platform 支付平台
      * @return
      * */
-    private Map<String, String> jsapiPay(Integer storeId, Map<String, String> reqData, String ip, String platform) {
+    private Map<String, String> jsapiPay(Long storeId, Map<String, String> reqData, String ip, String platform) {
         try {
             logger.info("调用微信支付下单接口入参:{},请求平台:{}", JsonUtil.toJSONString(reqData), platform);
             // 获取支付配置
@@ -1145,7 +1145,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @param platform 支付平台
      * @return
      * */
-    private Map<String, String> wapPay(Integer storeId, Map<String, String> reqData, String ip, String platform) {
+    private Map<String, String> wapPay(Long storeId, Map<String, String> reqData, String ip, String platform) {
         try {
             logger.info("调用微信h5支付下单接口入参{},请求平台:{}", JsonUtil.toJSONString(reqData), platform);
             // 支付配置
@@ -1205,7 +1205,7 @@ public class WeixinServiceImpl implements WeixinService {
      * @throws BusinessCheckException
      * @return
      * */
-    private WxPayApiConfig getApiConfig(Integer storeId, String platform) throws BusinessCheckException {
+    private WxPayApiConfig getApiConfig(Long storeId, String platform) throws BusinessCheckException {
         WxPayApiConfig apiConfig;
         String mchId = wxPayBean.getMchId();
         String apiV2 = wxPayBean.getApiV2();

+ 16 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TimeUtils.java

@@ -1,7 +1,13 @@
 package com.fuint.common.util;
 
+import org.apache.commons.lang.StringUtils;
+
 import java.text.ParseException;
 import java.text.SimpleDateFormat;
+import java.time.LocalDateTime;
+import java.time.LocalTime;
+import java.time.format.DateTimeFormatter;
+import java.time.format.DateTimeParseException;
 import java.util.Date;
 import java.util.ArrayList;
 import java.util.Calendar;
@@ -106,4 +112,14 @@ public class TimeUtils {
         SimpleDateFormat format = new SimpleDateFormat("MM月dd日");
         return format.format(today);
     }
+
+    public static LocalDateTime[] getStartAndEndOfDay(String dateStr) throws DateTimeParseException {
+        if (StringUtils.isEmpty(dateStr)){
+            return null;
+        }
+        DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
+        LocalDateTime startDate = LocalDateTime.parse(dateStr, formatter).with(LocalTime.MIDNIGHT);
+        LocalDateTime endDate = startDate.plusDays(1).minusSeconds(1);
+        return new LocalDateTime[]{startDate, endDate};
+    }
 }

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/common/util/TokenUtil.java

@@ -68,7 +68,7 @@ public class TokenUtil {
         }
 
         stringBuilder.append(accountInfo.getId());
-        stringBuilder.append(new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date()) + "_");
+        stringBuilder.append(new SimpleDateFormat("yyyyMMddHHmmssSSS").format(new Date())).append("_");
         stringBuilder.append(new Random().nextInt((999999 - 111111 + 1)) + 111111);
         String token = MD5Util.getMD5(stringBuilder.toString()).replace("+", "1").replaceAll("&", "8");
 
@@ -168,4 +168,4 @@ public class TokenUtil {
         }
         return null;
     }
-}
+}

+ 32 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/MaterialTypeVo.java

@@ -0,0 +1,32 @@
+package com.fuint.common.vo;
+
+import com.baomidou.mybatisplus.annotation.IdType;
+import com.baomidou.mybatisplus.annotation.TableId;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+@Data
+public class MaterialTypeVo {
+	@ApiModelProperty("id")
+	private Long id;
+
+	@ApiModelProperty("类型名称")
+	private String name;
+
+	@ApiModelProperty("店铺名称")
+	private String storeName;
+
+	@ApiModelProperty("创建时间")
+	private Date createTime;
+
+	@ApiModelProperty("更新时间")
+	private Date updateTime;
+
+	@ApiModelProperty("更新的用户")
+	private String updateUserName;
+
+	@ApiModelProperty("是否启用 0 否 1是")
+	private Integer enable;
+}

+ 45 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/common/vo/MaterialVo.java

@@ -0,0 +1,45 @@
+package com.fuint.common.vo;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+/**
+ * 材料DTO
+ */
+@Getter
+@Setter
+public class MaterialVo {
+
+	@ApiModelProperty("材料表id")
+	private Long id;
+
+	@ApiModelProperty("材料文件/图片id")
+	private String fileId;
+
+	@ApiModelProperty("库存数量")
+	private Integer inventory;
+
+	@ApiModelProperty("材料编号")
+	private String materialNo;
+
+	@ApiModelProperty("材料类别")
+	private String materialType;
+
+	@ApiModelProperty("采购期数")
+	private Integer purchasePeriod;
+
+	@ApiModelProperty("店铺名称")
+	private String storeName;
+
+	@ApiModelProperty("保质期")
+	private Integer shelfLife;
+
+	@ApiModelProperty("规格")
+	private String specification;
+
+	@ApiModelProperty("单位")
+	private String unit;
+
+
+}

+ 2 - 5
fuintBackend/fuint-application/src/main/java/com/fuint/common/web/ClientUserInterceptor.java

@@ -38,7 +38,7 @@ public class ClientUserInterceptor implements AsyncHandlerInterceptor {
         String accessToken = request.getHeader("Access-Token");
         String requestURI = request.getRequestURI();
         if (StringUtils.isEmpty(accessToken)) {
-            if (requestURI.indexOf("/system/config") < 0) {
+            if (!requestURI.contains("/system/config")) {
                 response.setHeader("Content-Type", "application/json;charset=UTF-8");
                 response.getOutputStream().print("{\"code\":1001,\"message\":\"" + PropertiesUtil
                         .getResponseErrorMessageByCode(Constants.HTTP_RESPONSE_CODE_NOLOGIN) + "\",\"data\":null}");
@@ -54,10 +54,7 @@ public class ClientUserInterceptor implements AsyncHandlerInterceptor {
             if (!StringUtils.isEmpty(loginInfo.getToken()) && loginInfo.getToken().equals(accessToken)) {
                 // 更新活跃时间
                 boolean isActive = memberService.updateActiveTime(loginInfo.getId());
-                if (!isActive && requestURI.indexOf("/system/config") < 0) {
-                    return false;
-                }
-                return true;
+	            return isActive || requestURI.contains("/system/config");
             }
         } else {
             if (requestURI.indexOf("/system/config") > 0) {

+ 9 - 9
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendAccountController.java

@@ -163,7 +163,7 @@ public class BackendAccountController extends BaseController {
 
         AccountDto accountDto = null;
         if (userId > 0) {
-            TAccount tAccount = tAccountService.getAccountInfoById(userId.intValue());
+            TAccount tAccount = tAccountService.getAccountInfoById(userId);
             accountDto = new AccountDto();
             accountDto.setId(tAccount.getAcctId());
             accountDto.setAccountKey(tAccount.getAccountKey());
@@ -288,8 +288,8 @@ public class BackendAccountController extends BaseController {
             return getFailureResult(1001, "请先登录");
         }
 
-        TAccount tAccount = tAccountService.getAccountInfoById(id.intValue());
-        tAccount.setAcctId(id.intValue());
+        TAccount tAccount = tAccountService.getAccountInfoById(id);
+        tAccount.setAcctId(id);
         tAccount.setRealName(realName);
 
         if (StringUtil.isNotEmpty(accountName)) {
@@ -352,8 +352,8 @@ public class BackendAccountController extends BaseController {
         if (ids.length > 0) {
             for (int i = 0; i < ids.length; i++) {
                  if (StringUtil.isNotEmpty(ids[i])) {
-                     Integer userId = Integer.parseInt(ids[i]);
-                     TAccount tAccount = tAccountService.getAccountInfoById(userId.intValue());
+                     Long userId = Long.parseLong(ids[i]);
+                     TAccount tAccount = tAccountService.getAccountInfoById(userId);
                      if (tAccount == null) {
                          return getFailureResult(201, "账户不存在");
                      }
@@ -383,7 +383,7 @@ public class BackendAccountController extends BaseController {
     @PreAuthorize("@pms.hasPermission('system:account:edit')")
     public ResponseObject updateStatus(HttpServletRequest request, @RequestBody Map<String, Object> param) throws BusinessCheckException {
         String token = request.getHeader("Access-Token");
-        Integer userId = param.get("userId") == null ? 0 : Integer.parseInt(param.get("userId").toString());
+        Long userId = param.get("userId") == null ? 0 : Long.parseLong(param.get("userId").toString());
         Integer status = param.get("status") == null ? 0 : Integer.parseInt(param.get("status").toString());
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
@@ -391,7 +391,7 @@ public class BackendAccountController extends BaseController {
             return getFailureResult(1001, "请先登录");
         }
 
-        TAccount tAccount = tAccountService.getAccountInfoById(userId.intValue());
+        TAccount tAccount = tAccountService.getAccountInfoById(userId);
         if (tAccount == null) {
             return getFailureResult(201, "账户不存在");
         }
@@ -413,7 +413,7 @@ public class BackendAccountController extends BaseController {
     @PreAuthorize("@pms.hasPermission('system:account:edit')")
     public ResponseObject resetPwd(HttpServletRequest request, @RequestBody Map<String, Object> param) {
         String token = request.getHeader("Access-Token");
-        Integer userId = param.get("userId") == null ? 0 : Integer.parseInt(param.get("userId").toString());
+        Long userId = param.get("userId") == null ? 0 : Long.parseLong(param.get("userId").toString());
         String password = param.get("password") == null ? "" : param.get("password").toString();
 
         AccountInfo accountDto = TokenUtil.getAccountInfoByToken(token);
@@ -421,7 +421,7 @@ public class BackendAccountController extends BaseController {
             return getFailureResult(1001, "请先登录");
         }
 
-        TAccount tAccount = tAccountService.getAccountInfoById(userId.intValue());
+        TAccount tAccount = tAccountService.getAccountInfoById(userId);
         tAccount.setPassword(password);
 
         if (tAccount != null) {

+ 38 - 29
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCashierController.java

@@ -87,6 +87,12 @@ public class BackendCashierController extends BaseController {
     private MerchantService merchantService;
 
     /**
+     * 餐桌接口
+     */
+    private TableInfoService tableInfoService;
+
+
+    /**
      * 收银台初始化
      *
      * @param request HttpServletRequest对象
@@ -107,7 +113,7 @@ public class BackendCashierController extends BaseController {
             return getFailureResult(1001, "请先登录");
         }
 
-        TAccount accountInfo = accountService.getAccountInfoById(accountDto.getId());
+        TAccount accountInfo = accountService.getAccountInfoById(Math.toIntExact(accountDto.getId()));
         Integer storeId = (accountInfo.getStoreId() == null || accountInfo.getStoreId() < 1) ? 0 : accountInfo.getStoreId();
         MtStore storeInfo = null;
         if (storeId == null || storeId < 1) {
@@ -177,7 +183,7 @@ public class BackendCashierController extends BaseController {
         }
 
         TAccount accountInfo = accountService.getAccountInfoById(accountDto.getId());
-        Integer storeId = accountInfo.getStoreId();
+        Long storeId = accountInfo.getStoreId();
 
         if (storeId == null || storeId < 1) {
             MtMerchant mtMerchant = merchantService.queryMerchantById(accountInfo.getMerchantId());
@@ -388,42 +394,45 @@ public class BackendCashierController extends BaseController {
     @RequestMapping(value = "/getHangUpList", method = RequestMethod.GET)
     @CrossOrigin
     @PreAuthorize("@pms.hasPermission('cashier:index')")
-    public ResponseObject getHangUpList(HttpServletRequest request) throws BusinessCheckException {
+    public ResponseObject getHangUpList(HttpServletRequest request,@RequestParam(value = "categoryId",defaultValue = "1") Long categoryId) throws BusinessCheckException {
         String token = request.getHeader("Access-Token");
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
             return getFailureResult(1001, "请先登录");
         }
+        Integer storeId = accountInfo.getStoreId();
+        //获取餐桌列表
+        List<MtTableInfo> tableInfoList = tableInfoService.selectTableListByStoreId(Long.valueOf(storeId),categoryId);
 
         List<HangUpDto> dataList = new ArrayList<>();
 
-        for (int i = 0; i < 20; i++) {
-             String hangNo = "#0" + (i+1);
-             Map<String, Object> param = new HashMap<>();
-             param.put("hangNo", hangNo);
-             param.put("merchantId", accountInfo.getMerchantId());
-             param.put("storeId", accountInfo.getStoreId());
-             List<MtCart> cartList = cartService.queryCartListByParams(param);
-             HangUpDto dto = new HangUpDto();
-             dto.setIsEmpty(true);
-             if (cartList.size() > 0) {
-                 Integer userId = cartList.get(0).getUserId();
-                 String isVisitor = cartList.get(0).getIsVisitor();
-                 Map<String, Object> cartInfo = orderService.calculateCartGoods(accountInfo.getMerchantId(), userId, cartList, 0, false, PlatformTypeEnum.PC.getCode(), OrderModeEnum.ONESELF.getKey());
-                 dto.setNum(Integer.parseInt(cartInfo.get("totalNum").toString()));
-                 dto.setAmount(new BigDecimal(cartInfo.get("totalPrice").toString()));
-                 if (isVisitor.equals(YesOrNoEnum.NO.getKey())) {
-                     MtUser userInfo = memberService.queryMemberById(userId);
-                     dto.setMemberInfo(userInfo);
-                 }
-                 String dateTime = DateUtil.formatDate(cartList.get(0).getUpdateTime(), "yyyy-MM-dd HH:mm:ss");
-                 dto.setDateTime(dateTime);
-                 dto.setIsEmpty(false);
-             }
-             dto.setHangNo(hangNo);
-             dataList.add(dto);
-        }
+	    for (MtTableInfo mtTableInfo : tableInfoList) {
+		    String hangNo = mtTableInfo.getTableNumber();
+		    Map<String, Object> param = new HashMap<>();
+		    param.put("hangNo", hangNo);
+		    param.put("merchantId", accountInfo.getMerchantId());
+		    param.put("storeId", storeId);
+		    List<MtCart> cartList = cartService.queryCartListByParams(param);
+		    HangUpDto dto = new HangUpDto();
+		    dto.setIsEmpty(true);
+		    if (!cartList.isEmpty()) {
+			    Integer userId = cartList.get(0).getUserId();
+			    String isVisitor = cartList.get(0).getIsVisitor();
+			    Map<String, Object> cartInfo = orderService.calculateCartGoods(accountInfo.getMerchantId(), userId, cartList, 0, false, PlatformTypeEnum.PC.getCode(), OrderModeEnum.ONESELF.getKey());
+			    dto.setNum(Integer.parseInt(cartInfo.get("totalNum").toString()));
+			    dto.setAmount(new BigDecimal(cartInfo.get("totalPrice").toString()));
+			    if (isVisitor.equals(YesOrNoEnum.NO.getKey())) {
+				    MtUser userInfo = memberService.queryMemberById(userId);
+				    dto.setMemberInfo(userInfo);
+			    }
+			    String dateTime = DateUtil.formatDate(cartList.get(0).getUpdateTime(), "yyyy-MM-dd HH:mm:ss");
+			    dto.setDateTime(dateTime);
+			    dto.setIsEmpty(false);
+		    }
+		    dto.setHangNo(hangNo);
+		    dataList.add(dto);
+	    }
 
         return getSuccessResult(dataList);
     }

+ 2 - 2
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendCommonController.java

@@ -76,13 +76,13 @@ public class BackendCommonController extends BaseController {
     public ResponseObject createQrCode(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
         String token = request.getHeader("Access-Token");
         String type = params.get("type") != null ? params.get("type").toString() : "";
-        Integer id = params.get("id") == null ? 0 : Integer.parseInt(params.get("id").toString());
+        Long id = params.get("id") == null ? 0 : Long.parseLong(params.get("id").toString());
 
         AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
         if (accountInfo == null) {
             return getFailureResult(1001, "请先登录");
         }
-        Integer merchantId = accountInfo.getMerchantId() == null ? 0 : accountInfo.getMerchantId();
+        Long merchantId = accountInfo.getMerchantId() == null ? 0 : accountInfo.getMerchantId();
         String page = QrCodeEnum.STORE.getPage() + "?" + QrCodeEnum.STORE.getKey() + "Id=" + id;
         if (type.equals(QrCodeEnum.TABLE.getKey())) {
             page = QrCodeEnum.TABLE.getPage() + "?" + QrCodeEnum.TABLE.getKey() + "Id=" + id;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendGoodsController.java

@@ -187,7 +187,7 @@ public class BackendGoodsController extends BaseController {
      *
      * @param request
      * @param goodsId 商品ID
-     * @return
+     * @returnf
      */
     @ApiOperation(value = "删除商品")
     @RequestMapping(value = "/delete/{id}", method = RequestMethod.GET)

+ 176 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialController.java

@@ -0,0 +1,176 @@
+package com.fuint.module.backendApi.controller;
+
+import com.alipay.api.internal.util.StringUtils;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.MaterialDto;
+import com.fuint.common.dto.MaterialSearchDto;
+import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.TokenUtil;
+import com.fuint.common.vo.MaterialVo;
+import com.fuint.framework.FrameworkConstants;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.PageResult;
+import com.fuint.framework.web.ResponseObject;
+import com.fuint.common.service.MaterialService;
+import com.fuint.framework.exception.BusinessCheckException;
+import com.fuint.repository.model.MtMaterial;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.springframework.beans.BeanUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import java.util.Date;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Objects;
+
+/**
+ * 材料表管理类controller
+ *
+ * Created by PZG
+ * CopyRight https://www.fuint.cn
+ */
+@Api(tags="管理端-材料表相关接口")
+@RestController
+@AllArgsConstructor
+@RequestMapping(value = "/backendApi/material")
+public class BackendMaterialController extends BaseController {
+
+    /**
+     * 材料表服务接口
+     */
+    private MaterialService materialService;
+
+
+
+    /**
+     * 材料表列表查询
+     *
+     * @param  request HttpServletRequest对象
+     * @return 材料表列表
+     */
+    @ApiOperation(value = "材料表列表查询")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:list')")
+    public  ResponseObject list(HttpServletRequest request, MaterialSearchDto materialSearchDto) throws BusinessCheckException {
+
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            throw new BusinessCheckException("请先登录");
+        }
+        String storeId = materialSearchDto.getStoreId();
+        if (StringUtils.isEmpty(storeId)){
+            storeId = String.valueOf(accountInfo.getStoreId());
+            materialSearchDto.setStoreId(storeId);
+        }
+
+        PageResult<MaterialVo> result = materialService.selectMaterialList(materialSearchDto);
+        return new ResponseObject(FrameworkConstants.HTTP_RESPONSE_CODE_SUCCESS, "操作成功",result);
+    }
+
+    /**
+     * 更新材料表状态
+     *
+     * @return 结果
+     */
+    @ApiOperation(value = "更新材料表状态")
+    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:edit')")
+    public ResponseObject updateStatus(@RequestBody MaterialDto materialDto) throws BusinessCheckException {
+
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+        MtMaterial mtMaterial = new MtMaterial();
+        BeanUtils.copyProperties(materialDto,mtMaterial);
+        MtMaterial rawMaterial = materialService.queryMaterialById(mtMaterial.getId());
+        if (rawMaterial == null) {
+            return getFailureResult(201,"数据不存在");
+        }
+        mtMaterial.setUpdateTime(new Date());
+        mtMaterial.setUpdateUserId(String.valueOf(accountInfo.getId()));
+        materialService.updateMaterial(mtMaterial);
+
+        return getSuccessResult(true);
+    }
+
+    /**
+     * 保存材料表
+     *
+     * @return 结果
+     */
+    @ApiOperation(value = "保存材料表")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:list:add')")
+    public ResponseObject saveHandler(@RequestBody MaterialDto materialDto) throws BusinessCheckException {
+
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+        Integer storeId;
+        if(StringUtils.isEmpty(materialDto.getStoreId())){
+            storeId = AuthUserUtil.get().getStoreId();
+        }else{
+            storeId = Integer.valueOf(materialDto.getStoreId());
+        }
+
+        MtMaterial mtMaterial = new MtMaterial();
+        BeanUtils.copyProperties(materialDto,mtMaterial);
+        if (!Objects.isNull(mtMaterial.getId())) {
+            mtMaterial.setUpdateTime(new Date());
+            materialService.updateMaterial(mtMaterial);
+        } else {
+            mtMaterial.setStoreId(Long.valueOf(storeId));
+            mtMaterial.setCreateUserId(String.valueOf(accountInfo.getId()));
+            mtMaterial.setUpdateUserId(String.valueOf(accountInfo.getId()));
+            materialService.addMaterial(mtMaterial);
+        }
+        return getSuccessResult(true);
+    }
+
+    /**
+     * 获取材料表详情
+     *
+     * @param id 材料表id
+     * @return 结果
+     */
+    @ApiOperation(value = "获取材料表详情")
+    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:list')")
+    public ResponseObject info(HttpServletRequest request, @PathVariable("id") String id) throws BusinessCheckException {
+        String token = request.getHeader("Access-Token");
+        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+
+        MtMaterial materialInfo = materialService.queryMaterialById(Long.valueOf(id));
+
+        Map<String, Object> result = new HashMap<>();
+        result.put("materialInfo", materialInfo);
+
+        return getSuccessResult(result);
+    }
+
+    @ApiOperation(value = "删除材料数据")
+    @DeleteMapping(value = "/delete/{id}")
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:list:delete')")
+    public ResponseObject deleteById(@PathVariable("id") String id) throws BusinessCheckException {
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+         materialService.deleteMaterial(Long.valueOf(id), String.valueOf(accountInfo.getId()));
+        return getSuccessResult("删除成功");
+    }
+
+}

+ 130 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendMaterialTypeController.java

@@ -0,0 +1,130 @@
+package com.fuint.module.backendApi.controller;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.fuint.common.dto.AccountInfo;
+import com.fuint.common.dto.MaterialTypeDto;
+import com.fuint.common.dto.MaterialTypeSearchDto;
+import com.fuint.common.util.AuthUserUtil;
+import com.fuint.common.util.TokenUtil;
+import com.fuint.common.vo.MaterialTypeVo;
+import com.fuint.framework.web.BaseController;
+import com.fuint.framework.web.PageResult;
+import com.fuint.framework.web.ResponseObject;
+import com.fuint.common.service.MaterialTypeService;
+import com.fuint.framework.exception.BusinessCheckException;
+import com.fuint.repository.model.MtMaterialType;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import lombok.AllArgsConstructor;
+import org.apache.commons.lang.StringUtils;
+import org.springframework.beans.BeanUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+import javax.servlet.http.HttpServletRequest;
+import java.util.HashMap;
+import java.util.Map;
+
+/**
+ * 材料类型表管理类controller
+ *
+ * Created by PZG
+ * CopyRight https://www.fuint.cn
+ */
+@Api(tags="管理端-材料类型表相关接口")
+@RestController
+@AllArgsConstructor
+@RequestMapping(value = "/backendApi/material_type")
+public class BackendMaterialTypeController extends BaseController {
+
+    /**
+     * 材料类型表服务接口
+     */
+    private MaterialTypeService materialTypeService;
+
+    /**
+     * 材料类型表列表查询
+     *
+     * @return 材料类型表列表
+     */
+    @ApiOperation(value = "材料类型表列表查询")
+    @RequestMapping(value = "/list", method = RequestMethod.GET)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:type:list')")
+    public PageResult<MaterialTypeVo> list(MaterialTypeSearchDto materialTypeSearchDto) throws BusinessCheckException {
+
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            throw  new BusinessCheckException("用户未登录");
+        }
+
+        return materialTypeService.selectMaterialTypeList(materialTypeSearchDto);
+    }
+
+    /**
+     * 更新材料类型表状态
+     *
+     * @return
+     */
+    @ApiOperation(value = "更新材料类型表状态")
+    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material_type:edit')")
+    public ResponseObject updateStatus(@RequestBody MaterialTypeDto mtMaterialTypeDto) throws BusinessCheckException {
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+        //校验id合法性
+        MtMaterialType rawMtMaterialType = materialTypeService.queryMaterialTypeById(mtMaterialTypeDto.getId());
+        if (rawMtMaterialType == null) {
+            return getFailureResult(201,"数据不存在");
+        }
+        MtMaterialType newMtMaterialType = new MtMaterialType();
+        //只允许更新这三个字段
+        newMtMaterialType.setName(mtMaterialTypeDto.getName());
+        newMtMaterialType.setProject(mtMaterialTypeDto.getProject());
+        newMtMaterialType.setEnable(mtMaterialTypeDto.getEnable());
+        materialTypeService.updateMaterialType(newMtMaterialType);
+
+        return getSuccessResult(true);
+    }
+
+    /**
+     * 保存材料类型表
+     *
+     * @return
+     */
+    @ApiOperation(value = "保存材料类型表")
+    @RequestMapping(value = "/save", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material:type:add')")
+    public ResponseObject saveHandler(@RequestBody MaterialTypeDto mtMaterialTypeDto) throws BusinessCheckException {
+
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+        MtMaterialType mtMaterialType = new MtMaterialType();
+        BeanUtils.copyProperties(mtMaterialTypeDto,mtMaterialType);
+        return materialTypeService.addMaterialType(mtMaterialType);
+    }
+
+    /**
+     * 根据id删除材料类型数据
+     *
+     * @return 结果
+     */
+    @ApiOperation(value = "删除材料类型数据")
+    @RequestMapping(value = "/delete/{id}", method = RequestMethod.POST)
+    @CrossOrigin
+    @PreAuthorize("@pms.hasPermission('material_type:delete')")
+    public ResponseObject deleteHandler(@PathVariable Long id) throws BusinessCheckException {
+
+        AccountInfo accountInfo = AuthUserUtil.get();
+        if (accountInfo == null) {
+            return getFailureResult(1001, "请先登录");
+        }
+        return materialTypeService.deleteHandler(id);
+    }
+
+}

+ 280 - 279
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/controller/BackendStoreController.java

@@ -23,6 +23,7 @@ import io.swagger.annotations.ApiOperation;
 import lombok.AllArgsConstructor;
 import org.springframework.security.access.prepost.PreAuthorize;
 import org.springframework.web.bind.annotation.*;
+
 import javax.servlet.http.HttpServletRequest;
 import java.util.HashMap;
 import java.util.List;
@@ -30,291 +31,291 @@ import java.util.Map;
 
 /**
  * 店铺管理类controller
- *
+ * <p>
  * Created by FSQ
  * CopyRight https://www.fuint.cn
  */
-@Api(tags="管理端-店铺相关接口")
+@Api(tags = "管理端-店铺相关接口")
 @RestController
 @AllArgsConstructor
 @RequestMapping(value = "/backendApi/store")
 public class BackendStoreController extends BaseController {
 
-    /**
-     * 店铺服务接口
-     */
-    private StoreService storeService;
-
-    /**
-     * 商户接口
-     */
-    private MerchantService merchantService;
-
-    /**
-     * 系统设置服务接口
-     * */
-    private SettingService settingService;
-
-    /**
-     * 获取店铺列表
-     *
-     * @param request HttpServletRequest对象
-     * @return 店铺列表
-     */
-    @ApiOperation(value = "获取店铺列表")
-    @RequestMapping(value = "/list", method = RequestMethod.GET)
-    @CrossOrigin
-    @PreAuthorize("@pms.hasPermission('store:list')")
-    public ResponseObject list(HttpServletRequest request) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        Integer page = request.getParameter("page") == null ? Constants.PAGE_NUMBER : Integer.parseInt(request.getParameter("page"));
-        Integer pageSize = request.getParameter("pageSize") == null ? Constants.PAGE_SIZE : Integer.parseInt(request.getParameter("pageSize"));
-
-        String storeName = request.getParameter("name");
-        String storeStatus = request.getParameter("status");
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        PaginationRequest paginationRequest = new PaginationRequest();
-        paginationRequest.setCurrentPage(page);
-        paginationRequest.setPageSize(pageSize);
-
-        Map<String, Object> params = new HashMap<>();
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            params.put("merchantId", accountInfo.getMerchantId());
-        }
-        if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
-            params.put("storeId", accountInfo.getStoreId());
-        }
-        if (StringUtil.isNotEmpty(storeName)) {
-            params.put("name", storeName);
-        }
-        if (StringUtil.isNotEmpty(storeStatus)) {
-            params.put("status", storeStatus);
-        }
-        paginationRequest.setSearchParams(params);
-        PaginationResponse<StoreDto> paginationResponse = storeService.queryStoreListByPagination(paginationRequest);
-
-        Map<String, Object> param = new HashMap<>();
-        param.put("status", StatusEnum.ENABLED.getKey());
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            param.put("merchantId", accountInfo.getMerchantId());
-        }
-        if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
-            param.put("storeId", accountInfo.getStoreId());
-        }
-        List<MtMerchant> merchantList = merchantService.queryMerchantByParams(param);
-        String imagePath = settingService.getUploadBasePath();
-
-        Map<String, Object> result = new HashMap<>();
-        result.put("paginationResponse", paginationResponse);
-        result.put("merchantList", merchantList);
-        result.put("imagePath", imagePath);
-
-        return getSuccessResult(result);
-    }
-
-    /**
-     * 搜索店铺
-     * */
-    @ApiOperation(value = "搜索店铺")
-    @RequestMapping(value = "/searchStore",  method = RequestMethod.GET)
-    @CrossOrigin
-    public ResponseObject search(HttpServletRequest request) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        String merchantId = request.getParameter("merchantId") == null ? "" : request.getParameter("merchantId");
-        String storeId = request.getParameter("id") == null ? "" : request.getParameter("id");
-        String storeName = request.getParameter("name") == null ? "" : request.getParameter("name");
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
-            storeId = accountInfo.getStoreId().toString();
-        }
-
-        Map<String, Object> paramsStore = new HashMap<>();
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            merchantId = accountInfo.getMerchantId().toString();
-        }
-        if (StringUtil.isNotEmpty(merchantId)) {
-            paramsStore.put("merchantId", merchantId);
-        }
-        if (StringUtil.isNotEmpty(storeId)) {
-            paramsStore.put("storeId", storeId);
-        }
-        if (StringUtil.isNotEmpty(storeName)) {
-            paramsStore.put("name", storeName);
-        }
-
-        paramsStore.put("status", StatusEnum.ENABLED.getKey());
-        List<MtStore> storeList = storeService.queryStoresByParams(paramsStore);
-        Map<String, Object> result = new HashMap<>();
-        result.put("storeList", storeList);
-
-        return getSuccessResult(result);
-    }
-
-    /**
-     * 更新店铺状态
-     *
-     * @param request
-     * @return
-     */
-    @ApiOperation(value = "更新店铺状态")
-    @RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
-    @CrossOrigin
-    @PreAuthorize("@pms.hasPermission('store:add')")
-    public ResponseObject updateStatus(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey();
-        Integer storeId = params.get("storeId") == null ? 0 : Integer.parseInt(params.get("storeId").toString());
-
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        String operator = accountInfo.getAccountName();
-        storeService.updateStatus(storeId, operator, status);
-
-        return getSuccessResult(true);
-    }
-
-    /**
-     * 保存店铺
-     *
-     * @param request HttpServletRequest对象
-     * @return
-     */
-    @ApiOperation(value = "保存店铺")
-    @RequestMapping(value = "/save", method = RequestMethod.POST)
-    @CrossOrigin
-    @PreAuthorize("@pms.hasPermission('store:add')")
-    public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        StoreDto storeInfo = new StoreDto();
-        String storeId = params.get("id").toString();
-        String storeName = CommonUtil.replaceXSS(params.get("name").toString());
-        String contact = CommonUtil.replaceXSS(params.get("contact").toString());
-        String phone = CommonUtil.replaceXSS(params.get("phone").toString());
-        String description = params.get("description") == null ? "" : CommonUtil.replaceXSS(params.get("description").toString());
-        String isDefault = params.get("isDefault") == null ? YesOrNoEnum.NO.getKey() : CommonUtil.replaceXSS(params.get("isDefault").toString());
-        String address = params.get("address") == null ? "" : CommonUtil.replaceXSS(params.get("address").toString());
-        String hours = params.get("hours") == null ? "" : CommonUtil.replaceXSS(params.get("hours").toString());
-        String latitude = params.get("latitude") == null ? "" : CommonUtil.replaceXSS(params.get("latitude").toString());
-        String longitude = params.get("longitude") == null ? "" : CommonUtil.replaceXSS(params.get("longitude").toString());
-        String wxMchId = params.get("wxMchId") == null ? null : CommonUtil.replaceXSS(params.get("wxMchId").toString());
-        String wxApiV2 = params.get("wxApiV2") == null ? null : CommonUtil.replaceXSS(params.get("wxApiV2").toString());
-        String wxCertPath = params.get("wxCertPath") == null ? null : CommonUtil.replaceXSS(params.get("wxCertPath").toString());
-        String alipayAppId = params.get("alipayAppId") == null ? null : CommonUtil.replaceXSS(params.get("alipayAppId").toString());
-        String alipayPrivateKey = params.get("alipayPrivateKey") == null ? null : CommonUtil.replaceXSS(params.get("alipayPrivateKey").toString());
-        String alipayPublicKey = params.get("alipayPublicKey") == null ? null : CommonUtil.replaceXSS(params.get("alipayPublicKey").toString());
-        String logo = params.get("logo") == null ? "" : CommonUtil.replaceXSS(params.get("logo").toString());
-        String license = params.get("license") == null ? "" : CommonUtil.replaceXSS(params.get("license").toString());
-        String creditCode = params.get("creditCode") == null ? "" : CommonUtil.replaceXSS(params.get("creditCode").toString());
-        String bankName = params.get("bankName") == null ? "" : CommonUtil.replaceXSS(params.get("bankName").toString());
-        String bankCardName = params.get("bankCardName") == null ? "" : CommonUtil.replaceXSS(params.get("bankCardName").toString());
-        String bankCardNo = params.get("bankCardNo") == null ? "" : CommonUtil.replaceXSS(params.get("bankCardNo").toString());
-        String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey();
-        String merchantId = params.get("merchantId").toString();
-
-        if ((StringUtil.isEmpty(latitude) || StringUtil.isEmpty(longitude)) && StringUtil.isNotEmpty(address)) {
-            Map<String, Object> latAndLng = CommonUtil.getLatAndLngByAddress(address);
-            latitude = latAndLng.get("lat").toString();
-            longitude = latAndLng.get("lng").toString();
-        }
-
-        if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
-            if (StringUtil.isEmpty(storeId)) {
-                return getFailureResult(201, "店铺帐号不能新增店铺,请使用商户帐号添加!");
-            }
-            storeId = accountInfo.getStoreId().toString();
-        }
-        if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
-            merchantId = accountInfo.getMerchantId().toString();
-        }
-
-        storeInfo.setName(storeName);
-        storeInfo.setLogo(logo);
-        storeInfo.setContact(contact);
-        storeInfo.setPhone(phone);
-        storeInfo.setDescription(description);
-        storeInfo.setIsDefault(isDefault);
-        storeInfo.setAddress(address);
-        storeInfo.setHours(hours);
-        storeInfo.setLatitude(latitude);
-        storeInfo.setLongitude(longitude);
-        storeInfo.setStatus(status);
-        storeInfo.setWxMchId(wxMchId);
-        storeInfo.setWxApiV2(wxApiV2);
-        storeInfo.setWxCertPath(wxCertPath);
-        storeInfo.setLicense(license);
-        storeInfo.setCreditCode(creditCode);
-        storeInfo.setBankName(bankName);
-        storeInfo.setBankCardName(bankCardName);
-        storeInfo.setBankCardNo(bankCardNo);
-        storeInfo.setAlipayAppId(alipayAppId);
-        storeInfo.setAlipayPrivateKey(alipayPrivateKey);
-        storeInfo.setAlipayPublicKey(alipayPublicKey);
-        if (StringUtil.isNotEmpty(merchantId)) {
-            storeInfo.setMerchantId(Integer.parseInt(merchantId));
-        }
-        if (StringUtil.isEmpty(storeName)) {
-            return getFailureResult(201, "店铺名称不能为空");
-        } else {
-            if (!StringUtil.isNotEmpty(storeName)) {
-                StoreDto storeDto = storeService.queryStoreByName(storeName);
-                if (null != storeDto && storeDto.getName().equals(storeName) && !storeDto.getId().equals(storeId)) {
-                    return getFailureResult(201, "该店铺名称已经存在");
-                }
-            }
-        }
-
-        // 修改店铺
-        if (StringUtil.isNotEmpty(storeId)) {
-            storeInfo.setId(Integer.parseInt(storeId));
-        }
-
-        String operator = accountInfo.getAccountName();
-        storeInfo.setOperator(operator);
-        storeService.saveStore(storeInfo);
-
-        return getSuccessResult(true);
-    }
-
-    /**
-     * 获取店铺详情
-     *
-     * @param id
-     * @return
-     */
-    @ApiOperation(value = "获取店铺详情")
-    @RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
-    @CrossOrigin
-    @PreAuthorize("@pms.hasPermission('store:list')")
-    public ResponseObject getStoreInfo(HttpServletRequest request, @PathVariable("id") Integer id) throws BusinessCheckException {
-        String token = request.getHeader("Access-Token");
-        AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
-        if (accountInfo == null) {
-            return getFailureResult(1001, "请先登录");
-        }
-
-        StoreDto storeInfo = storeService.queryStoreDtoById(id);
-
-        Map<String, Object> result = new HashMap<>();
-        result.put("storeInfo", storeInfo);
-
-        return getSuccessResult(result);
-    }
+	/**
+	 * 店铺服务接口
+	 */
+	private StoreService storeService;
+
+	/**
+	 * 商户接口
+	 */
+	private MerchantService merchantService;
+
+	/**
+	 * 系统设置服务接口
+	 */
+	private SettingService settingService;
+
+	/**
+	 * 获取店铺列表
+	 *
+	 * @param request HttpServletRequest对象
+	 * @return 店铺列表
+	 */
+	@ApiOperation(value = "获取店铺列表")
+	@RequestMapping(value = "/list", method = RequestMethod.GET)
+	@CrossOrigin
+	@PreAuthorize("@pms.hasPermission('store:list')")
+	public ResponseObject list(HttpServletRequest request) throws BusinessCheckException {
+		String token = request.getHeader("Access-Token");
+		Integer page = request.getParameter("page") == null ? Constants.PAGE_NUMBER : Integer.parseInt(request.getParameter("page"));
+		Integer pageSize = request.getParameter("pageSize") == null ? Constants.PAGE_SIZE : Integer.parseInt(request.getParameter("pageSize"));
+
+		String storeName = request.getParameter("name");
+		String storeStatus = request.getParameter("status");
+
+		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
+		if (accountInfo == null) {
+			return getFailureResult(1001, "请先登录");
+		}
+
+		PaginationRequest paginationRequest = new PaginationRequest();
+		paginationRequest.setCurrentPage(page);
+		paginationRequest.setPageSize(pageSize);
+
+		Map<String, Object> params = new HashMap<>();
+		if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
+			params.put("merchantId", accountInfo.getMerchantId());
+		}
+		if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
+			params.put("storeId", accountInfo.getStoreId());
+		}
+		if (StringUtil.isNotEmpty(storeName)) {
+			params.put("name", storeName);
+		}
+		if (StringUtil.isNotEmpty(storeStatus)) {
+			params.put("status", storeStatus);
+		}
+		paginationRequest.setSearchParams(params);
+		PaginationResponse<StoreDto> paginationResponse = storeService.queryStoreListByPagination(paginationRequest);
+
+		Map<String, Object> param = new HashMap<>();
+		param.put("status", StatusEnum.ENABLED.getKey());
+		if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
+			param.put("merchantId", accountInfo.getMerchantId());
+		}
+		if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
+			param.put("storeId", accountInfo.getStoreId());
+		}
+		List<MtMerchant> merchantList = merchantService.queryMerchantByParams(param);
+		String imagePath = settingService.getUploadBasePath();
+
+		Map<String, Object> result = new HashMap<>();
+		result.put("paginationResponse", paginationResponse);
+		result.put("merchantList", merchantList);
+		result.put("imagePath", imagePath);
+
+		return getSuccessResult(result);
+	}
+
+	/**
+	 * 搜索店铺
+	 */
+	@ApiOperation(value = "搜索店铺")
+	@RequestMapping(value = "/searchStore", method = RequestMethod.GET)
+	@CrossOrigin
+	public ResponseObject search(HttpServletRequest request) throws BusinessCheckException {
+		String token = request.getHeader("Access-Token");
+		String merchantId = request.getParameter("merchantId") == null ? "" : request.getParameter("merchantId");
+		String storeId = request.getParameter("id") == null ? "" : request.getParameter("id");
+		String storeName = request.getParameter("name") == null ? "" : request.getParameter("name");
+
+		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
+		if (accountInfo == null) {
+			return getFailureResult(1001, "请先登录");
+		}
+
+		if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
+			storeId = accountInfo.getStoreId().toString();
+		}
+
+		Map<String, Object> paramsStore = new HashMap<>();
+		if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
+			merchantId = accountInfo.getMerchantId().toString();
+		}
+		if (StringUtil.isNotEmpty(merchantId)) {
+			paramsStore.put("merchantId", merchantId);
+		}
+		if (StringUtil.isNotEmpty(storeId)) {
+			paramsStore.put("storeId", storeId);
+		}
+		if (StringUtil.isNotEmpty(storeName)) {
+			paramsStore.put("name", storeName);
+		}
+
+		paramsStore.put("status", StatusEnum.ENABLED.getKey());
+		List<MtStore> storeList = storeService.queryStoresByParams(paramsStore);
+		Map<String, Object> result = new HashMap<>();
+		result.put("storeList", storeList);
+
+		return getSuccessResult(result);
+	}
+
+	/**
+	 * 更新店铺状态
+	 *
+	 * @param request
+	 * @return
+	 */
+	@ApiOperation(value = "更新店铺状态")
+	@RequestMapping(value = "/updateStatus", method = RequestMethod.POST)
+	@CrossOrigin
+	@PreAuthorize("@pms.hasPermission('store:add')")
+	public ResponseObject updateStatus(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
+		String token = request.getHeader("Access-Token");
+		String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey();
+		Long storeId = params.get("storeId") == null ? 0 : Long.parseLong(params.get("storeId").toString());
+
+		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
+		if (accountInfo == null) {
+			return getFailureResult(1001, "请先登录");
+		}
+
+		String operator = accountInfo.getAccountName();
+		storeService.updateStatus(storeId, operator, status);
+
+		return getSuccessResult(true);
+	}
+
+	/**
+	 * 保存店铺
+	 *
+	 * @param request HttpServletRequest对象
+	 * @return
+	 */
+	@ApiOperation(value = "保存店铺")
+	@RequestMapping(value = "/save", method = RequestMethod.POST)
+	@CrossOrigin
+	@PreAuthorize("@pms.hasPermission('store:add')")
+	public ResponseObject saveHandler(HttpServletRequest request, @RequestBody Map<String, Object> params) throws BusinessCheckException {
+		String token = request.getHeader("Access-Token");
+		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
+		if (accountInfo == null) {
+			return getFailureResult(1001, "请先登录");
+		}
+
+		StoreDto storeInfo = new StoreDto();
+		String storeId = params.get("id").toString();
+		String storeName = CommonUtil.replaceXSS(params.get("name").toString());
+		String contact = CommonUtil.replaceXSS(params.get("contact").toString());
+		String phone = CommonUtil.replaceXSS(params.get("phone").toString());
+		String description = params.get("description") == null ? "" : CommonUtil.replaceXSS(params.get("description").toString());
+		String isDefault = params.get("isDefault") == null ? YesOrNoEnum.NO.getKey() : CommonUtil.replaceXSS(params.get("isDefault").toString());
+		String address = params.get("address") == null ? "" : CommonUtil.replaceXSS(params.get("address").toString());
+		String hours = params.get("hours") == null ? "" : CommonUtil.replaceXSS(params.get("hours").toString());
+		String latitude = params.get("latitude") == null ? "" : CommonUtil.replaceXSS(params.get("latitude").toString());
+		String longitude = params.get("longitude") == null ? "" : CommonUtil.replaceXSS(params.get("longitude").toString());
+		String wxMchId = params.get("wxMchId") == null ? null : CommonUtil.replaceXSS(params.get("wxMchId").toString());
+		String wxApiV2 = params.get("wxApiV2") == null ? null : CommonUtil.replaceXSS(params.get("wxApiV2").toString());
+		String wxCertPath = params.get("wxCertPath") == null ? null : CommonUtil.replaceXSS(params.get("wxCertPath").toString());
+		String alipayAppId = params.get("alipayAppId") == null ? null : CommonUtil.replaceXSS(params.get("alipayAppId").toString());
+		String alipayPrivateKey = params.get("alipayPrivateKey") == null ? null : CommonUtil.replaceXSS(params.get("alipayPrivateKey").toString());
+		String alipayPublicKey = params.get("alipayPublicKey") == null ? null : CommonUtil.replaceXSS(params.get("alipayPublicKey").toString());
+		String logo = params.get("logo") == null ? "" : CommonUtil.replaceXSS(params.get("logo").toString());
+		String license = params.get("license") == null ? "" : CommonUtil.replaceXSS(params.get("license").toString());
+		String creditCode = params.get("creditCode") == null ? "" : CommonUtil.replaceXSS(params.get("creditCode").toString());
+		String bankName = params.get("bankName") == null ? "" : CommonUtil.replaceXSS(params.get("bankName").toString());
+		String bankCardName = params.get("bankCardName") == null ? "" : CommonUtil.replaceXSS(params.get("bankCardName").toString());
+		String bankCardNo = params.get("bankCardNo") == null ? "" : CommonUtil.replaceXSS(params.get("bankCardNo").toString());
+		String status = params.get("status") != null ? params.get("status").toString() : StatusEnum.ENABLED.getKey();
+		String merchantId = params.get("merchantId").toString();
+
+		if ((StringUtil.isEmpty(latitude) || StringUtil.isEmpty(longitude)) && StringUtil.isNotEmpty(address)) {
+			Map<String, Object> latAndLng = CommonUtil.getLatAndLngByAddress(address);
+			latitude = latAndLng.get("lat").toString();
+			longitude = latAndLng.get("lng").toString();
+		}
+
+		if (accountInfo.getStoreId() != null && accountInfo.getStoreId() > 0) {
+			if (StringUtil.isEmpty(storeId)) {
+				return getFailureResult(201, "店铺帐号不能新增店铺,请使用商户帐号添加!");
+			}
+			storeId = accountInfo.getStoreId().toString();
+		}
+		if (accountInfo.getMerchantId() != null && accountInfo.getMerchantId() > 0) {
+			merchantId = accountInfo.getMerchantId().toString();
+		}
+
+		storeInfo.setName(storeName);
+		storeInfo.setLogo(logo);
+		storeInfo.setContact(contact);
+		storeInfo.setPhone(phone);
+		storeInfo.setDescription(description);
+		storeInfo.setIsDefault(isDefault);
+		storeInfo.setAddress(address);
+		storeInfo.setHours(hours);
+		storeInfo.setLatitude(latitude);
+		storeInfo.setLongitude(longitude);
+		storeInfo.setStatus(status);
+		storeInfo.setWxMchId(wxMchId);
+		storeInfo.setWxApiV2(wxApiV2);
+		storeInfo.setWxCertPath(wxCertPath);
+		storeInfo.setLicense(license);
+		storeInfo.setCreditCode(creditCode);
+		storeInfo.setBankName(bankName);
+		storeInfo.setBankCardName(bankCardName);
+		storeInfo.setBankCardNo(bankCardNo);
+		storeInfo.setAlipayAppId(alipayAppId);
+		storeInfo.setAlipayPrivateKey(alipayPrivateKey);
+		storeInfo.setAlipayPublicKey(alipayPublicKey);
+		if (StringUtil.isNotEmpty(merchantId)) {
+			storeInfo.setMerchantId(Integer.parseInt(merchantId));
+		}
+		if (StringUtil.isEmpty(storeName)) {
+			return getFailureResult(201, "店铺名称不能为空");
+		} else {
+			if (!StringUtil.isNotEmpty(storeName)) {
+				StoreDto storeDto = storeService.queryStoreByName(storeName);
+				if (null != storeDto && storeDto.getName().equals(storeName) && !storeDto.getId().equals(storeId)) {
+					return getFailureResult(201, "该店铺名称已经存在");
+				}
+			}
+		}
+
+		// 修改店铺
+		if (StringUtil.isNotEmpty(storeId)) {
+			storeInfo.setId(Long.parseLong(storeId));
+		}
+
+		String operator = accountInfo.getAccountName();
+		storeInfo.setOperator(operator);
+		storeService.saveStore(storeInfo);
+
+		return getSuccessResult(true);
+	}
+
+	/**
+	 * 获取店铺详情
+	 *
+	 * @param id
+	 * @return
+	 */
+	@ApiOperation(value = "获取店铺详情")
+	@RequestMapping(value = "/info/{id}", method = RequestMethod.GET)
+	@CrossOrigin
+	@PreAuthorize("@pms.hasPermission('store:list')")
+	public ResponseObject getStoreInfo(HttpServletRequest request, @PathVariable("id") Long id) throws BusinessCheckException {
+		String token = request.getHeader("Access-Token");
+		AccountInfo accountInfo = TokenUtil.getAccountInfoByToken(token);
+		if (accountInfo == null) {
+			return getFailureResult(1001, "请先登录");
+		}
+
+		StoreDto storeInfo = storeService.queryStoreDtoById(id);
+
+		Map<String, Object> result = new HashMap<>();
+		result.put("storeInfo", storeInfo);
+
+		return getSuccessResult(result);
+	}
 }

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/AccountInfoRequest.java

@@ -13,7 +13,7 @@ import java.io.Serializable;
 public class AccountInfoRequest implements Serializable {
 
     @ApiModelProperty(value="账号ID", name="id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty(value="用户名", name="accountName")
     private String accountName;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/CommissionCashRequest.java

@@ -14,7 +14,7 @@ import java.io.Serializable;
 public class CommissionCashRequest implements Serializable {
 
     @ApiModelProperty(value="ID", name="id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty(value="分佣金额", name="amount")
     private String amount;

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/backendApi/request/CommissionLogRequest.java

@@ -14,7 +14,7 @@ import java.io.Serializable;
 public class CommissionLogRequest implements Serializable {
 
     @ApiModelProperty(value="ID", name="id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty(value="结算uuid", name="settleUuid")
     private String settleUuid;

+ 1 - 0
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/controller/ClientCartController.java

@@ -41,6 +41,7 @@ import java.util.Map;
 @RequestMapping(value = "/clientApi/cart")
 public class ClientCartController extends BaseController {
 
+
     private MtGoodsSkuMapper mtGoodsSkuMapper;
 
     /**

+ 1 - 1
fuintBackend/fuint-application/src/main/java/com/fuint/module/clientApi/request/MyCouponRequest.java

@@ -14,7 +14,7 @@ import java.io.Serializable;
 public class MyCouponRequest implements Serializable {
 
     @ApiModelProperty(value="卡券ID", name="id")
-    private Integer id;
+    private Long id;
 
     @ApiModelProperty(value="会员卡券ID", name="userCouponId")
     private Integer userCouponId;

+ 7 - 2
fuintBackend/fuint-application/src/main/resources/application.properties

@@ -1,7 +1,7 @@
 # 基本配置
 server.port=8080
-env.profile=dev
-env.properties.path=C:/Code/fuintCatering/fuintBackend/configure/
+env.profile=test
+env.properties.path=E:/MagicalJourney/Projects/store/store-windows-main/store-windows/fuintBackend/configure
 
 # 数据库配置
 spring.datasource.type=com.zaxxer.hikari.HikariDataSource
@@ -23,3 +23,8 @@ mybatis-plus.mapper-locations = classpath*:/mapper/*.xml
 
 # 默认时间格式
 spring.jackson.date-format=yyyy-MM-dd HH:mm:ss
+
+
+mybatis-plus.configuration.log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+mybatis-plus.global-config.db-config.logic-delete-value=1
+mybatis-plus.global-config.db-config.logic-not-delete-value=0

+ 24 - 0
fuintBackend/fuint-framework/src/main/java/com/fuint/framework/web/PageResult.java

@@ -0,0 +1,24 @@
+package com.fuint.framework.web;
+
+import com.beust.jcommander.internal.Lists;
+import lombok.Builder;
+import lombok.Getter;
+import lombok.Setter;
+import lombok.ToString;
+
+import java.util.List;
+
+/**
+ * 分页返回数据实体
+ *
+ * @param <T>
+ */
+@Getter
+@Setter
+@ToString
+@Builder
+public class PageResult<T> {
+	private List<T> data;
+
+	private int total;
+}

+ 1 - 1
fuintBackend/fuint-repository/src/main/java/com/fuint/repository/bean/GoodsTopBean.java

@@ -25,7 +25,7 @@ public class GoodsTopBean implements Serializable {
      * 商品ID
      */
     @ApiModelProperty("商品ID")
-    private Integer id;
+    private Long id;
 
     /**
      * 商品名称

+ 1 - 1
fuintBackend/fuint-repository/src/main/java/com/fuint/repository/bean/MemberTopBean.java

@@ -24,7 +24,7 @@ public class MemberTopBean implements Serializable {
      * 会员ID
      */
     @ApiModelProperty("卡券ID")
-    private Integer id;
+    private Long id;
 
     /**
      * 会员名称

Algunos archivos no se mostraron porque demasiados archivos cambiaron en este cambio