lianghanqiang 4 лет назад
Родитель
Сommit
20fb3723c6
100 измененных файлов с 1479 добавлено и 256 удалено
  1. 0 165
      src/main/java/org/springblade/common/constant/SystemConstant.java
  2. 22 0
      src/main/java/org/springblade/common/enums/OrderType.java
  3. 1 0
      src/main/java/org/springblade/common/enums/ResCode.java
  4. 1 0
      src/main/java/org/springblade/gateway/client_gateway/controller/ClientUserController.java
  5. 1 0
      src/main/java/org/springblade/gateway/common_gateway/controller/PaymentController.java
  6. 72 0
      src/main/java/org/springblade/gateway/common_gateway/handle/BalanceHandle.java
  7. 17 0
      src/main/java/org/springblade/gateway/common_gateway/handle/BaseHandle.java
  8. 77 0
      src/main/java/org/springblade/gateway/common_gateway/handle/ChannelPointHandle.java
  9. 0 9
      src/main/java/org/springblade/gateway/common_gateway/handle/OrderHandle.java
  10. 86 0
      src/main/java/org/springblade/gateway/common_gateway/handle/Trade.java
  11. 58 0
      src/main/java/org/springblade/gateway/common_gateway/handle/WxPayHandle.java
  12. 32 0
      src/main/java/org/springblade/gateway/common_gateway/handle/entity/HandleData.java
  13. 34 0
      src/main/java/org/springblade/gateway/common_gateway/handle/entity/Order.java
  14. 2 3
      src/main/java/org/springblade/gateway/shop_gateway/controller/AppAccountController.java
  15. 28 4
      src/main/java/org/springblade/gateway/shop_gateway/controller/ShopTradeController.java
  16. 2 1
      src/main/java/org/springblade/gateway/shop_gateway/entity/dto/BaseOrder.java
  17. 1 1
      src/main/java/org/springblade/ldt/account/controller/AccountController.java
  18. 1 1
      src/main/java/org/springblade/ldt/account/dto/AccountDTO.java
  19. 8 11
      src/main/java/org/springblade/ldt/account/entity/Account.java
  20. 1 1
      src/main/java/org/springblade/ldt/account/mapper/AccountMapper.java
  21. 1 0
      src/main/java/org/springblade/ldt/account/mapper/AccountMapper.xml
  22. 1 1
      src/main/java/org/springblade/ldt/account/service/IAccountService.java
  23. 1 1
      src/main/java/org/springblade/ldt/account/service/impl/AccountServiceImpl.java
  24. 1 1
      src/main/java/org/springblade/ldt/account/vo/AccountVO.java
  25. 1 1
      src/main/java/org/springblade/ldt/account/wrapper/AccountWrapper.java
  26. 1 1
      src/main/java/org/springblade/ldt/activity/controller/ActivityController.java
  27. 1 1
      src/main/java/org/springblade/ldt/activity/controller/JoinRecordController.java
  28. 1 1
      src/main/java/org/springblade/ldt/activity/dto/ActivityDTO.java
  29. 1 1
      src/main/java/org/springblade/ldt/activity/dto/JoinRecordDTO.java
  30. 1 1
      src/main/java/org/springblade/ldt/activity/entity/Activity.java
  31. 1 1
      src/main/java/org/springblade/ldt/activity/entity/JoinRecord.java
  32. 1 1
      src/main/java/org/springblade/ldt/activity/mapper/ActivityMapper.java
  33. 1 1
      src/main/java/org/springblade/ldt/activity/mapper/JoinRecordMapper.java
  34. 1 1
      src/main/java/org/springblade/ldt/activity/service/IActivityService.java
  35. 1 1
      src/main/java/org/springblade/ldt/activity/service/IJoinRecordService.java
  36. 1 1
      src/main/java/org/springblade/ldt/activity/service/impl/ActivityServiceImpl.java
  37. 1 1
      src/main/java/org/springblade/ldt/activity/service/impl/JoinRecordServiceImpl.java
  38. 1 1
      src/main/java/org/springblade/ldt/activity/vo/ActivityVO.java
  39. 1 1
      src/main/java/org/springblade/ldt/activity/vo/JoinRecordVO.java
  40. 1 1
      src/main/java/org/springblade/ldt/activity/wrapper/ActivityWrapper.java
  41. 1 1
      src/main/java/org/springblade/ldt/activity/wrapper/JoinRecordWrapper.java
  42. 1 1
      src/main/java/org/springblade/ldt/agent/controller/AgentRecordController.java
  43. 1 1
      src/main/java/org/springblade/ldt/agent/dto/AgentRecordDTO.java
  44. 1 1
      src/main/java/org/springblade/ldt/agent/entity/AgentRecord.java
  45. 1 1
      src/main/java/org/springblade/ldt/agent/mapper/AgentRecordMapper.java
  46. 1 1
      src/main/java/org/springblade/ldt/agent/service/IAgentRecordService.java
  47. 1 1
      src/main/java/org/springblade/ldt/agent/service/impl/AgentRecordServiceImpl.java
  48. 1 1
      src/main/java/org/springblade/ldt/agent/vo/AgentRecordVO.java
  49. 1 1
      src/main/java/org/springblade/ldt/agent/wrapper/AgentRecordWrapper.java
  50. 128 0
      src/main/java/org/springblade/ldt/bills/controller/BalanceBillsController.java
  51. 1 1
      src/main/java/org/springblade/ldt/bills/controller/BillsController.java
  52. 128 0
      src/main/java/org/springblade/ldt/bills/controller/PointBillsController.java
  53. 1 1
      src/main/java/org/springblade/ldt/bills/controller/WithdrawRecController.java
  54. 34 0
      src/main/java/org/springblade/ldt/bills/dto/BalanceBillsDTO.java
  55. 1 1
      src/main/java/org/springblade/ldt/bills/dto/BillsDTO.java
  56. 34 0
      src/main/java/org/springblade/ldt/bills/dto/PointBillsDTO.java
  57. 1 1
      src/main/java/org/springblade/ldt/bills/dto/WithdrawRecDTO.java
  58. 87 0
      src/main/java/org/springblade/ldt/bills/entity/BalanceBills.java
  59. 11 1
      src/main/java/org/springblade/ldt/bills/entity/Bills.java
  60. 87 0
      src/main/java/org/springblade/ldt/bills/entity/PointBills.java
  61. 1 1
      src/main/java/org/springblade/ldt/bills/entity/WithdrawRec.java
  62. 42 0
      src/main/java/org/springblade/ldt/bills/mapper/BalanceBillsMapper.java
  63. 23 0
      src/main/java/org/springblade/ldt/bills/mapper/BalanceBillsMapper.xml
  64. 1 1
      src/main/java/org/springblade/ldt/bills/mapper/BillsMapper.java
  65. 2 0
      src/main/java/org/springblade/ldt/bills/mapper/BillsMapper.xml
  66. 42 0
      src/main/java/org/springblade/ldt/bills/mapper/PointBillsMapper.java
  67. 23 0
      src/main/java/org/springblade/ldt/bills/mapper/PointBillsMapper.xml
  68. 1 1
      src/main/java/org/springblade/ldt/bills/mapper/WithdrawRecMapper.java
  69. 41 0
      src/main/java/org/springblade/ldt/bills/service/IBalanceBillsService.java
  70. 1 1
      src/main/java/org/springblade/ldt/bills/service/IBillsService.java
  71. 41 0
      src/main/java/org/springblade/ldt/bills/service/IPointBillsService.java
  72. 1 1
      src/main/java/org/springblade/ldt/bills/service/IWithdrawRecService.java
  73. 41 0
      src/main/java/org/springblade/ldt/bills/service/impl/BalanceBillsServiceImpl.java
  74. 1 1
      src/main/java/org/springblade/ldt/bills/service/impl/BillsServiceImpl.java
  75. 41 0
      src/main/java/org/springblade/ldt/bills/service/impl/PointBillsServiceImpl.java
  76. 1 1
      src/main/java/org/springblade/ldt/bills/service/impl/WithdrawRecServiceImpl.java
  77. 36 0
      src/main/java/org/springblade/ldt/bills/vo/BalanceBillsVO.java
  78. 1 1
      src/main/java/org/springblade/ldt/bills/vo/BillsVO.java
  79. 36 0
      src/main/java/org/springblade/ldt/bills/vo/PointBillsVO.java
  80. 1 1
      src/main/java/org/springblade/ldt/bills/vo/WithdrawRecVO.java
  81. 49 0
      src/main/java/org/springblade/ldt/bills/wrapper/BalanceBillsWrapper.java
  82. 1 1
      src/main/java/org/springblade/ldt/bills/wrapper/BillsWrapper.java
  83. 49 0
      src/main/java/org/springblade/ldt/bills/wrapper/PointBillsWrapper.java
  84. 1 1
      src/main/java/org/springblade/ldt/bills/wrapper/WithdrawRecWrapper.java
  85. 1 1
      src/main/java/org/springblade/ldt/feedback/controller/FeedbackController.java
  86. 1 1
      src/main/java/org/springblade/ldt/feedback/dto/FeedbackDTO.java
  87. 1 1
      src/main/java/org/springblade/ldt/feedback/entity/Feedback.java
  88. 1 1
      src/main/java/org/springblade/ldt/feedback/mapper/FeedbackMapper.java
  89. 1 1
      src/main/java/org/springblade/ldt/feedback/service/IFeedbackService.java
  90. 1 1
      src/main/java/org/springblade/ldt/feedback/service/impl/FeedbackServiceImpl.java
  91. 1 1
      src/main/java/org/springblade/ldt/feedback/vo/FeedbackVO.java
  92. 1 1
      src/main/java/org/springblade/ldt/feedback/wrapper/FeedbackWrapper.java
  93. 1 1
      src/main/java/org/springblade/ldt/mall/controller/MallController.java
  94. 1 1
      src/main/java/org/springblade/ldt/mall/dto/MallDTO.java
  95. 1 1
      src/main/java/org/springblade/ldt/mall/entity/Mall.java
  96. 1 1
      src/main/java/org/springblade/ldt/mall/mapper/MallMapper.java
  97. 1 1
      src/main/java/org/springblade/ldt/mall/service/IMallService.java
  98. 1 1
      src/main/java/org/springblade/ldt/mall/service/impl/MallServiceImpl.java
  99. 1 1
      src/main/java/org/springblade/ldt/mall/vo/MallVO.java
  100. 1 1
      src/main/java/org/springblade/ldt/mall/wrapper/MallWrapper.java

+ 0 - 165
src/main/java/org/springblade/common/constant/SystemConstant.java

@@ -1,165 +0,0 @@
-package org.springblade.common.constant;
-
-import lombok.Getter;
-
-/**
- * Created By lidexi in 2021/7/28
- **/
-public interface SystemConstant {
-
-
-	/**
-	 * 商场或者商户
-	 */
-	@Getter
-	enum MALLORSHOP{
-
-		MALL(1,"商场"),
-		SHOP(2,"商户");
-
-		int value;
-		String name;
-		MALLORSHOP(int value, String name){
-			this.value = value;
-			this.name = name;
-		}
-	}
-	/**
-	 * 是否
-	 */
-	@Getter
-	enum WHETHER{
-
-		YES(1,"是"),
-		NO(0,"否");
-
-		int value;
-		String name;
-		WHETHER(int value, String name){
-			this.value = value;
-			this.name = name;
-		}
-	}
-
-	/**
-	 * 审核状态
-	 */
-	@Getter
-	enum AuditStatus{
-
-		WATING(0,"待审核"),
-		PASS(1,"审核通过"),
-		FAIL(2,"审核失败"),
-		STOP(3,"停用");
-		int value;
-		String name;
-		AuditStatus(int value, String name){
-			this.value = value;
-			this.name = name;
-		}
-	}
-
-	/**
-	 * 账单支付状态billrecord
-	 */
-	@Getter
-	enum BillRecordPayStatus{
-
-		CANCEL("取消",2),
-		PAYED("已付款",1),
-		PAYING("待付款",0);
-
-
-		String name;
-		Integer value;
-		BillRecordPayStatus(String name, Integer value){
-			this.name = name;
-			this.value = value;
-		}
-	}
-
-	/**
-	 * 积分明细类型
-	 */
-	@Getter
-	enum PointDetailType{
-
-		MALL_SEND("商场赠送",1),
-		SHOP_SEND("商家赠送",2),
-		USER_PAY("用户付款",3),
-		CHANNEL("积分授权",4);
-
-
-		String name;
-		Integer value;
-		PointDetailType(String name, Integer value){
-			this.name = name;
-			this.value = value;
-		}
-	}
-
-	/**
-	 * 积分渠道类型
-	 */
-	@Getter
-	enum PointChannelType{
-
-		INNER_APPICATION("内部应用",1),
-		MALL("商场",2),
-		AGENTER("代理",3),
-		OUTNENER("外部",4);
-
-
-		String name;
-		Integer value;
-		PointChannelType(String name, Integer value){
-			this.name = name;
-			this.value = value;
-		}
-	}
-
-	/**
-	 * 应收明细结算状态
-	 */
-	@Getter
-	enum JieSuanStatus{
-
-		jsed("已结算",1),
-		jsing("待结算",0);
-
-
-		String name;
-		Integer value;
-		JieSuanStatus(String name, Integer value){
-			this.name = name;
-			this.value = value;
-		}
-	}
-
-	@Getter
-	enum AgentEnable{
-		IS_ENABLE("启用", 1),
-		NOT_ENABLE("禁用", -1);
-
-		String name;
-		Integer value;
-		AgentEnable(String name, Integer value){
-			this.name = name;
-			this.value = value;
-		}
-	}
-
-	@Getter
-	enum ChatType{
-		GROUP_CHAT("群聊", 1),
-		PRIVATE_CHAT("私聊", 0);
-
-		String name;
-		Integer value;
-		ChatType(String name, Integer value){
-			this.name = name;
-			this.value = value;
-		}
-	}
-
-}

+ 22 - 0
src/main/java/org/springblade/common/enums/OrderType.java

@@ -0,0 +1,22 @@
+package org.springblade.common.enums;
+
+import lombok.AllArgsConstructor;
+import lombok.Getter;
+
+/**
+ * @author: lianghanqiang
+ * @description: 订单类型
+ * @since: 7/29/21 -- 1:56 PM
+ */
+@AllArgsConstructor
+@Getter
+public enum OrderType {
+
+	/* 用户付款 */
+	USER_PAY("USER_PAY"),
+	AGENT_CHARGE("AGENT_CHARGE"),
+	MALL_CHARGE("MALL_CHARGE");
+
+	String name;
+
+}

+ 1 - 0
src/main/java/org/springblade/common/enums/ResCode.java

@@ -17,6 +17,7 @@ public enum ResCode implements IResultCode {
 	PAY_FAIL(501,"支付异常"),
 	PAY_TYPE_ERROR(501,"支付方式错误"),
 	PAY_SCENE_ERROR(501,"支付场景错误"),
+	TRADE_ERROR(501,"交易异常"),
 
 
 	/*	动态密码	*/

+ 1 - 0
src/main/java/org/springblade/gateway/client_gateway/controller/ClientUserController.java

@@ -49,4 +49,5 @@ public class ClientUserController {
 		}
 		return R.data(user);
 	}
+
 }

+ 1 - 0
src/main/java/org/springblade/gateway/common_gateway/controller/PaymentController.java

@@ -79,4 +79,5 @@ public class PaymentController {
 				.orElseThrow(()-> new ServiceException(ResCode.PAY_TYPE_ERROR))
 		);
 	}
+
 }

+ 72 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/BalanceHandle.java

@@ -0,0 +1,72 @@
+package org.springblade.gateway.common_gateway.handle;
+
+import lombok.AllArgsConstructor;
+import org.springblade.common.enums.ResCode;
+import org.springblade.common.enums.SystemConstant;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.gateway.common_gateway.handle.entity.HandleData;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
+import org.springblade.ldt.bills.entity.BalanceBills;
+import org.springblade.ldt.bills.service.IBalanceBillsService;
+import org.springblade.ldt.user.entity.LoginUser;
+import org.springblade.payment.entity.SuccessParams;
+import org.springframework.util.Assert;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: lianghanqiang
+ * @description: 用户账户余额处理
+ * @since: 8/26/21 -- 6:24 PM
+ */
+@AllArgsConstructor
+public class BalanceHandle implements BaseHandle {
+
+	private IBalanceBillsService balanceBillsService;
+
+	/**
+	 * 	用户的余额扣除,余额足够抵消交易金额,剩余支付金额remain为0,交易结束
+	 * 	不足抵消,remain将会流转到下一个节点处理
+	 * */
+	@Override
+	public HandleData handle(BigDecimal remain, Order order, SuccessParams successParams) {
+		LoginUser user = order.getLoginUser();
+
+
+		//用户账户余额为0
+		if(user.getBalance()==0.00){
+			return HandleData.builder().isSuccess(Boolean.TRUE).successParams(successParams).remain(remain).build();
+		}
+
+
+		//余额抵消情况
+		double handlePrice = order.getMoney();
+		remain = BigDecimal.valueOf(user.getBalance()).subtract(remain);
+		if(remain.compareTo(BigDecimal.ZERO)>=0){
+			remain =BigDecimal.ZERO;
+		}else{
+			remain = remain.abs();
+			handlePrice =  user.getBalance();
+		}
+
+		BalanceBills balanceBills = addBillRecord(order, user, handlePrice);
+		successParams.setBalanceBillsId(balanceBills.getId());
+
+		return HandleData.builder().isSuccess(Boolean.TRUE).successParams(successParams).remain(remain).build();
+	}
+
+	/**
+	 * 	添加积分抵消记录
+	 *
+	 * @return*/
+	private BalanceBills addBillRecord(Order order, LoginUser user, Double price) {
+		BalanceBills balanceBills = new BalanceBills();
+		balanceBills.setReceiveId(order.getShopId());
+		balanceBills.setStatus(SystemConstant.BillPayStatus.待付款.name());
+		balanceBills.setTitle("商家扫码收款");
+		balanceBills.setPayId(user.getId());
+		balanceBills.setPrice(price);
+		Assert.isTrue(balanceBillsService.save(balanceBills),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
+		return balanceBills;
+	}
+}

+ 17 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/BaseHandle.java

@@ -0,0 +1,17 @@
+package org.springblade.gateway.common_gateway.handle;
+
+import org.springblade.gateway.common_gateway.handle.entity.HandleData;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
+import org.springblade.payment.entity.SuccessParams;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: lianghanqiang
+ * @description:
+ * @since: 8/26/21 -- 5:52 PM
+ */
+public interface BaseHandle {
+
+	HandleData handle(BigDecimal remain, Order order, SuccessParams successParams);
+}

+ 77 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/ChannelPointHandle.java

@@ -0,0 +1,77 @@
+package org.springblade.gateway.common_gateway.handle;
+
+import lombok.AllArgsConstructor;
+import org.springblade.common.enums.OrderType;
+import org.springblade.common.enums.ResCode;
+import org.springblade.common.enums.SystemConstant;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.gateway.common_gateway.handle.entity.HandleData;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
+import org.springblade.ldt.bills.entity.PointBills;
+import org.springblade.ldt.bills.service.IPointBillsService;
+import org.springblade.ldt.user.entity.LoginUser;
+import org.springblade.payment.entity.SuccessParams;
+import org.springframework.util.Assert;
+
+import java.math.BigDecimal;
+
+
+/**
+ * @author: lianghanqiang
+ * @description: 积分交易处理
+ * @since: 8/26/21 -- 1:51 PM
+ */
+@AllArgsConstructor
+public class ChannelPointHandle implements BaseHandle {
+
+	private IPointBillsService pointBillsService;
+
+	/**
+	 * 	抵消用户的渠道积分,积分足够抵消交易金额,剩余支付金额remain为0,交易结束
+	 * 	不足抵消,remain将会流转到下一个节点处理
+	 * */
+	@Override
+	public HandleData handle(BigDecimal remain, Order order,SuccessParams successParams) {
+
+		LoginUser user = order.getLoginUser();
+
+
+		//用户渠道积分为0
+		if(user.getChannelPoint()==0.00){
+			return HandleData.builder().isSuccess(Boolean.TRUE).successParams(successParams).remain(remain).build();
+		}
+
+		//积分抵消情况
+		double handlePrice = order.getMoney();
+		remain = BigDecimal.valueOf(user.getChannelPoint()).subtract(remain);
+		if(remain.compareTo(BigDecimal.ZERO)>=0){
+			remain =BigDecimal.ZERO;
+		}else{
+			remain = remain.abs();
+			handlePrice = user.getChannelPoint();
+		}
+
+		PointBills pointBills = addBillRecord(order, user, handlePrice);
+		successParams.setPointBillsId(pointBills.getId());
+
+		return HandleData.builder().isSuccess(Boolean.TRUE).successParams(successParams).remain(remain).build();
+	}
+
+	/**
+	 * 	添加积分抵消记录
+	 *
+	 * @return*/
+	private PointBills addBillRecord(Order order, LoginUser user, Double price) {
+		PointBills pointBills = new PointBills();
+		pointBills.setPayId(user.getId());
+		pointBills.setReceiveId(order.getShopId());
+		pointBills.setStatus(SystemConstant.BillPayStatus.付款成功.name());
+		pointBills.setTitle("商家扫码收款");
+		pointBills.setPrice(price);
+		Assert.isTrue(pointBillsService.save(pointBills),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
+		return pointBills;
+	}
+
+
+
+}

+ 0 - 9
src/main/java/org/springblade/gateway/common_gateway/handle/OrderHandle.java

@@ -1,9 +0,0 @@
-package org.springblade.gateway.common_gateway.handle;
-
-/**
- * @author: lianghanqiang
- * @description:
- * @since: 8/26/21 -- 1:51 PM
- */
-public class OrderHandle {
-}

+ 86 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/Trade.java

@@ -0,0 +1,86 @@
+package org.springblade.gateway.common_gateway.handle;
+
+import lombok.AllArgsConstructor;
+import org.springblade.common.enums.OrderType;
+import org.springblade.common.enums.ResCode;
+import org.springblade.common.enums.SystemConstant;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.gateway.common_gateway.handle.entity.HandleData;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
+import org.springblade.ldt.bills.service.IBalanceBillsService;
+import org.springblade.ldt.bills.service.IBillsService;
+import org.springblade.ldt.bills.service.IPointBillsService;
+import org.springblade.ldt.platform.service.IPlatformSettingService;
+import org.springblade.ldt.user.service.ILoginUserService;
+import org.springblade.payment.entity.SuccessParams;
+import org.springblade.payment.service.IPaymentService;
+import org.springblade.webSocket.WebSocketServer;
+import org.springframework.stereotype.Component;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+
+/**
+ * @author: lianghanqiang
+ * @description: 交易处理,总控交易处理链
+ * @since: 8/26/21 -- 5:53 PM
+ */
+@Component
+@AllArgsConstructor
+public class Trade {
+
+	private  IBillsService billsService;
+	private  IPointBillsService pointBillsService;
+	private  IBalanceBillsService balanceBillsService;
+	private  WebSocketServer webSocketServer;
+	private  IPaymentService paymentService;
+	private  IPlatformSettingService platformSettingService;
+	private  ILoginUserService loginUserService;
+
+	/**
+	 * 	交易处理链,每个handle处理负责一个业务节点
+	 * 	1、用户渠道积分用以抵消交易金额
+	 * 	2、用户账户余额抵消交易金额
+	 * 	3、剩余金额用户微信支付
+	 * */
+	private  List<BaseHandle> chain ;
+
+	 {
+	 	 chain = new ArrayList<>();
+		 chain.add(new ChannelPointHandle(pointBillsService));
+		 chain.add(new BalanceHandle(balanceBillsService));
+		 chain.add(new WxPayHandle(billsService,webSocketServer));
+	}
+
+	@Transactional
+	public boolean trade(Order order){
+
+	 	BigDecimal remain = BigDecimal.valueOf(order.getMoney());
+
+	 	//支付参数
+		SuccessParams successParams  = SuccessParams.builder()
+			.orderType(OrderType.USER_PAY.name())
+			.status(SystemConstant.BillPayStatus.待付款.name())
+			.totalPrice(order.getMoney())
+			.build();
+
+		//处理各个节点
+		for (BaseHandle node: chain) {
+			HandleData res = node.handle(remain, order,successParams);
+			Assert.isTrue(res.isSuccess(),()->{throw new ServiceException(ResCode.TRADE_ERROR);});
+			remain = res.getRemain();
+			successParams = res.getSuccessParams();
+
+			if(remain.compareTo(BigDecimal.ZERO)==0){
+				//处理积分余额数据变更
+				paymentService.success(successParams);
+				break;
+			}
+		}
+
+	 	return true;
+	}
+}

+ 58 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/WxPayHandle.java

@@ -0,0 +1,58 @@
+package org.springblade.gateway.common_gateway.handle;
+
+import cn.hutool.core.convert.Convert;
+import com.alibaba.fastjson.JSON;
+import lombok.AllArgsConstructor;
+import org.springblade.common.enums.PaymentScene;
+import org.springblade.common.enums.PaymentType;
+import org.springblade.common.enums.ResCode;
+import org.springblade.common.enums.SystemConstant;
+import org.springblade.core.log.exception.ServiceException;
+import org.springblade.gateway.common_gateway.handle.entity.HandleData;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
+import org.springblade.ldt.bills.entity.Bills;
+import org.springblade.ldt.bills.service.IBillsService;
+import org.springblade.payment.entity.SuccessParams;
+import org.springblade.webSocket.WebSocketServer;
+import org.springframework.util.Assert;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: lianghanqiang
+ * @description: 用户需要调起微信支付
+ * @since: 8/26/21 -- 6:54 PM
+ */
+@AllArgsConstructor
+public class WxPayHandle implements BaseHandle {
+
+	private IBillsService billsService;
+	private WebSocketServer webSocketServer;
+
+	/**
+	 * 	未抵消的余额,发送订单信息到用户,用户根据订单信息调起微信支付
+	 * */
+	@Override
+	public HandleData handle(BigDecimal remain, Order order, SuccessParams successParams) {
+
+		Bills bills = new Bills();
+		bills.setPaystatus(SystemConstant.BillPayStatus.待付款.name());
+		bills.setChannel(PaymentType.YEE_PAY.name());
+		bills.setAppid(order.getAppId());
+		bills.setCost(Convert.toStr(order.getMoney()));
+		bills.setOpenid(order.getOpenId());
+		bills.setPayway(PaymentScene.MINI_PROGRAM.name());
+		bills.setPrice(remain);
+		bills.setTitle(order.getBillsTitle());
+		bills.setPayId(order.getLoginUser().getId());
+		bills.setReceiveId(order.getShopId());
+		Assert.isTrue(billsService.saveOrUpdate(bills),()->{ throw new ServiceException(ResCode.TRADE_ERROR) ;});
+
+		//通知用户调起支付
+		webSocketServer.sendInfo(order.getLoginUser().getId().toString(), JSON.toJSONString(bills));
+
+		successParams.setBillId(bills.getId());
+
+		return HandleData.builder().isSuccess(Boolean.TRUE).successParams(successParams).remain(remain).build();
+	}
+}

+ 32 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/entity/HandleData.java

@@ -0,0 +1,32 @@
+package org.springblade.gateway.common_gateway.handle.entity;
+
+import lombok.Builder;
+import lombok.Data;
+import org.springblade.payment.entity.SuccessParams;
+
+import java.math.BigDecimal;
+
+/**
+ * @author: lianghanqiang
+ * @description: 处理链数据
+ * @since: 8/26/21 -- 6:00 PM
+ */
+@Data
+@Builder
+public class HandleData {
+
+	/**
+	 * 	剩余支付金额
+	 * */
+	BigDecimal remain;
+
+	/**
+	 * 	是否处理成功
+	 * */
+	boolean isSuccess;
+
+	/**
+	 * 	订单参数
+	 * */
+	SuccessParams successParams;
+}

+ 34 - 0
src/main/java/org/springblade/gateway/common_gateway/handle/entity/Order.java

@@ -0,0 +1,34 @@
+package org.springblade.gateway.common_gateway.handle.entity;
+
+import lombok.Builder;
+import lombok.Data;
+import org.joda.time.DateTime;
+import org.springblade.ldt.user.entity.LoginUser;
+
+import java.util.Date;
+
+/**
+ * @author: lianghanqiang
+ * @description:
+ * @since: 8/26/21 -- 2:53 PM
+ */
+@Data
+@Builder
+public class Order {
+	//商店ID
+	private Long shopId;
+	//付款用户
+	private LoginUser loginUser;
+	//交易金额
+	private Double money;
+	//账单标题
+	private String billsTitle;
+	//过期时间
+	private DateTime expireTime;
+	//appid
+	private String appId;
+	//用户openid
+	private String openId;
+	//appsecret
+	private String secret;
+}

+ 2 - 3
src/main/java/org/springblade/gateway/shop_gateway/controller/AppAccountController.java

@@ -54,9 +54,8 @@ public class AppAccountController {
 	@SneakyThrows
 	public R register(@RequestBody  @Valid AppAccountDto appAccountDto) {
 
-		Assert.isTrue(SmsUtil.validateMessage(null,appAccountDto.getSmsId(),appAccountDto.getValue(),appAccountDto.getPhone()),()->{
-			throw new ServiceException(ResCode.VALIDATE_FAIL);
-		});
+		Assert.isTrue(SmsUtil.validateMessage(null,appAccountDto.getSmsId(),appAccountDto.getValue(),appAccountDto.getPhone()),
+			()->{ throw new ServiceException(ResCode.VALIDATE_FAIL); });
 		Account account = new Account();
 		BeanUtil.copyProperties(appAccountDto,account);
 		account.setSecret(DigestUtil.hex(account.getSecret()));

+ 28 - 4
src/main/java/org/springblade/gateway/shop_gateway/controller/ShopTradeController.java

@@ -7,14 +7,19 @@ import org.springblade.common.enums.ResCode;
 import org.springblade.common.utils.OtpUtils;
 import org.springblade.core.log.exception.ServiceException;
 import org.springblade.core.tool.api.R;
+import org.springblade.gateway.common_gateway.handle.ChannelPointHandle;
+import org.springblade.gateway.common_gateway.handle.Trade;
+import org.springblade.gateway.common_gateway.handle.entity.Order;
 import org.springblade.gateway.shop_gateway.entity.dto.CodeOrder;
-import org.springblade.ldt.bills.service.IBillsService;
+import org.springblade.ldt.user.entity.LoginUser;
+import org.springblade.ldt.user.service.ILoginUserService;
 import org.springframework.util.Assert;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 
+import java.math.BigDecimal;
 import java.util.Map;
 
 /**
@@ -28,7 +33,8 @@ import java.util.Map;
 @AllArgsConstructor
 public class ShopTradeController {
 
-	private IBillsService billsService;
+	private ILoginUserService loginUserService;
+	private Trade trade;
 
 	@ApiOperation("授权码下单")
 	@PostMapping("initOrderByCode")
@@ -40,10 +46,28 @@ public class ShopTradeController {
 		Assert.isTrue(OtpUtils.validate(decodeParams.get(OtpUtils.PARAMS_ID),decodeParams.get(OtpUtils.PARAMS_SECRET)),
 			()->{ throw new ServiceException(ResCode.SECRET_VALIDATE_ERROR); });
 
-
+		LoginUser loginUser = loginUserService.getById(codeOrder.getLoginUserId());
+		Assert.notNull(loginUser,() -> {throw  new ServiceException(ResCode.USER_NOT_FOUNT);});
 
 		//处理订单
-		return R.success("s");
+		Order order = Order.builder()
+			.appId(codeOrder.getAppId())
+			.billsTitle(codeOrder.getBillsTitle())
+			.loginUser(loginUser)
+			.money(codeOrder.getMoney().doubleValue())
+			.expireTime(codeOrder.getExpireTime())
+			.secret(codeOrder.getSecret())
+			.shopId(codeOrder.getShopId())
+			.openId(codeOrder.getOpenId())
+			.build();
+
+		try{
+			trade.trade(order);
+		}catch (Exception e){
+			new ServiceException(ResCode.TRADE_ERROR);
+		}
+
+		return R.success("交易成功!");
 
 	}
 

+ 2 - 1
src/main/java/org/springblade/gateway/shop_gateway/entity/dto/BaseOrder.java

@@ -5,6 +5,7 @@ import lombok.AllArgsConstructor;
 import lombok.Builder;
 import lombok.Data;
 import lombok.NoArgsConstructor;
+import org.joda.time.DateTime;
 
 import java.math.BigDecimal;
 import java.util.Date;
@@ -32,7 +33,7 @@ public class BaseOrder {
 	private String billsTitle;
 
 	@ApiModelProperty("expireTime")
-	private Date expireTime;
+	private DateTime expireTime;
 
 	@ApiModelProperty("appId")
 	private String appId;

+ 1 - 1
src/main/java/org/springblade/ldt/account/controller/AccountController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 1 - 1
src/main/java/org/springblade/ldt/account/dto/AccountDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 8 - 11
src/main/java/org/springblade/ldt/account/entity/Account.java

@@ -17,20 +17,18 @@
 package org.springblade.ldt.account.entity;
 
 import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
 import java.io.Serializable;
 import lombok.Data;
 import lombok.EqualsAndHashCode;
 import io.swagger.annotations.ApiModel;
 import io.swagger.annotations.ApiModelProperty;
-import org.joda.time.DateTime;
-
-import javax.validation.constraints.NotBlank;
 
 /**
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_account")
@@ -47,13 +45,11 @@ public class Account implements Serializable {
 	/**
 	* 账号,手机号
 	*/
-		@NotBlank
 		@ApiModelProperty(value = "账号,手机号")
 		private String phone;
 	/**
 	* 密码
 	*/
-		@NotBlank
 		@ApiModelProperty(value = "密码")
 		private String secret;
 	/**
@@ -61,10 +57,11 @@ public class Account implements Serializable {
 	*/
 		@ApiModelProperty(value = "账户类型,商家,商场")
 		private String type;
-
 	/**
-	 * 注册时间
-	 */
-	@ApiModelProperty("注册时间")
-	private DateTime createTime;
+	* 注册时间
+	*/
+		@ApiModelProperty(value = "注册时间")
+		private LocalDateTime createTime;
+
+
 }

+ 1 - 1
src/main/java/org/springblade/ldt/account/mapper/AccountMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface AccountMapper extends BaseMapper<Account> {
 

+ 1 - 0
src/main/java/org/springblade/ldt/account/mapper/AccountMapper.xml

@@ -8,6 +8,7 @@
         <result column="phone" property="phone"/>
         <result column="secret" property="secret"/>
         <result column="type" property="type"/>
+        <result column="create_time" property="createTime"/>
     </resultMap>
 
 

+ 1 - 1
src/main/java/org/springblade/ldt/account/service/IAccountService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IAccountService extends IService<Account> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/account/service/impl/AccountServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> implements IAccountService {

+ 1 - 1
src/main/java/org/springblade/ldt/account/vo/AccountVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/account/wrapper/AccountWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class AccountWrapper extends BaseEntityWrapper<Account, AccountVO>  {
 

+ 1 - 1
src/main/java/org/springblade/ldt/activity/controller/ActivityController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 1 - 1
src/main/java/org/springblade/ldt/activity/controller/JoinRecordController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 1 - 1
src/main/java/org/springblade/ldt/activity/dto/ActivityDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/activity/dto/JoinRecordDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/activity/entity/Activity.java

@@ -28,7 +28,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_activity")

+ 1 - 1
src/main/java/org/springblade/ldt/activity/entity/JoinRecord.java

@@ -27,7 +27,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_join_record")

+ 1 - 1
src/main/java/org/springblade/ldt/activity/mapper/ActivityMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface ActivityMapper extends BaseMapper<Activity> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/activity/mapper/JoinRecordMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface JoinRecordMapper extends BaseMapper<JoinRecord> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/activity/service/IActivityService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IActivityService extends IService<Activity> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/activity/service/IJoinRecordService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IJoinRecordService extends IService<JoinRecord> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/activity/service/impl/ActivityServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class ActivityServiceImpl extends ServiceImpl<ActivityMapper, Activity> implements IActivityService {

+ 1 - 1
src/main/java/org/springblade/ldt/activity/service/impl/JoinRecordServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class JoinRecordServiceImpl extends ServiceImpl<JoinRecordMapper, JoinRecord> implements IJoinRecordService {

+ 1 - 1
src/main/java/org/springblade/ldt/activity/vo/ActivityVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/activity/vo/JoinRecordVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/activity/wrapper/ActivityWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class ActivityWrapper extends BaseEntityWrapper<Activity, ActivityVO>  {
 

+ 1 - 1
src/main/java/org/springblade/ldt/activity/wrapper/JoinRecordWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class JoinRecordWrapper extends BaseEntityWrapper<JoinRecord, JoinRecordVO>  {
 

+ 1 - 1
src/main/java/org/springblade/ldt/agent/controller/AgentRecordController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 1 - 1
src/main/java/org/springblade/ldt/agent/dto/AgentRecordDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/agent/entity/AgentRecord.java

@@ -27,7 +27,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_agent_record")

+ 1 - 1
src/main/java/org/springblade/ldt/agent/mapper/AgentRecordMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface AgentRecordMapper extends BaseMapper<AgentRecord> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/agent/service/IAgentRecordService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IAgentRecordService extends IService<AgentRecord> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/agent/service/impl/AgentRecordServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class AgentRecordServiceImpl extends ServiceImpl<AgentRecordMapper, AgentRecord> implements IAgentRecordService {

+ 1 - 1
src/main/java/org/springblade/ldt/agent/vo/AgentRecordVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/agent/wrapper/AgentRecordWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class AgentRecordWrapper extends BaseEntityWrapper<AgentRecord, AgentRecordVO>  {
 

+ 128 - 0
src/main/java/org/springblade/ldt/bills/controller/BalanceBillsController.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/controller/BillsController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 128 - 0
src/main/java/org/springblade/ldt/bills/controller/PointBillsController.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/controller/WithdrawRecController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 34 - 0
src/main/java/org/springblade/ldt/bills/dto/BalanceBillsDTO.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/dto/BillsDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 34 - 0
src/main/java/org/springblade/ldt/bills/dto/PointBillsDTO.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/dto/WithdrawRecDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 87 - 0
src/main/java/org/springblade/ldt/bills/entity/BalanceBills.java

@@ -0,0 +1,87 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@Data
+@TableName("ldt_balance_bills")
+@ApiModel(value = "BalanceBills对象", description = "BalanceBills对象")
+public class BalanceBills implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 余额交易明细ID
+	*/
+		@ApiModelProperty(value = "余额交易明细ID")
+		private Long id;
+	/**
+	* 交易金额
+	*/
+		@ApiModelProperty(value = "交易金额")
+		private Double price;
+	/**
+	* 交易账户--付款方
+	*/
+		@ApiModelProperty(value = "交易账户--付款方")
+		private Long payId;
+	/**
+	* 交易标题
+	*/
+		@ApiModelProperty(value = "交易标题")
+		private String title;
+	/**
+	* 交易时间
+	*/
+		@ApiModelProperty(value = "交易时间")
+		private LocalDateTime createTime;
+	/**
+	* 交易说明
+	*/
+		@ApiModelProperty(value = "交易说明")
+		private String desc;
+	/**
+	* 手续费
+	*/
+		@ApiModelProperty(value = "手续费")
+		private Double fee;
+	/**
+	* 交易账户--收款方
+	*/
+		@ApiModelProperty(value = "交易账户--收款方")
+		private Long receiveId;
+	/**
+	* 交易状态
+	*/
+		@ApiModelProperty(value = "交易状态")
+		private String status;
+
+
+}

+ 11 - 1
src/main/java/org/springblade/ldt/bills/entity/Bills.java

@@ -29,7 +29,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_bills")
@@ -118,6 +118,16 @@ public class Bills implements Serializable {
 	*/
 		@ApiModelProperty(value = "openid")
 		private String openid;
+	/**
+	* 消耗积分
+	*/
+		@ApiModelProperty(value = "消耗积分")
+		private Double pointNum;
+	/**
+	* 消耗余额
+	*/
+		@ApiModelProperty(value = "消耗余额")
+		private Double balanceNum;
 
 
 }

+ 87 - 0
src/main/java/org/springblade/ldt/bills/entity/PointBills.java

@@ -0,0 +1,87 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.entity;
+
+import com.baomidou.mybatisplus.annotation.TableName;
+import java.time.LocalDateTime;
+import java.io.Serializable;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+
+/**
+ * 实体类
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+@Data
+@TableName("ldt_point_bills")
+@ApiModel(value = "PointBills对象", description = "PointBills对象")
+public class PointBills implements Serializable {
+
+	private static final long serialVersionUID = 1L;
+
+	/**
+	* 积分交易明细ID
+	*/
+		@ApiModelProperty(value = "积分交易明细ID")
+		private Long id;
+	/**
+	* 交易金额
+	*/
+		@ApiModelProperty(value = "交易金额")
+		private Double price;
+	/**
+	* 交易账户--付款方
+	*/
+		@ApiModelProperty(value = "交易账户--付款方")
+		private Long payId;
+	/**
+	* 交易标题
+	*/
+		@ApiModelProperty(value = "交易标题")
+		private String title;
+	/**
+	* 交易时间
+	*/
+		@ApiModelProperty(value = "交易时间")
+		private LocalDateTime createTime;
+	/**
+	* 交易说明
+	*/
+		@ApiModelProperty(value = "交易说明")
+		private String desc;
+	/**
+	* 手续费
+	*/
+		@ApiModelProperty(value = "手续费")
+		private Double fee;
+	/**
+	* 交易账户--收款方
+	*/
+		@ApiModelProperty(value = "交易账户--收款方")
+		private Long receiveId;
+	/**
+	* 交易状态
+	*/
+		@ApiModelProperty(value = "交易状态")
+		private String status;
+
+
+}

+ 1 - 1
src/main/java/org/springblade/ldt/bills/entity/WithdrawRec.java

@@ -28,7 +28,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_withdraw_rec")

+ 42 - 0
src/main/java/org/springblade/ldt/bills/mapper/BalanceBillsMapper.java

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

+ 23 - 0
src/main/java/org/springblade/ldt/bills/mapper/BalanceBillsMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.ldt.bills.mapper.BalanceBillsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="balanceBillsResultMap" type="org.springblade.ldt.bills.entity.BalanceBills">
+        <id column="id" property="id"/>
+        <result column="price" property="price"/>
+        <result column="pay_id" property="payId"/>
+        <result column="title" property="title"/>
+        <result column="create_time" property="createTime"/>
+        <result column="desc" property="desc"/>
+        <result column="fee" property="fee"/>
+        <result column="receive_id" property="receiveId"/>
+        <result column="status" property="status"/>
+    </resultMap>
+
+
+    <select id="selectBalanceBillsPage" resultMap="balanceBillsResultMap">
+        select * from ldt_balance_bills where is_deleted = 0
+    </select>
+
+</mapper>

+ 1 - 1
src/main/java/org/springblade/ldt/bills/mapper/BillsMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface BillsMapper extends BaseMapper<Bills> {
 

+ 2 - 0
src/main/java/org/springblade/ldt/bills/mapper/BillsMapper.xml

@@ -20,6 +20,8 @@
         <result column="ex_time" property="exTime"/>
         <result column="appid" property="appid"/>
         <result column="openid" property="openid"/>
+        <result column="point_num" property="pointNum"/>
+        <result column="balance_num" property="balanceNum"/>
     </resultMap>
 
 

+ 42 - 0
src/main/java/org/springblade/ldt/bills/mapper/PointBillsMapper.java

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

+ 23 - 0
src/main/java/org/springblade/ldt/bills/mapper/PointBillsMapper.xml

@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.springblade.ldt.bills.mapper.PointBillsMapper">
+
+    <!-- 通用查询映射结果 -->
+    <resultMap id="pointBillsResultMap" type="org.springblade.ldt.bills.entity.PointBills">
+        <id column="id" property="id"/>
+        <result column="price" property="price"/>
+        <result column="pay_id" property="payId"/>
+        <result column="title" property="title"/>
+        <result column="create_time" property="createTime"/>
+        <result column="desc" property="desc"/>
+        <result column="fee" property="fee"/>
+        <result column="receive_id" property="receiveId"/>
+        <result column="status" property="status"/>
+    </resultMap>
+
+
+    <select id="selectPointBillsPage" resultMap="pointBillsResultMap">
+        select * from ldt_point_bills where is_deleted = 0
+    </select>
+
+</mapper>

+ 1 - 1
src/main/java/org/springblade/ldt/bills/mapper/WithdrawRecMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface WithdrawRecMapper extends BaseMapper<WithdrawRec> {
 

+ 41 - 0
src/main/java/org/springblade/ldt/bills/service/IBalanceBillsService.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/service/IBillsService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IBillsService extends IService<Bills> {
 

+ 41 - 0
src/main/java/org/springblade/ldt/bills/service/IPointBillsService.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/service/IWithdrawRecService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IWithdrawRecService extends IService<WithdrawRec> {
 

+ 41 - 0
src/main/java/org/springblade/ldt/bills/service/impl/BalanceBillsServiceImpl.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/service/impl/BillsServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class BillsServiceImpl extends ServiceImpl<BillsMapper, Bills> implements IBillsService {

+ 41 - 0
src/main/java/org/springblade/ldt/bills/service/impl/PointBillsServiceImpl.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/service/impl/WithdrawRecServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class WithdrawRecServiceImpl extends ServiceImpl<WithdrawRecMapper, WithdrawRec> implements IWithdrawRecService {

+ 36 - 0
src/main/java/org/springblade/ldt/bills/vo/BalanceBillsVO.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/vo/BillsVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 36 - 0
src/main/java/org/springblade/ldt/bills/vo/PointBillsVO.java

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

+ 1 - 1
src/main/java/org/springblade/ldt/bills/vo/WithdrawRecVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 49 - 0
src/main/java/org/springblade/ldt/bills/wrapper/BalanceBillsWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.ldt.bills.entity.BalanceBills;
+import org.springblade.ldt.bills.vo.BalanceBillsVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+public class BalanceBillsWrapper extends BaseEntityWrapper<BalanceBills, BalanceBillsVO>  {
+
+	public static BalanceBillsWrapper build() {
+		return new BalanceBillsWrapper();
+ 	}
+
+	@Override
+	public BalanceBillsVO entityVO(BalanceBills balanceBills) {
+		BalanceBillsVO balanceBillsVO = Objects.requireNonNull(BeanUtil.copy(balanceBills, BalanceBillsVO.class));
+
+		//User createUser = UserCache.getUser(balanceBills.getCreateUser());
+		//User updateUser = UserCache.getUser(balanceBills.getUpdateUser());
+		//balanceBillsVO.setCreateUserName(createUser.getName());
+		//balanceBillsVO.setUpdateUserName(updateUser.getName());
+
+		return balanceBillsVO;
+	}
+
+}

+ 1 - 1
src/main/java/org/springblade/ldt/bills/wrapper/BillsWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class BillsWrapper extends BaseEntityWrapper<Bills, BillsVO>  {
 

+ 49 - 0
src/main/java/org/springblade/ldt/bills/wrapper/PointBillsWrapper.java

@@ -0,0 +1,49 @@
+/*
+ *      Copyright (c) 2018-2028, Chill Zhuang All rights reserved.
+ *
+ *  Redistribution and use in source and binary forms, with or without
+ *  modification, are permitted provided that the following conditions are met:
+ *
+ *  Redistributions of source code must retain the above copyright notice,
+ *  this list of conditions and the following disclaimer.
+ *  Redistributions in binary form must reproduce the above copyright
+ *  notice, this list of conditions and the following disclaimer in the
+ *  documentation and/or other materials provided with the distribution.
+ *  Neither the name of the dreamlu.net developer nor the names of its
+ *  contributors may be used to endorse or promote products derived from
+ *  this software without specific prior written permission.
+ *  Author: Chill 庄骞 (smallchill@163.com)
+ */
+package org.springblade.ldt.bills.wrapper;
+
+import org.springblade.core.mp.support.BaseEntityWrapper;
+import org.springblade.core.tool.utils.BeanUtil;
+import org.springblade.ldt.bills.entity.PointBills;
+import org.springblade.ldt.bills.vo.PointBillsVO;
+import java.util.Objects;
+
+/**
+ * 包装类,返回视图层所需的字段
+ *
+ * @author BladeX
+ * @since 2021-08-27
+ */
+public class PointBillsWrapper extends BaseEntityWrapper<PointBills, PointBillsVO>  {
+
+	public static PointBillsWrapper build() {
+		return new PointBillsWrapper();
+ 	}
+
+	@Override
+	public PointBillsVO entityVO(PointBills pointBills) {
+		PointBillsVO pointBillsVO = Objects.requireNonNull(BeanUtil.copy(pointBills, PointBillsVO.class));
+
+		//User createUser = UserCache.getUser(pointBills.getCreateUser());
+		//User updateUser = UserCache.getUser(pointBills.getUpdateUser());
+		//pointBillsVO.setCreateUserName(createUser.getName());
+		//pointBillsVO.setUpdateUserName(updateUser.getName());
+
+		return pointBillsVO;
+	}
+
+}

+ 1 - 1
src/main/java/org/springblade/ldt/bills/wrapper/WithdrawRecWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class WithdrawRecWrapper extends BaseEntityWrapper<WithdrawRec, WithdrawRecVO>  {
 

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/controller/FeedbackController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/dto/FeedbackDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/entity/Feedback.java

@@ -27,7 +27,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_feedback")

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/mapper/FeedbackMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface FeedbackMapper extends BaseMapper<Feedback> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/service/IFeedbackService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IFeedbackService extends IService<Feedback> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/service/impl/FeedbackServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class FeedbackServiceImpl extends ServiceImpl<FeedbackMapper, Feedback> implements IFeedbackService {

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/vo/FeedbackVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/feedback/wrapper/FeedbackWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class FeedbackWrapper extends BaseEntityWrapper<Feedback, FeedbackVO>  {
 

+ 1 - 1
src/main/java/org/springblade/ldt/mall/controller/MallController.java

@@ -39,7 +39,7 @@ import org.springblade.core.boot.ctrl.BladeController;
  *  控制器
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @RestController
 @AllArgsConstructor

+ 1 - 1
src/main/java/org/springblade/ldt/mall/dto/MallDTO.java

@@ -24,7 +24,7 @@ import lombok.EqualsAndHashCode;
  * 数据传输对象实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/mall/entity/Mall.java

@@ -27,7 +27,7 @@ import io.swagger.annotations.ApiModelProperty;
  * 实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @TableName("ldt_mall")

+ 1 - 1
src/main/java/org/springblade/ldt/mall/mapper/MallMapper.java

@@ -26,7 +26,7 @@ import java.util.List;
  *  Mapper 接口
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface MallMapper extends BaseMapper<Mall> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/mall/service/IMallService.java

@@ -25,7 +25,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public interface IMallService extends IService<Mall> {
 

+ 1 - 1
src/main/java/org/springblade/ldt/mall/service/impl/MallServiceImpl.java

@@ -28,7 +28,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
  *  服务实现类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Service
 public class MallServiceImpl extends ServiceImpl<MallMapper, Mall> implements IMallService {

+ 1 - 1
src/main/java/org/springblade/ldt/mall/vo/MallVO.java

@@ -25,7 +25,7 @@ import io.swagger.annotations.ApiModel;
  * 视图实体类
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 @Data
 @EqualsAndHashCode(callSuper = true)

+ 1 - 1
src/main/java/org/springblade/ldt/mall/wrapper/MallWrapper.java

@@ -26,7 +26,7 @@ import java.util.Objects;
  * 包装类,返回视图层所需的字段
  *
  * @author BladeX
- * @since 2021-08-24
+ * @since 2021-08-27
  */
 public class MallWrapper extends BaseEntityWrapper<Mall, MallVO>  {
 

Некоторые файлы не были показаны из-за большого количества измененных файлов