From ec5122099dbf5bace6432443005a0a0ceccb3e0c Mon Sep 17 00:00:00 2001 From: winter Date: Sun, 21 Jul 2024 11:50:52 +0800 Subject: [PATCH] fix --- .../market/WxFinanceController.java | 60 + .../resources/db/migration/V202407018.sql | 1072 +++++++++++++++++ .../callback/WxPayBillController.java | 32 +- .../schedule/PowerBillAutoBuildSchedule.java | 332 ++--- .../config/BaseMyBatisConfiguration.java | 7 + .../com/iformall/domain/dto/WxBillPayDTO.java | 3 +- .../com/iformall/domain/po/WxBillAction.java | 4 +- .../com/iformall/domain/po/WxBillDaily.java | 2 +- .../com/iformall/domain/po/WxBillDeposit.java | 2 +- .../com/iformall/domain/po/WxBillOther.java | 4 +- .../domain/po/WxBillOtherDeposit.java | 4 +- .../com/iformall/domain/po/WxBillPayWay.java | 39 + .../iformall/domain/po/WxBillProperty.java | 4 +- .../domain/po/WxBillPropertyDeposit.java | 4 +- .../com/iformall/domain/po/WxBillRent.java | 5 +- .../iformall/domain/po/WxBillRentManage.java | 4 +- .../msg/FmInsideNotifyBillPaidSuccessMsg.java | 4 +- .../com/iformall/enums/EnumBillAction.java | 15 +- .../com/iformall/enums/EnumBillPayWay.java | 37 - .../iformall/mapper/WxBillPayWayMapper.java | 18 + .../iformall/service/WxFinanceService.java | 18 + .../service/impl/WxBillBaseService.java | 10 +- .../service/impl/WxBillDailyServiceImpl.java | 34 +- .../impl/WxBillDepositServiceImpl.java | 13 +- .../impl/WxBillOtherDepositServiceImpl.java | 20 +- .../service/impl/WxBillOtherServiceImpl.java | 20 +- .../WxBillPropertyDepositServiceImpl.java | 13 +- .../impl/WxBillPropertyServiceImpl.java | 45 +- .../impl/WxBillRentManageServiceImpl.java | 31 +- .../service/impl/WxBillRentServiceImpl.java | 53 +- .../service/impl/WxFinanceServiceImpl.java | 104 ++ .../impl/WxProjectConfigServiceImpl.java | 4 + ...deNotifyBillPaidSuccessMsgServiceImpl.java | 8 +- .../payBill/PayBillAdapterService.java | 4 +- .../payBill/PayBillServiceFactory.java | 34 - .../payBill/impl/PayBillBaseService.java | 6 +- .../impl/jianhang/JianHangMaServiceImpl.java | 4 +- .../impl/wx/WxMiniProgramServiceImpl.java | 8 +- .../java/com/iformall/utils/Constant.java | 4 + .../resources/mapper/WxBillActionMapper.xml | 2 +- .../resources/mapper/WxBillDailyMapper.xml | 2 +- .../resources/mapper/WxBillDepositMapper.xml | 2 +- .../mapper/WxBillOtherDepositMapper.xml | 2 +- .../resources/mapper/WxBillOtherMapper.xml | 2 +- .../resources/mapper/WxBillPayWayMapper.xml | 58 + .../mapper/WxBillPropertyDepositMapper.xml | 2 +- .../resources/mapper/WxBillPropertyMapper.xml | 2 +- .../mapper/WxBillRentManageMapper.xml | 2 +- .../resources/mapper/WxBillRentMapper.xml | 2 +- 49 files changed, 1792 insertions(+), 369 deletions(-) create mode 100644 mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java create mode 100644 mallinkService/src/main/java/com/iformall/domain/po/WxBillPayWay.java delete mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java create mode 100644 mallinkService/src/main/java/com/iformall/mapper/WxBillPayWayMapper.java create mode 100644 mallinkService/src/main/java/com/iformall/service/WxFinanceService.java create mode 100644 mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java create mode 100644 mallinkService/src/main/resources/mapper/WxBillPayWayMapper.xml diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java new file mode 100644 index 000000000..443ff6b85 --- /dev/null +++ b/mallinkAdmin/src/main/java/com/iformall/controller/market/WxFinanceController.java @@ -0,0 +1,60 @@ +package com.iformall.controller.market; + +import com.github.pagehelper.PageInfo; +import com.iformall.common.ResultData; +import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.WxBillPayWay; +import com.iformall.domain.po.base.BaseEntity; +import com.iformall.service.WxFinanceService; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiImplicitParam; +import io.swagger.annotations.ApiImplicitParams; +import io.swagger.annotations.ApiOperation; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.ModelAttribute; +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; + +@RestController +@RequestMapping("finance") +@Api(description = "财务相关接口") +public class WxFinanceController extends BaseController { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + private WxFinanceService wxFinanceService; + + @ApiOperation("支付方式列表") + @GetMapping("payWayList") + @ApiImplicitParams({ + @ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true), + @ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true), + }) + public ResultData payWayList(@ModelAttribute WxBillPayWay record, Integer pageNum, Integer pageSize) { + record.updateTenantInfo(getTenantInfo()); + record.setSortColumns(BaseEntity.SortField.CreateTime_DESC); + PageInfo page = wxFinanceService.payWayListAsPage(record, pageNum, pageSize); + return new ResultData(page); + } + + @ApiOperation("能源表新增修改") + @PostMapping("savePayWay") + public ResultData savePayWay(@RequestBody WxBillPayWay record) { + record.updateTenantInfo(getTenantInfo()); + wxFinanceService.saveOrUpdatePayWay(record); + return new ResultData(); + } + + @PostMapping("payWayUpdateIsDel") + public ResultData payWayUpdateIsDel(@RequestBody WxBillPayWay record) { + record.updateTenantInfo(getTenantInfo()); + wxFinanceService.updatePayWayIsDel(record); + return new ResultData(); + } + +} diff --git a/mallinkAdmin/src/main/resources/db/migration/V202407018.sql b/mallinkAdmin/src/main/resources/db/migration/V202407018.sql index 20bceafa7..0c68ab2d8 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V202407018.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V202407018.sql @@ -410,4 +410,1076 @@ create table wx_energy_meter_reading_99 like wx_energy_meter_reading; drop table wx_energy_meter_reading; +alter table wx_bill_rent_0 modify column pay_way bigint(20); +alter table wx_bill_rent_1 modify column pay_way bigint(20); +alter table wx_bill_rent_2 modify column pay_way bigint(20); +alter table wx_bill_rent_3 modify column pay_way bigint(20); +alter table wx_bill_rent_4 modify column pay_way bigint(20); +alter table wx_bill_rent_5 modify column pay_way bigint(20); +alter table wx_bill_rent_6 modify column pay_way bigint(20); +alter table wx_bill_rent_7 modify column pay_way bigint(20); +alter table wx_bill_rent_8 modify column pay_way bigint(20); +alter table wx_bill_rent_9 modify column pay_way bigint(20); +alter table wx_bill_rent_10 modify column pay_way bigint(20); +alter table wx_bill_rent_11 modify column pay_way bigint(20); +alter table wx_bill_rent_12 modify column pay_way bigint(20); +alter table wx_bill_rent_13 modify column pay_way bigint(20); +alter table wx_bill_rent_14 modify column pay_way bigint(20); +alter table wx_bill_rent_15 modify column pay_way bigint(20); +alter table wx_bill_rent_16 modify column pay_way bigint(20); +alter table wx_bill_rent_17 modify column pay_way bigint(20); +alter table wx_bill_rent_18 modify column pay_way bigint(20); +alter table wx_bill_rent_19 modify column pay_way bigint(20); +alter table wx_bill_rent_20 modify column pay_way bigint(20); +alter table wx_bill_rent_21 modify column pay_way bigint(20); +alter table wx_bill_rent_22 modify column pay_way bigint(20); +alter table wx_bill_rent_23 modify column pay_way bigint(20); +alter table wx_bill_rent_24 modify column pay_way bigint(20); +alter table wx_bill_rent_25 modify column pay_way bigint(20); +alter table wx_bill_rent_26 modify column pay_way bigint(20); +alter table wx_bill_rent_27 modify column pay_way bigint(20); +alter table wx_bill_rent_28 modify column pay_way bigint(20); +alter table wx_bill_rent_29 modify column pay_way bigint(20); +alter table wx_bill_rent_30 modify column pay_way bigint(20); +alter table wx_bill_rent_31 modify column pay_way bigint(20); +alter table wx_bill_rent_32 modify column pay_way bigint(20); +alter table wx_bill_rent_33 modify column pay_way bigint(20); +alter table wx_bill_rent_34 modify column pay_way bigint(20); +alter table wx_bill_rent_35 modify column pay_way bigint(20); +alter table wx_bill_rent_36 modify column pay_way bigint(20); +alter table wx_bill_rent_37 modify column pay_way bigint(20); +alter table wx_bill_rent_38 modify column pay_way bigint(20); +alter table wx_bill_rent_39 modify column pay_way bigint(20); +alter table wx_bill_rent_40 modify column pay_way bigint(20); +alter table wx_bill_rent_41 modify column pay_way bigint(20); +alter table wx_bill_rent_42 modify column pay_way bigint(20); +alter table wx_bill_rent_43 modify column pay_way bigint(20); +alter table wx_bill_rent_44 modify column pay_way bigint(20); +alter table wx_bill_rent_45 modify column pay_way bigint(20); +alter table wx_bill_rent_46 modify column pay_way bigint(20); +alter table wx_bill_rent_47 modify column pay_way bigint(20); +alter table wx_bill_rent_48 modify column pay_way bigint(20); +alter table wx_bill_rent_49 modify column pay_way bigint(20); +alter table wx_bill_rent_50 modify column pay_way bigint(20); +alter table wx_bill_rent_51 modify column pay_way bigint(20); +alter table wx_bill_rent_52 modify column pay_way bigint(20); +alter table wx_bill_rent_53 modify column pay_way bigint(20); +alter table wx_bill_rent_54 modify column pay_way bigint(20); +alter table wx_bill_rent_55 modify column pay_way bigint(20); +alter table wx_bill_rent_56 modify column pay_way bigint(20); +alter table wx_bill_rent_57 modify column pay_way bigint(20); +alter table wx_bill_rent_58 modify column pay_way bigint(20); +alter table wx_bill_rent_59 modify column pay_way bigint(20); +alter table wx_bill_rent_60 modify column pay_way bigint(20); +alter table wx_bill_rent_61 modify column pay_way bigint(20); +alter table wx_bill_rent_62 modify column pay_way bigint(20); +alter table wx_bill_rent_63 modify column pay_way bigint(20); +alter table wx_bill_rent_64 modify column pay_way bigint(20); +alter table wx_bill_rent_65 modify column pay_way bigint(20); +alter table wx_bill_rent_66 modify column pay_way bigint(20); +alter table wx_bill_rent_67 modify column pay_way bigint(20); +alter table wx_bill_rent_68 modify column pay_way bigint(20); +alter table wx_bill_rent_69 modify column pay_way bigint(20); +alter table wx_bill_rent_70 modify column pay_way bigint(20); +alter table wx_bill_rent_71 modify column pay_way bigint(20); +alter table wx_bill_rent_72 modify column pay_way bigint(20); +alter table wx_bill_rent_73 modify column pay_way bigint(20); +alter table wx_bill_rent_74 modify column pay_way bigint(20); +alter table wx_bill_rent_75 modify column pay_way bigint(20); +alter table wx_bill_rent_76 modify column pay_way bigint(20); +alter table wx_bill_rent_77 modify column pay_way bigint(20); +alter table wx_bill_rent_78 modify column pay_way bigint(20); +alter table wx_bill_rent_79 modify column pay_way bigint(20); +alter table wx_bill_rent_80 modify column pay_way bigint(20); +alter table wx_bill_rent_81 modify column pay_way bigint(20); +alter table wx_bill_rent_82 modify column pay_way bigint(20); +alter table wx_bill_rent_83 modify column pay_way bigint(20); +alter table wx_bill_rent_84 modify column pay_way bigint(20); +alter table wx_bill_rent_85 modify column pay_way bigint(20); +alter table wx_bill_rent_86 modify column pay_way bigint(20); +alter table wx_bill_rent_87 modify column pay_way bigint(20); +alter table wx_bill_rent_88 modify column pay_way bigint(20); +alter table wx_bill_rent_89 modify column pay_way bigint(20); +alter table wx_bill_rent_90 modify column pay_way bigint(20); +alter table wx_bill_rent_91 modify column pay_way bigint(20); +alter table wx_bill_rent_92 modify column pay_way bigint(20); +alter table wx_bill_rent_93 modify column pay_way bigint(20); +alter table wx_bill_rent_94 modify column pay_way bigint(20); +alter table wx_bill_rent_95 modify column pay_way bigint(20); +alter table wx_bill_rent_96 modify column pay_way bigint(20); +alter table wx_bill_rent_97 modify column pay_way bigint(20); +alter table wx_bill_rent_98 modify column pay_way bigint(20); +alter table wx_bill_rent_99 modify column pay_way bigint(20); + +alter table wx_bill_action_0 modify column pay_way bigint(20); +alter table wx_bill_action_1 modify column pay_way bigint(20); +alter table wx_bill_action_2 modify column pay_way bigint(20); +alter table wx_bill_action_3 modify column pay_way bigint(20); +alter table wx_bill_action_4 modify column pay_way bigint(20); +alter table wx_bill_action_5 modify column pay_way bigint(20); +alter table wx_bill_action_6 modify column pay_way bigint(20); +alter table wx_bill_action_7 modify column pay_way bigint(20); +alter table wx_bill_action_8 modify column pay_way bigint(20); +alter table wx_bill_action_9 modify column pay_way bigint(20); +alter table wx_bill_action_10 modify column pay_way bigint(20); +alter table wx_bill_action_11 modify column pay_way bigint(20); +alter table wx_bill_action_12 modify column pay_way bigint(20); +alter table wx_bill_action_13 modify column pay_way bigint(20); +alter table wx_bill_action_14 modify column pay_way bigint(20); +alter table wx_bill_action_15 modify column pay_way bigint(20); +alter table wx_bill_action_16 modify column pay_way bigint(20); +alter table wx_bill_action_17 modify column pay_way bigint(20); +alter table wx_bill_action_18 modify column pay_way bigint(20); +alter table wx_bill_action_19 modify column pay_way bigint(20); +alter table wx_bill_action_20 modify column pay_way bigint(20); +alter table wx_bill_action_21 modify column pay_way bigint(20); +alter table wx_bill_action_22 modify column pay_way bigint(20); +alter table wx_bill_action_23 modify column pay_way bigint(20); +alter table wx_bill_action_24 modify column pay_way bigint(20); +alter table wx_bill_action_25 modify column pay_way bigint(20); +alter table wx_bill_action_26 modify column pay_way bigint(20); +alter table wx_bill_action_27 modify column pay_way bigint(20); +alter table wx_bill_action_28 modify column pay_way bigint(20); +alter table wx_bill_action_29 modify column pay_way bigint(20); +alter table wx_bill_action_30 modify column pay_way bigint(20); +alter table wx_bill_action_31 modify column pay_way bigint(20); +alter table wx_bill_action_32 modify column pay_way bigint(20); +alter table wx_bill_action_33 modify column pay_way bigint(20); +alter table wx_bill_action_34 modify column pay_way bigint(20); +alter table wx_bill_action_35 modify column pay_way bigint(20); +alter table wx_bill_action_36 modify column pay_way bigint(20); +alter table wx_bill_action_37 modify column pay_way bigint(20); +alter table wx_bill_action_38 modify column pay_way bigint(20); +alter table wx_bill_action_39 modify column pay_way bigint(20); +alter table wx_bill_action_40 modify column pay_way bigint(20); +alter table wx_bill_action_41 modify column pay_way bigint(20); +alter table wx_bill_action_42 modify column pay_way bigint(20); +alter table wx_bill_action_43 modify column pay_way bigint(20); +alter table wx_bill_action_44 modify column pay_way bigint(20); +alter table wx_bill_action_45 modify column pay_way bigint(20); +alter table wx_bill_action_46 modify column pay_way bigint(20); +alter table wx_bill_action_47 modify column pay_way bigint(20); +alter table wx_bill_action_48 modify column pay_way bigint(20); +alter table wx_bill_action_49 modify column pay_way bigint(20); +alter table wx_bill_action_50 modify column pay_way bigint(20); +alter table wx_bill_action_51 modify column pay_way bigint(20); +alter table wx_bill_action_52 modify column pay_way bigint(20); +alter table wx_bill_action_53 modify column pay_way bigint(20); +alter table wx_bill_action_54 modify column pay_way bigint(20); +alter table wx_bill_action_55 modify column pay_way bigint(20); +alter table wx_bill_action_56 modify column pay_way bigint(20); +alter table wx_bill_action_57 modify column pay_way bigint(20); +alter table wx_bill_action_58 modify column pay_way bigint(20); +alter table wx_bill_action_59 modify column pay_way bigint(20); +alter table wx_bill_action_60 modify column pay_way bigint(20); +alter table wx_bill_action_61 modify column pay_way bigint(20); +alter table wx_bill_action_62 modify column pay_way bigint(20); +alter table wx_bill_action_63 modify column pay_way bigint(20); +alter table wx_bill_action_64 modify column pay_way bigint(20); +alter table wx_bill_action_65 modify column pay_way bigint(20); +alter table wx_bill_action_66 modify column pay_way bigint(20); +alter table wx_bill_action_67 modify column pay_way bigint(20); +alter table wx_bill_action_68 modify column pay_way bigint(20); +alter table wx_bill_action_69 modify column pay_way bigint(20); +alter table wx_bill_action_70 modify column pay_way bigint(20); +alter table wx_bill_action_71 modify column pay_way bigint(20); +alter table wx_bill_action_72 modify column pay_way bigint(20); +alter table wx_bill_action_73 modify column pay_way bigint(20); +alter table wx_bill_action_74 modify column pay_way bigint(20); +alter table wx_bill_action_75 modify column pay_way bigint(20); +alter table wx_bill_action_76 modify column pay_way bigint(20); +alter table wx_bill_action_77 modify column pay_way bigint(20); +alter table wx_bill_action_78 modify column pay_way bigint(20); +alter table wx_bill_action_79 modify column pay_way bigint(20); +alter table wx_bill_action_80 modify column pay_way bigint(20); +alter table wx_bill_action_81 modify column pay_way bigint(20); +alter table wx_bill_action_82 modify column pay_way bigint(20); +alter table wx_bill_action_83 modify column pay_way bigint(20); +alter table wx_bill_action_84 modify column pay_way bigint(20); +alter table wx_bill_action_85 modify column pay_way bigint(20); +alter table wx_bill_action_86 modify column pay_way bigint(20); +alter table wx_bill_action_87 modify column pay_way bigint(20); +alter table wx_bill_action_88 modify column pay_way bigint(20); +alter table wx_bill_action_89 modify column pay_way bigint(20); +alter table wx_bill_action_90 modify column pay_way bigint(20); +alter table wx_bill_action_91 modify column pay_way bigint(20); +alter table wx_bill_action_92 modify column pay_way bigint(20); +alter table wx_bill_action_93 modify column pay_way bigint(20); +alter table wx_bill_action_94 modify column pay_way bigint(20); +alter table wx_bill_action_95 modify column pay_way bigint(20); +alter table wx_bill_action_96 modify column pay_way bigint(20); +alter table wx_bill_action_97 modify column pay_way bigint(20); +alter table wx_bill_action_98 modify column pay_way bigint(20); +alter table wx_bill_action_99 modify column pay_way bigint(20); + +alter table wx_bill_rent_manage_0 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_1 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_2 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_3 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_4 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_5 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_6 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_7 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_8 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_9 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_10 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_11 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_12 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_13 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_14 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_15 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_16 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_17 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_18 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_19 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_20 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_21 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_22 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_23 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_24 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_25 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_26 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_27 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_28 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_29 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_30 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_31 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_32 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_33 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_34 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_35 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_36 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_37 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_38 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_39 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_40 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_41 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_42 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_43 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_44 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_45 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_46 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_47 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_48 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_49 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_50 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_51 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_52 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_53 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_54 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_55 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_56 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_57 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_58 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_59 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_60 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_61 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_62 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_63 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_64 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_65 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_66 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_67 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_68 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_69 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_70 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_71 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_72 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_73 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_74 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_75 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_76 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_77 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_78 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_79 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_80 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_81 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_82 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_83 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_84 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_85 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_86 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_87 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_88 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_89 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_90 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_91 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_92 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_93 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_94 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_95 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_96 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_97 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_98 modify column pay_way bigint(20); +alter table wx_bill_rent_manage_99 modify column pay_way bigint(20); + +alter table wx_bill_rent_deposit_0 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_1 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_2 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_3 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_4 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_5 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_6 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_7 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_8 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_9 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_10 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_11 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_12 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_13 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_14 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_15 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_16 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_17 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_18 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_19 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_20 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_21 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_22 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_23 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_24 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_25 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_26 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_27 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_28 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_29 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_30 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_31 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_32 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_33 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_34 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_35 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_36 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_37 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_38 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_39 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_40 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_41 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_42 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_43 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_44 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_45 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_46 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_47 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_48 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_49 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_50 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_51 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_52 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_53 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_54 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_55 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_56 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_57 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_58 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_59 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_60 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_61 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_62 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_63 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_64 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_65 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_66 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_67 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_68 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_69 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_70 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_71 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_72 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_73 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_74 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_75 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_76 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_77 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_78 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_79 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_80 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_81 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_82 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_83 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_84 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_85 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_86 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_87 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_88 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_89 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_90 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_91 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_92 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_93 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_94 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_95 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_96 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_97 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_98 modify column pay_way bigint(20); +alter table wx_bill_rent_deposit_99 modify column pay_way bigint(20); + +alter table wx_bill_property_0 modify column pay_way bigint(20); +alter table wx_bill_property_1 modify column pay_way bigint(20); +alter table wx_bill_property_2 modify column pay_way bigint(20); +alter table wx_bill_property_3 modify column pay_way bigint(20); +alter table wx_bill_property_4 modify column pay_way bigint(20); +alter table wx_bill_property_5 modify column pay_way bigint(20); +alter table wx_bill_property_6 modify column pay_way bigint(20); +alter table wx_bill_property_7 modify column pay_way bigint(20); +alter table wx_bill_property_8 modify column pay_way bigint(20); +alter table wx_bill_property_9 modify column pay_way bigint(20); +alter table wx_bill_property_10 modify column pay_way bigint(20); +alter table wx_bill_property_11 modify column pay_way bigint(20); +alter table wx_bill_property_12 modify column pay_way bigint(20); +alter table wx_bill_property_13 modify column pay_way bigint(20); +alter table wx_bill_property_14 modify column pay_way bigint(20); +alter table wx_bill_property_15 modify column pay_way bigint(20); +alter table wx_bill_property_16 modify column pay_way bigint(20); +alter table wx_bill_property_17 modify column pay_way bigint(20); +alter table wx_bill_property_18 modify column pay_way bigint(20); +alter table wx_bill_property_19 modify column pay_way bigint(20); +alter table wx_bill_property_20 modify column pay_way bigint(20); +alter table wx_bill_property_21 modify column pay_way bigint(20); +alter table wx_bill_property_22 modify column pay_way bigint(20); +alter table wx_bill_property_23 modify column pay_way bigint(20); +alter table wx_bill_property_24 modify column pay_way bigint(20); +alter table wx_bill_property_25 modify column pay_way bigint(20); +alter table wx_bill_property_26 modify column pay_way bigint(20); +alter table wx_bill_property_27 modify column pay_way bigint(20); +alter table wx_bill_property_28 modify column pay_way bigint(20); +alter table wx_bill_property_29 modify column pay_way bigint(20); +alter table wx_bill_property_30 modify column pay_way bigint(20); +alter table wx_bill_property_31 modify column pay_way bigint(20); +alter table wx_bill_property_32 modify column pay_way bigint(20); +alter table wx_bill_property_33 modify column pay_way bigint(20); +alter table wx_bill_property_34 modify column pay_way bigint(20); +alter table wx_bill_property_35 modify column pay_way bigint(20); +alter table wx_bill_property_36 modify column pay_way bigint(20); +alter table wx_bill_property_37 modify column pay_way bigint(20); +alter table wx_bill_property_38 modify column pay_way bigint(20); +alter table wx_bill_property_39 modify column pay_way bigint(20); +alter table wx_bill_property_40 modify column pay_way bigint(20); +alter table wx_bill_property_41 modify column pay_way bigint(20); +alter table wx_bill_property_42 modify column pay_way bigint(20); +alter table wx_bill_property_43 modify column pay_way bigint(20); +alter table wx_bill_property_44 modify column pay_way bigint(20); +alter table wx_bill_property_45 modify column pay_way bigint(20); +alter table wx_bill_property_46 modify column pay_way bigint(20); +alter table wx_bill_property_47 modify column pay_way bigint(20); +alter table wx_bill_property_48 modify column pay_way bigint(20); +alter table wx_bill_property_49 modify column pay_way bigint(20); +alter table wx_bill_property_50 modify column pay_way bigint(20); +alter table wx_bill_property_51 modify column pay_way bigint(20); +alter table wx_bill_property_52 modify column pay_way bigint(20); +alter table wx_bill_property_53 modify column pay_way bigint(20); +alter table wx_bill_property_54 modify column pay_way bigint(20); +alter table wx_bill_property_55 modify column pay_way bigint(20); +alter table wx_bill_property_56 modify column pay_way bigint(20); +alter table wx_bill_property_57 modify column pay_way bigint(20); +alter table wx_bill_property_58 modify column pay_way bigint(20); +alter table wx_bill_property_59 modify column pay_way bigint(20); +alter table wx_bill_property_60 modify column pay_way bigint(20); +alter table wx_bill_property_61 modify column pay_way bigint(20); +alter table wx_bill_property_62 modify column pay_way bigint(20); +alter table wx_bill_property_63 modify column pay_way bigint(20); +alter table wx_bill_property_64 modify column pay_way bigint(20); +alter table wx_bill_property_65 modify column pay_way bigint(20); +alter table wx_bill_property_66 modify column pay_way bigint(20); +alter table wx_bill_property_67 modify column pay_way bigint(20); +alter table wx_bill_property_68 modify column pay_way bigint(20); +alter table wx_bill_property_69 modify column pay_way bigint(20); +alter table wx_bill_property_70 modify column pay_way bigint(20); +alter table wx_bill_property_71 modify column pay_way bigint(20); +alter table wx_bill_property_72 modify column pay_way bigint(20); +alter table wx_bill_property_73 modify column pay_way bigint(20); +alter table wx_bill_property_74 modify column pay_way bigint(20); +alter table wx_bill_property_75 modify column pay_way bigint(20); +alter table wx_bill_property_76 modify column pay_way bigint(20); +alter table wx_bill_property_77 modify column pay_way bigint(20); +alter table wx_bill_property_78 modify column pay_way bigint(20); +alter table wx_bill_property_79 modify column pay_way bigint(20); +alter table wx_bill_property_80 modify column pay_way bigint(20); +alter table wx_bill_property_81 modify column pay_way bigint(20); +alter table wx_bill_property_82 modify column pay_way bigint(20); +alter table wx_bill_property_83 modify column pay_way bigint(20); +alter table wx_bill_property_84 modify column pay_way bigint(20); +alter table wx_bill_property_85 modify column pay_way bigint(20); +alter table wx_bill_property_86 modify column pay_way bigint(20); +alter table wx_bill_property_87 modify column pay_way bigint(20); +alter table wx_bill_property_88 modify column pay_way bigint(20); +alter table wx_bill_property_89 modify column pay_way bigint(20); +alter table wx_bill_property_90 modify column pay_way bigint(20); +alter table wx_bill_property_91 modify column pay_way bigint(20); +alter table wx_bill_property_92 modify column pay_way bigint(20); +alter table wx_bill_property_93 modify column pay_way bigint(20); +alter table wx_bill_property_94 modify column pay_way bigint(20); +alter table wx_bill_property_95 modify column pay_way bigint(20); +alter table wx_bill_property_96 modify column pay_way bigint(20); +alter table wx_bill_property_97 modify column pay_way bigint(20); +alter table wx_bill_property_98 modify column pay_way bigint(20); +alter table wx_bill_property_99 modify column pay_way bigint(20); + +alter table wx_bill_property_deposit_0 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_1 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_2 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_3 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_4 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_5 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_6 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_7 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_8 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_9 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_10 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_11 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_12 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_13 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_14 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_15 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_16 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_17 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_18 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_19 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_20 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_21 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_22 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_23 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_24 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_25 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_26 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_27 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_28 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_29 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_30 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_31 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_32 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_33 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_34 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_35 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_36 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_37 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_38 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_39 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_40 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_41 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_42 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_43 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_44 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_45 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_46 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_47 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_48 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_49 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_50 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_51 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_52 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_53 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_54 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_55 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_56 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_57 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_58 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_59 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_60 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_61 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_62 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_63 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_64 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_65 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_66 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_67 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_68 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_69 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_70 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_71 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_72 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_73 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_74 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_75 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_76 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_77 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_78 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_79 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_80 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_81 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_82 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_83 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_84 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_85 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_86 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_87 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_88 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_89 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_90 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_91 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_92 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_93 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_94 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_95 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_96 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_97 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_98 modify column pay_way bigint(20); +alter table wx_bill_property_deposit_99 modify column pay_way bigint(20); + +alter table wx_bill_daily_0 modify column pay_way bigint(20); +alter table wx_bill_daily_1 modify column pay_way bigint(20); +alter table wx_bill_daily_2 modify column pay_way bigint(20); +alter table wx_bill_daily_3 modify column pay_way bigint(20); +alter table wx_bill_daily_4 modify column pay_way bigint(20); +alter table wx_bill_daily_5 modify column pay_way bigint(20); +alter table wx_bill_daily_6 modify column pay_way bigint(20); +alter table wx_bill_daily_7 modify column pay_way bigint(20); +alter table wx_bill_daily_8 modify column pay_way bigint(20); +alter table wx_bill_daily_9 modify column pay_way bigint(20); +alter table wx_bill_daily_10 modify column pay_way bigint(20); +alter table wx_bill_daily_11 modify column pay_way bigint(20); +alter table wx_bill_daily_12 modify column pay_way bigint(20); +alter table wx_bill_daily_13 modify column pay_way bigint(20); +alter table wx_bill_daily_14 modify column pay_way bigint(20); +alter table wx_bill_daily_15 modify column pay_way bigint(20); +alter table wx_bill_daily_16 modify column pay_way bigint(20); +alter table wx_bill_daily_17 modify column pay_way bigint(20); +alter table wx_bill_daily_18 modify column pay_way bigint(20); +alter table wx_bill_daily_19 modify column pay_way bigint(20); +alter table wx_bill_daily_20 modify column pay_way bigint(20); +alter table wx_bill_daily_21 modify column pay_way bigint(20); +alter table wx_bill_daily_22 modify column pay_way bigint(20); +alter table wx_bill_daily_23 modify column pay_way bigint(20); +alter table wx_bill_daily_24 modify column pay_way bigint(20); +alter table wx_bill_daily_25 modify column pay_way bigint(20); +alter table wx_bill_daily_26 modify column pay_way bigint(20); +alter table wx_bill_daily_27 modify column pay_way bigint(20); +alter table wx_bill_daily_28 modify column pay_way bigint(20); +alter table wx_bill_daily_29 modify column pay_way bigint(20); +alter table wx_bill_daily_30 modify column pay_way bigint(20); +alter table wx_bill_daily_31 modify column pay_way bigint(20); +alter table wx_bill_daily_32 modify column pay_way bigint(20); +alter table wx_bill_daily_33 modify column pay_way bigint(20); +alter table wx_bill_daily_34 modify column pay_way bigint(20); +alter table wx_bill_daily_35 modify column pay_way bigint(20); +alter table wx_bill_daily_36 modify column pay_way bigint(20); +alter table wx_bill_daily_37 modify column pay_way bigint(20); +alter table wx_bill_daily_38 modify column pay_way bigint(20); +alter table wx_bill_daily_39 modify column pay_way bigint(20); +alter table wx_bill_daily_40 modify column pay_way bigint(20); +alter table wx_bill_daily_41 modify column pay_way bigint(20); +alter table wx_bill_daily_42 modify column pay_way bigint(20); +alter table wx_bill_daily_43 modify column pay_way bigint(20); +alter table wx_bill_daily_44 modify column pay_way bigint(20); +alter table wx_bill_daily_45 modify column pay_way bigint(20); +alter table wx_bill_daily_46 modify column pay_way bigint(20); +alter table wx_bill_daily_47 modify column pay_way bigint(20); +alter table wx_bill_daily_48 modify column pay_way bigint(20); +alter table wx_bill_daily_49 modify column pay_way bigint(20); +alter table wx_bill_daily_50 modify column pay_way bigint(20); +alter table wx_bill_daily_51 modify column pay_way bigint(20); +alter table wx_bill_daily_52 modify column pay_way bigint(20); +alter table wx_bill_daily_53 modify column pay_way bigint(20); +alter table wx_bill_daily_54 modify column pay_way bigint(20); +alter table wx_bill_daily_55 modify column pay_way bigint(20); +alter table wx_bill_daily_56 modify column pay_way bigint(20); +alter table wx_bill_daily_57 modify column pay_way bigint(20); +alter table wx_bill_daily_58 modify column pay_way bigint(20); +alter table wx_bill_daily_59 modify column pay_way bigint(20); +alter table wx_bill_daily_60 modify column pay_way bigint(20); +alter table wx_bill_daily_61 modify column pay_way bigint(20); +alter table wx_bill_daily_62 modify column pay_way bigint(20); +alter table wx_bill_daily_63 modify column pay_way bigint(20); +alter table wx_bill_daily_64 modify column pay_way bigint(20); +alter table wx_bill_daily_65 modify column pay_way bigint(20); +alter table wx_bill_daily_66 modify column pay_way bigint(20); +alter table wx_bill_daily_67 modify column pay_way bigint(20); +alter table wx_bill_daily_68 modify column pay_way bigint(20); +alter table wx_bill_daily_69 modify column pay_way bigint(20); +alter table wx_bill_daily_70 modify column pay_way bigint(20); +alter table wx_bill_daily_71 modify column pay_way bigint(20); +alter table wx_bill_daily_72 modify column pay_way bigint(20); +alter table wx_bill_daily_73 modify column pay_way bigint(20); +alter table wx_bill_daily_74 modify column pay_way bigint(20); +alter table wx_bill_daily_75 modify column pay_way bigint(20); +alter table wx_bill_daily_76 modify column pay_way bigint(20); +alter table wx_bill_daily_77 modify column pay_way bigint(20); +alter table wx_bill_daily_78 modify column pay_way bigint(20); +alter table wx_bill_daily_79 modify column pay_way bigint(20); +alter table wx_bill_daily_80 modify column pay_way bigint(20); +alter table wx_bill_daily_81 modify column pay_way bigint(20); +alter table wx_bill_daily_82 modify column pay_way bigint(20); +alter table wx_bill_daily_83 modify column pay_way bigint(20); +alter table wx_bill_daily_84 modify column pay_way bigint(20); +alter table wx_bill_daily_85 modify column pay_way bigint(20); +alter table wx_bill_daily_86 modify column pay_way bigint(20); +alter table wx_bill_daily_87 modify column pay_way bigint(20); +alter table wx_bill_daily_88 modify column pay_way bigint(20); +alter table wx_bill_daily_89 modify column pay_way bigint(20); +alter table wx_bill_daily_90 modify column pay_way bigint(20); +alter table wx_bill_daily_91 modify column pay_way bigint(20); +alter table wx_bill_daily_92 modify column pay_way bigint(20); +alter table wx_bill_daily_93 modify column pay_way bigint(20); +alter table wx_bill_daily_94 modify column pay_way bigint(20); +alter table wx_bill_daily_95 modify column pay_way bigint(20); +alter table wx_bill_daily_96 modify column pay_way bigint(20); +alter table wx_bill_daily_97 modify column pay_way bigint(20); +alter table wx_bill_daily_98 modify column pay_way bigint(20); +alter table wx_bill_daily_99 modify column pay_way bigint(20); + +alter table wx_bill_other_0 modify column pay_way bigint(20); +alter table wx_bill_other_1 modify column pay_way bigint(20); +alter table wx_bill_other_2 modify column pay_way bigint(20); +alter table wx_bill_other_3 modify column pay_way bigint(20); +alter table wx_bill_other_4 modify column pay_way bigint(20); +alter table wx_bill_other_5 modify column pay_way bigint(20); +alter table wx_bill_other_6 modify column pay_way bigint(20); +alter table wx_bill_other_7 modify column pay_way bigint(20); +alter table wx_bill_other_8 modify column pay_way bigint(20); +alter table wx_bill_other_9 modify column pay_way bigint(20); +alter table wx_bill_other_10 modify column pay_way bigint(20); +alter table wx_bill_other_11 modify column pay_way bigint(20); +alter table wx_bill_other_12 modify column pay_way bigint(20); +alter table wx_bill_other_13 modify column pay_way bigint(20); +alter table wx_bill_other_14 modify column pay_way bigint(20); +alter table wx_bill_other_15 modify column pay_way bigint(20); +alter table wx_bill_other_16 modify column pay_way bigint(20); +alter table wx_bill_other_17 modify column pay_way bigint(20); +alter table wx_bill_other_18 modify column pay_way bigint(20); +alter table wx_bill_other_19 modify column pay_way bigint(20); +alter table wx_bill_other_20 modify column pay_way bigint(20); +alter table wx_bill_other_21 modify column pay_way bigint(20); +alter table wx_bill_other_22 modify column pay_way bigint(20); +alter table wx_bill_other_23 modify column pay_way bigint(20); +alter table wx_bill_other_24 modify column pay_way bigint(20); +alter table wx_bill_other_25 modify column pay_way bigint(20); +alter table wx_bill_other_26 modify column pay_way bigint(20); +alter table wx_bill_other_27 modify column pay_way bigint(20); +alter table wx_bill_other_28 modify column pay_way bigint(20); +alter table wx_bill_other_29 modify column pay_way bigint(20); +alter table wx_bill_other_30 modify column pay_way bigint(20); +alter table wx_bill_other_31 modify column pay_way bigint(20); +alter table wx_bill_other_32 modify column pay_way bigint(20); +alter table wx_bill_other_33 modify column pay_way bigint(20); +alter table wx_bill_other_34 modify column pay_way bigint(20); +alter table wx_bill_other_35 modify column pay_way bigint(20); +alter table wx_bill_other_36 modify column pay_way bigint(20); +alter table wx_bill_other_37 modify column pay_way bigint(20); +alter table wx_bill_other_38 modify column pay_way bigint(20); +alter table wx_bill_other_39 modify column pay_way bigint(20); +alter table wx_bill_other_40 modify column pay_way bigint(20); +alter table wx_bill_other_41 modify column pay_way bigint(20); +alter table wx_bill_other_42 modify column pay_way bigint(20); +alter table wx_bill_other_43 modify column pay_way bigint(20); +alter table wx_bill_other_44 modify column pay_way bigint(20); +alter table wx_bill_other_45 modify column pay_way bigint(20); +alter table wx_bill_other_46 modify column pay_way bigint(20); +alter table wx_bill_other_47 modify column pay_way bigint(20); +alter table wx_bill_other_48 modify column pay_way bigint(20); +alter table wx_bill_other_49 modify column pay_way bigint(20); +alter table wx_bill_other_50 modify column pay_way bigint(20); +alter table wx_bill_other_51 modify column pay_way bigint(20); +alter table wx_bill_other_52 modify column pay_way bigint(20); +alter table wx_bill_other_53 modify column pay_way bigint(20); +alter table wx_bill_other_54 modify column pay_way bigint(20); +alter table wx_bill_other_55 modify column pay_way bigint(20); +alter table wx_bill_other_56 modify column pay_way bigint(20); +alter table wx_bill_other_57 modify column pay_way bigint(20); +alter table wx_bill_other_58 modify column pay_way bigint(20); +alter table wx_bill_other_59 modify column pay_way bigint(20); +alter table wx_bill_other_60 modify column pay_way bigint(20); +alter table wx_bill_other_61 modify column pay_way bigint(20); +alter table wx_bill_other_62 modify column pay_way bigint(20); +alter table wx_bill_other_63 modify column pay_way bigint(20); +alter table wx_bill_other_64 modify column pay_way bigint(20); +alter table wx_bill_other_65 modify column pay_way bigint(20); +alter table wx_bill_other_66 modify column pay_way bigint(20); +alter table wx_bill_other_67 modify column pay_way bigint(20); +alter table wx_bill_other_68 modify column pay_way bigint(20); +alter table wx_bill_other_69 modify column pay_way bigint(20); +alter table wx_bill_other_70 modify column pay_way bigint(20); +alter table wx_bill_other_71 modify column pay_way bigint(20); +alter table wx_bill_other_72 modify column pay_way bigint(20); +alter table wx_bill_other_73 modify column pay_way bigint(20); +alter table wx_bill_other_74 modify column pay_way bigint(20); +alter table wx_bill_other_75 modify column pay_way bigint(20); +alter table wx_bill_other_76 modify column pay_way bigint(20); +alter table wx_bill_other_77 modify column pay_way bigint(20); +alter table wx_bill_other_78 modify column pay_way bigint(20); +alter table wx_bill_other_79 modify column pay_way bigint(20); +alter table wx_bill_other_80 modify column pay_way bigint(20); +alter table wx_bill_other_81 modify column pay_way bigint(20); +alter table wx_bill_other_82 modify column pay_way bigint(20); +alter table wx_bill_other_83 modify column pay_way bigint(20); +alter table wx_bill_other_84 modify column pay_way bigint(20); +alter table wx_bill_other_85 modify column pay_way bigint(20); +alter table wx_bill_other_86 modify column pay_way bigint(20); +alter table wx_bill_other_87 modify column pay_way bigint(20); +alter table wx_bill_other_88 modify column pay_way bigint(20); +alter table wx_bill_other_89 modify column pay_way bigint(20); +alter table wx_bill_other_90 modify column pay_way bigint(20); +alter table wx_bill_other_91 modify column pay_way bigint(20); +alter table wx_bill_other_92 modify column pay_way bigint(20); +alter table wx_bill_other_93 modify column pay_way bigint(20); +alter table wx_bill_other_94 modify column pay_way bigint(20); +alter table wx_bill_other_95 modify column pay_way bigint(20); +alter table wx_bill_other_96 modify column pay_way bigint(20); +alter table wx_bill_other_97 modify column pay_way bigint(20); +alter table wx_bill_other_98 modify column pay_way bigint(20); +alter table wx_bill_other_99 modify column pay_way bigint(20); + +alter table wx_bill_other_deposit_0 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_1 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_2 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_3 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_4 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_5 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_6 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_7 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_8 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_9 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_10 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_11 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_12 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_13 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_14 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_15 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_16 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_17 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_18 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_19 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_20 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_21 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_22 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_23 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_24 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_25 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_26 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_27 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_28 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_29 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_30 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_31 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_32 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_33 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_34 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_35 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_36 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_37 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_38 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_39 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_40 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_41 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_42 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_43 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_44 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_45 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_46 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_47 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_48 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_49 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_50 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_51 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_52 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_53 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_54 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_55 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_56 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_57 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_58 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_59 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_60 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_61 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_62 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_63 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_64 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_65 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_66 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_67 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_68 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_69 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_70 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_71 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_72 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_73 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_74 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_75 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_76 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_77 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_78 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_79 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_80 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_81 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_82 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_83 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_84 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_85 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_86 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_87 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_88 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_89 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_90 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_91 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_92 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_93 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_94 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_95 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_96 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_97 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_98 modify column pay_way bigint(20); +alter table wx_bill_other_deposit_99 modify column pay_way bigint(20); + +CREATE TABLE `wx_bill_pay_way` ( + `id` bigint(20) NOT NULL COMMENT '主键ID', + `tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '租户ID', + `parent_tenant_id` varchar(5) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '父租户ID', + `create_time` timestamp NULL DEFAULT NULL, + `update_time` timestamp NULL DEFAULT NULL, + `is_del` int(1) NOT NULL DEFAULT '0', + `name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '表名称', + `is_system` int(1) NOT NULL DEFAULT '0' COMMENT '是否系统默认', + PRIMARY KEY (`id`), + UNIQUE KEY `id_UNIQUE` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci ROW_FORMAT=DYNAMIC COMMENT='能耗表'; + + +create table wx_bill_pay_way_0 like wx_bill_pay_way; +create table wx_bill_pay_way_1 like wx_bill_pay_way; +create table wx_bill_pay_way_2 like wx_bill_pay_way; +create table wx_bill_pay_way_3 like wx_bill_pay_way; +create table wx_bill_pay_way_4 like wx_bill_pay_way; +create table wx_bill_pay_way_5 like wx_bill_pay_way; +create table wx_bill_pay_way_6 like wx_bill_pay_way; +create table wx_bill_pay_way_7 like wx_bill_pay_way; +create table wx_bill_pay_way_8 like wx_bill_pay_way; +create table wx_bill_pay_way_9 like wx_bill_pay_way; +create table wx_bill_pay_way_10 like wx_bill_pay_way; +create table wx_bill_pay_way_11 like wx_bill_pay_way; +create table wx_bill_pay_way_12 like wx_bill_pay_way; +create table wx_bill_pay_way_13 like wx_bill_pay_way; +create table wx_bill_pay_way_14 like wx_bill_pay_way; +create table wx_bill_pay_way_15 like wx_bill_pay_way; +create table wx_bill_pay_way_16 like wx_bill_pay_way; +create table wx_bill_pay_way_17 like wx_bill_pay_way; +create table wx_bill_pay_way_18 like wx_bill_pay_way; +create table wx_bill_pay_way_19 like wx_bill_pay_way; +create table wx_bill_pay_way_20 like wx_bill_pay_way; +create table wx_bill_pay_way_21 like wx_bill_pay_way; +create table wx_bill_pay_way_22 like wx_bill_pay_way; +create table wx_bill_pay_way_23 like wx_bill_pay_way; +create table wx_bill_pay_way_24 like wx_bill_pay_way; +create table wx_bill_pay_way_25 like wx_bill_pay_way; +create table wx_bill_pay_way_26 like wx_bill_pay_way; +create table wx_bill_pay_way_27 like wx_bill_pay_way; +create table wx_bill_pay_way_28 like wx_bill_pay_way; +create table wx_bill_pay_way_29 like wx_bill_pay_way; +create table wx_bill_pay_way_30 like wx_bill_pay_way; +create table wx_bill_pay_way_31 like wx_bill_pay_way; +create table wx_bill_pay_way_32 like wx_bill_pay_way; +create table wx_bill_pay_way_33 like wx_bill_pay_way; +create table wx_bill_pay_way_34 like wx_bill_pay_way; +create table wx_bill_pay_way_35 like wx_bill_pay_way; +create table wx_bill_pay_way_36 like wx_bill_pay_way; +create table wx_bill_pay_way_37 like wx_bill_pay_way; +create table wx_bill_pay_way_38 like wx_bill_pay_way; +create table wx_bill_pay_way_39 like wx_bill_pay_way; +create table wx_bill_pay_way_40 like wx_bill_pay_way; +create table wx_bill_pay_way_41 like wx_bill_pay_way; +create table wx_bill_pay_way_42 like wx_bill_pay_way; +create table wx_bill_pay_way_43 like wx_bill_pay_way; +create table wx_bill_pay_way_44 like wx_bill_pay_way; +create table wx_bill_pay_way_45 like wx_bill_pay_way; +create table wx_bill_pay_way_46 like wx_bill_pay_way; +create table wx_bill_pay_way_47 like wx_bill_pay_way; +create table wx_bill_pay_way_48 like wx_bill_pay_way; +create table wx_bill_pay_way_49 like wx_bill_pay_way; +create table wx_bill_pay_way_50 like wx_bill_pay_way; +create table wx_bill_pay_way_51 like wx_bill_pay_way; +create table wx_bill_pay_way_52 like wx_bill_pay_way; +create table wx_bill_pay_way_53 like wx_bill_pay_way; +create table wx_bill_pay_way_54 like wx_bill_pay_way; +create table wx_bill_pay_way_55 like wx_bill_pay_way; +create table wx_bill_pay_way_56 like wx_bill_pay_way; +create table wx_bill_pay_way_57 like wx_bill_pay_way; +create table wx_bill_pay_way_58 like wx_bill_pay_way; +create table wx_bill_pay_way_59 like wx_bill_pay_way; +create table wx_bill_pay_way_60 like wx_bill_pay_way; +create table wx_bill_pay_way_61 like wx_bill_pay_way; +create table wx_bill_pay_way_62 like wx_bill_pay_way; +create table wx_bill_pay_way_63 like wx_bill_pay_way; +create table wx_bill_pay_way_64 like wx_bill_pay_way; +create table wx_bill_pay_way_65 like wx_bill_pay_way; +create table wx_bill_pay_way_66 like wx_bill_pay_way; +create table wx_bill_pay_way_67 like wx_bill_pay_way; +create table wx_bill_pay_way_68 like wx_bill_pay_way; +create table wx_bill_pay_way_69 like wx_bill_pay_way; +create table wx_bill_pay_way_70 like wx_bill_pay_way; +create table wx_bill_pay_way_71 like wx_bill_pay_way; +create table wx_bill_pay_way_72 like wx_bill_pay_way; +create table wx_bill_pay_way_73 like wx_bill_pay_way; +create table wx_bill_pay_way_74 like wx_bill_pay_way; +create table wx_bill_pay_way_75 like wx_bill_pay_way; +create table wx_bill_pay_way_76 like wx_bill_pay_way; +create table wx_bill_pay_way_77 like wx_bill_pay_way; +create table wx_bill_pay_way_78 like wx_bill_pay_way; +create table wx_bill_pay_way_79 like wx_bill_pay_way; +create table wx_bill_pay_way_80 like wx_bill_pay_way; +create table wx_bill_pay_way_81 like wx_bill_pay_way; +create table wx_bill_pay_way_82 like wx_bill_pay_way; +create table wx_bill_pay_way_83 like wx_bill_pay_way; +create table wx_bill_pay_way_84 like wx_bill_pay_way; +create table wx_bill_pay_way_85 like wx_bill_pay_way; +create table wx_bill_pay_way_86 like wx_bill_pay_way; +create table wx_bill_pay_way_87 like wx_bill_pay_way; +create table wx_bill_pay_way_88 like wx_bill_pay_way; +create table wx_bill_pay_way_89 like wx_bill_pay_way; +create table wx_bill_pay_way_90 like wx_bill_pay_way; +create table wx_bill_pay_way_91 like wx_bill_pay_way; +create table wx_bill_pay_way_92 like wx_bill_pay_way; +create table wx_bill_pay_way_93 like wx_bill_pay_way; +create table wx_bill_pay_way_94 like wx_bill_pay_way; +create table wx_bill_pay_way_95 like wx_bill_pay_way; +create table wx_bill_pay_way_96 like wx_bill_pay_way; +create table wx_bill_pay_way_97 like wx_bill_pay_way; +create table wx_bill_pay_way_98 like wx_bill_pay_way; +create table wx_bill_pay_way_99 like wx_bill_pay_way; + +drop table wx_bill_pay_way; + +INSERT INTO wx_bill_pay_way_3 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1003',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1003',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_8 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1008','1028',NOW(),NOW(),0,'商户小程序',1), (2,'1008','1028',NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_9 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1009',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1009',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_10 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1010',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1010',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_12 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1012',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1012',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_13 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1013',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1013',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_19 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1019',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1019',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_20 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1020','1028',NOW(),NOW(),0,'商户小程序',1), (2,'1020','1028',NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_22 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1022',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1022',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_24 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1024',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1024',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_42 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1042',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1042',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_63 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1063',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1063',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_95 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1095',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1095',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_96 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'1096',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'1096',NULL,NOW(),NOW(),0,'系统自动结清',1); + +INSERT INTO wx_bill_pay_way_89 (id,tenant_id,parent_tenant_id,create_time,update_time,is_del,NAME,is_system) +VALUES (1,'789',NULL,NOW(),NOW(),0,'商户小程序',1), (2,'789',NULL,NOW(),NOW(),0,'系统自动结清',1); + + diff --git a/mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayBillController.java b/mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayBillController.java index 49ff3b150..4502fd718 100644 --- a/mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayBillController.java +++ b/mallinkCallback/src/main/java/com/iformall/controller/callback/WxPayBillController.java @@ -3,10 +3,11 @@ package com.iformall.controller.callback; import com.alibaba.fastjson.JSON; import com.iformall.common.ErrorCode; import com.iformall.controller.base.BaseController; +import com.iformall.domain.po.WxBillPayWay; +import com.iformall.domain.po.WxMall; import com.iformall.domain.po.msg.FmInsideNotifyBillPaidSuccessMsg; import com.iformall.domain.po.msg.FmInsideNotifyCarPaidSuccessMsg; import com.iformall.enums.EnumBillPayChannel; -import com.iformall.enums.EnumBillPayWay; import com.iformall.enums.EnumMsgMqKey; import com.iformall.enums.EnumMsgMqTag; import com.iformall.enums.EnumMsgMqTopic; @@ -18,9 +19,12 @@ import com.iformall.exception.MallinkException; import com.iformall.mq.MqBaseProducer; import com.iformall.pay.WxPayment; import com.iformall.service.MailService; +import com.iformall.service.WxFinanceService; +import com.iformall.service.WxMallService; import com.iformall.service.WxPayBillService; import com.iformall.service.WxRefundOrderService; import com.iformall.service.msg.impl.FmInsideNotifyBillPaidSuccessMsgServiceImpl; +import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; import com.iformall.utils.XmlUtil; import org.apache.commons.io.IOUtils; @@ -72,16 +76,22 @@ public class WxPayBillController extends BaseController { @Autowired private MqBaseProducer mqBaseProducer; + @Autowired + private WxFinanceService wxFinanceService; + + @Autowired + private WxMallService wxMallService; + @Autowired private FmInsideNotifyBillPaidSuccessMsgServiceImpl fmInsideNotifyBillPaidSuccessMsgServiceImpl; - private void handleCallBack(String tenantId,EnumMsgRecordType msgType,EnumBillPayChannel payChannel,EnumBillPayWay payWay,Map params) throws Exception { + private void handleCallBack(String tenantId,EnumMsgRecordType msgType,EnumBillPayChannel payChannel,WxBillPayWay payWay,Map params) throws Exception { FmInsideNotifyBillPaidSuccessMsg refundSuccessMsg = new FmInsideNotifyBillPaidSuccessMsg(); refundSuccessMsg.setTenantId(tenantId); refundSuccessMsg.setMsgType(msgType.getCode()); refundSuccessMsg.setDelayTimeLevel(3); refundSuccessMsg.setPayChannel(payChannel.getCode()); - refundSuccessMsg.setPayWay(payWay.getCode()); + refundSuccessMsg.setPayWayJson(JSON.toJSONString(payWay)); refundSuccessMsg.setJsonMsg(JSON.toJSONString(params)); fmInsideNotifyBillPaidSuccessMsgServiceImpl.send(refundSuccessMsg); //mqBaseProducer.sendMessage(refundSuccessMsg, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode()); @@ -96,7 +106,9 @@ public class WxPayBillController extends BaseController { xml = IOUtils.toString(request.getInputStream(), Charset.forName("UTF-8")); paramMap = WxPayment.xmlToMap(xml); paramMap.put("tenantId", tenantId); - handleCallBack(tenantId, EnumMsgRecordType.BILL_PAID, EnumBillPayChannel.WX_MINI_PROGRAM, EnumBillPayWay.WECHAT_PAY, paramMap); + WxMall mall = wxMallService.getByTenantId(tenantId); + WxBillPayWay payWay = wxFinanceService.getPayWayById(mall, Constant.bill_pay_way_minigrame); + handleCallBack(tenantId, EnumMsgRecordType.BILL_PAID, EnumBillPayChannel.WX_MINI_PROGRAM, payWay, paramMap); logger.info("billPaid wxpay, notify success, req : " + xml + ", resp: " + response.toString()); SortedMap resultMap = new TreeMap(); resultMap.put("return_code", "SUCCESS"); @@ -127,22 +139,16 @@ public class WxPayBillController extends BaseController { @RequestMapping(value = "/jianhang/paid/{tenantId}") public String jianhangPaidCallback(@PathVariable String tenantId,HttpServletRequest request) { try { - EnumBillPayWay payWay = null; String payway_real = request.getParameter("ACC_TYPE"); - if ("AL".equals(payway_real.toUpperCase())) { - payWay = EnumBillPayWay.ALIPAY; - }else if ("WX".equals(payway_real.toUpperCase())) { - payWay = EnumBillPayWay.WECHAT_PAY; - }else { - payWay = EnumBillPayWay.BANK; - } + WxMall mall = wxMallService.getByTenantId(tenantId); + WxBillPayWay payWay = wxFinanceService.getPayWayById(mall, Constant.bill_pay_way_minigrame); Map paramMap = new HashMap(); paramMap.put("SUCCESS", request.getParameter("SUCCESS")); paramMap.put("PAYMENT", request.getParameter("PAYMENT")); paramMap.put("REMARK1", request.getParameter("REMARK1")); paramMap.put("REMARK2", request.getParameter("REMARK2")); paramMap.put("ORDERID", request.getParameter("ORDERID")); - paramMap.put("ACC_TYPE", payway_real); + //paramMap.put("ACC_TYPE", payway_real); logger.info("jianhang paid:"+JSON.toJSONString(paramMap)); handleCallBack(tenantId, EnumMsgRecordType.BILL_PAID, EnumBillPayChannel.BANK_JIANSHE_MA, payWay, paramMap); return "success"; diff --git a/mallinkSchedule/src/main/java/com/iformall/schedule/PowerBillAutoBuildSchedule.java b/mallinkSchedule/src/main/java/com/iformall/schedule/PowerBillAutoBuildSchedule.java index eb8552504..70bb16a20 100644 --- a/mallinkSchedule/src/main/java/com/iformall/schedule/PowerBillAutoBuildSchedule.java +++ b/mallinkSchedule/src/main/java/com/iformall/schedule/PowerBillAutoBuildSchedule.java @@ -63,171 +63,171 @@ public class PowerBillAutoBuildSchedule { */ // @Async // @Scheduled(cron = "0 0 5 * * ?") - public void powerBillAutoConfigStart() { - logger.info("自动生成电费账单开始...."); - int dayOfMonth = LocalDate.now().getDayOfMonth(); - List wxPowerBillAutoConfigs = wxPowerBillAutoConfigMapper.selectList(new QueryWrapper(null)); - if (null != wxPowerBillAutoConfigs) { - wxPowerBillAutoConfigs = wxPowerBillAutoConfigs.stream().filter(config -> StringUtils.isNotEmpty(config.getUnitPrice()) - && StringUtils.isNotEmpty(config.getBuildDay()) - && StringUtils.isNotEmpty(config.getReceiveDay())) - .collect(Collectors.toList()); - for (int i = 0; i < wxPowerBillAutoConfigs.size(); i++) { - WxPowerBillAutoConfig wxPowerBillAutoConfig = wxPowerBillAutoConfigs.get(i); - if (String.valueOf(dayOfMonth).equals(wxPowerBillAutoConfig.getBuildDay())) { - merchantPowerBillConfigStart(wxPowerBillAutoConfig); - } - } - } - logger.info("自动生成电费账单结束...."); - } - - private void merchantPowerBillConfigStart(WxPowerBillAutoConfig wxPowerBillAutoConfig) { - WxMerchantPowerBillConfig wxMerchantPowerBillConfig = new WxMerchantPowerBillConfig(); - wxMerchantPowerBillConfig.updateTenantInfo(wxPowerBillAutoConfig); - List wxMerchantPowerBillConfigs = wxMerchantPowerBillConfigMapper.selectList(new QueryWrapper(wxMerchantPowerBillConfig)); - if (null != wxMerchantPowerBillConfigs) { - for (int i = 0; i < wxMerchantPowerBillConfigs.size(); i++) { - buildPowerBill(wxMerchantPowerBillConfigs.get(i), wxPowerBillAutoConfig); - } - } - } - - private void buildPowerBill(WxMerchantPowerBillConfig wxMerchantPowerBillConfig, WxPowerBillAutoConfig wxPowerBillAutoConfig) { - - Map monthDate = getLastMonthDate(); - Date startdate = monthDate.get("startdate"); - Date enddate = monthDate.get("enddate"); - Date lastdate = monthDate.get("lastdate"); - MallUserInfo mallUserInfo = getMallUserInfo(); - WxBillDaily wxBillDaily = getBillDaily(wxMerchantPowerBillConfig); - Date receiveDate = getReceiveDate(Integer.parseInt(wxPowerBillAutoConfig.getReceiveDay())); - String receivePay; - String unitPrice; - long usedPower = 0L; - Long merchantId = wxMerchantPowerBillConfig.getMerchantId(); - if (wxMerchantPowerBillConfig.getBuildWay().equals(EnumPowerBillBuildWay.METER.getCode())) { - //根据日期拉取电量 单价 * 电量 = 电费 - usedPower = getUsedPower(startdate, lastdate, merchantId); - if (usedPower == 0) { - logger.info("没有电量使用,不生成账单>>>>商户ID:" + merchantId); - return; - } - //按电表 单价从商户配置表中取 因为会修改 - unitPrice = wxMerchantPowerBillConfig.getPrice(); - receivePay = new BigDecimal(unitPrice).multiply(new BigDecimal(usedPower)) - .setScale(Constant.default_long_decimal_size, RoundingMode.HALF_EVEN).toPlainString(); - } else { - //按固定金额 单位从统一配置表中取 - unitPrice = wxPowerBillAutoConfig.getUnitPrice(); - String price = wxMerchantPowerBillConfig.getPrice(); - receivePay = new BigDecimal(price).toPlainString(); - } - - JSONArray priceDetals = new JSONArray(); - JSONObject priceDetal = new JSONObject(); - priceDetal.put("key", "unitPrice"); - priceDetal.put("value", unitPrice); - priceDetals.add(priceDetal); - priceDetal = new JSONObject(); - priceDetal.put("key", "power"); - priceDetal.put("value", new BigDecimal(usedPower).divide(new BigDecimal(100)).toPlainString()); - priceDetals.add(priceDetal); - - wxBillDaily.setReceivePay(receivePay); - wxBillDaily.setNeedPay(receivePay); - wxBillDaily.setReceiveDate(receiveDate); - wxBillDaily.setStarttime(startdate); - wxBillDaily.setEndtime(enddate); - wxBillDaily.setPriceDetail(priceDetals.toJSONString()); - wxBillDaily.setBuildWay(EnumBillDailyBuildWay.AUTO.getCode()); - wxBillDailyService.saveOrUpdate(wxBillDaily, mallUserInfo); - - } - - private int getUsedPower(Date startdate, Date lastdate, Long merchantId) { - KwMerchantMeter kwMerchantMeter = new KwMerchantMeter(); - kwMerchantMeter.setMerchantId(merchantId); - kwMerchantMeter.setStatus(EnumMerchantMeterStatus.VALID.getCode()); - List merchantMeterList = kwMerchantMeterMapper.selectList(new QueryWrapper(kwMerchantMeter)); - int usedPower = 0; - if (!merchantMeterList.isEmpty()) { - int size = merchantMeterList.size(); - for (int i = 0; i < size; i++) { - KwMerchantMeter merchantMeter = merchantMeterList.get(i); - KwMeterDataDto kwMeterDataDto = new KwMeterDataDto(); - kwMeterDataDto.updateTenantInfo(merchantMeter); - kwMeterDataDto.setMeterId(merchantMeter.getMeterId()); - kwMeterDataDto.setStartTime(startdate); - kwMeterDataDto.setEndTime(lastdate); - KwMeterDataVo power = kwMeterDataService.getPower(kwMeterDataDto); - if (power != null) { - Optional usedPowerOptional = Optional.ofNullable(power.getUsedPower()); - Integer integer = usedPowerOptional.orElse(0); - usedPower += integer; - } - } - } - return usedPower; - } - - private WxBillDaily getBillDaily(WxMerchantPowerBillConfig wxMerchantPowerBillConfig) { - WxBillDaily wxBillDaily = new WxBillDaily(); - Long merchantId = wxMerchantPowerBillConfig.getMerchantId(); - wxBillDaily.setShopId(getShopId(merchantId)); - wxBillDaily.updateTenantInfo(wxMerchantPowerBillConfig); - wxBillDaily.setMerchantId(merchantId); - wxBillDaily.setMerchantName(wxMerchantPowerBillConfig.getMerchantName()); - wxBillDaily.setType(EnumBillDailyType.POWER.getCode()); - wxBillDaily.setRentShopType(wxMerchantPowerBillConfig.getMerchantType()); - wxBillDaily.setPay("0"); - wxBillDaily.setPayWay(EnumBillPayWay.OTHER.getCode()); - return wxBillDaily; - } - - private Map getLastMonthDate() { - ZoneId zoneId = ZoneOffset.systemDefault(); - LocalDate now = LocalDate.now().minusMonths(1L); - now = now.with(TemporalAdjusters.firstDayOfMonth()); - Instant start = now.atStartOfDay().atZone(zoneId).toInstant(); - Date first = Date.from(start); - now = now.with(TemporalAdjusters.lastDayOfMonth()); - Instant end = now.atStartOfDay().atZone(zoneId).toInstant(); - Date last = Date.from(end); - now = now.with(TemporalAdjusters.firstDayOfNextMonth()); - Instant lastday = now.atStartOfDay().atZone(zoneId).toInstant(); - Date next = Date.from(lastday); - Map dateMap = new HashMap<>(3); - dateMap.put("startdate", first); - dateMap.put("enddate", last); - dateMap.put("lastdate", next); - return dateMap; - } - - private Date getReceiveDate(int day) { - ZoneId zoneId = ZoneOffset.systemDefault(); - LocalDate of = LocalDate.of(LocalDate.now().getYear(), LocalDate.now().getMonth(), day); - Instant instant = of.atStartOfDay().atZone(zoneId).toInstant(); - return Date.from(instant); - } - - private Long getShopId(Long merchantId) { - WxMerchantShop wxMerchantShop = new WxMerchantShop(); - wxMerchantShop.setMerchantId(merchantId); - wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); - List select = wxMerchantShopMapper.selectList(new QueryWrapper(wxMerchantShop)); - if (!select.isEmpty()) { - return select.get(0).getShopId(); - } - return 0L; - } - - private MallUserInfo getMallUserInfo() { - MallUserInfo mallUserInfo = new MallUserInfo(); - mallUserInfo.setId(0L); - mallUserInfo.setName("系统生成"); - mallUserInfo.setPhone("0"); - return mallUserInfo; - } +// public void powerBillAutoConfigStart() { +// logger.info("自动生成电费账单开始...."); +// int dayOfMonth = LocalDate.now().getDayOfMonth(); +// List wxPowerBillAutoConfigs = wxPowerBillAutoConfigMapper.selectList(new QueryWrapper(null)); +// if (null != wxPowerBillAutoConfigs) { +// wxPowerBillAutoConfigs = wxPowerBillAutoConfigs.stream().filter(config -> StringUtils.isNotEmpty(config.getUnitPrice()) +// && StringUtils.isNotEmpty(config.getBuildDay()) +// && StringUtils.isNotEmpty(config.getReceiveDay())) +// .collect(Collectors.toList()); +// for (int i = 0; i < wxPowerBillAutoConfigs.size(); i++) { +// WxPowerBillAutoConfig wxPowerBillAutoConfig = wxPowerBillAutoConfigs.get(i); +// if (String.valueOf(dayOfMonth).equals(wxPowerBillAutoConfig.getBuildDay())) { +// merchantPowerBillConfigStart(wxPowerBillAutoConfig); +// } +// } +// } +// logger.info("自动生成电费账单结束...."); +// } +// +// private void merchantPowerBillConfigStart(WxPowerBillAutoConfig wxPowerBillAutoConfig) { +// WxMerchantPowerBillConfig wxMerchantPowerBillConfig = new WxMerchantPowerBillConfig(); +// wxMerchantPowerBillConfig.updateTenantInfo(wxPowerBillAutoConfig); +// List wxMerchantPowerBillConfigs = wxMerchantPowerBillConfigMapper.selectList(new QueryWrapper(wxMerchantPowerBillConfig)); +// if (null != wxMerchantPowerBillConfigs) { +// for (int i = 0; i < wxMerchantPowerBillConfigs.size(); i++) { +// buildPowerBill(wxMerchantPowerBillConfigs.get(i), wxPowerBillAutoConfig); +// } +// } +// } +// +// private void buildPowerBill(WxMerchantPowerBillConfig wxMerchantPowerBillConfig, WxPowerBillAutoConfig wxPowerBillAutoConfig) { +// +// Map monthDate = getLastMonthDate(); +// Date startdate = monthDate.get("startdate"); +// Date enddate = monthDate.get("enddate"); +// Date lastdate = monthDate.get("lastdate"); +// MallUserInfo mallUserInfo = getMallUserInfo(); +// WxBillDaily wxBillDaily = getBillDaily(wxMerchantPowerBillConfig); +// Date receiveDate = getReceiveDate(Integer.parseInt(wxPowerBillAutoConfig.getReceiveDay())); +// String receivePay; +// String unitPrice; +// long usedPower = 0L; +// Long merchantId = wxMerchantPowerBillConfig.getMerchantId(); +// if (wxMerchantPowerBillConfig.getBuildWay().equals(EnumPowerBillBuildWay.METER.getCode())) { +// //根据日期拉取电量 单价 * 电量 = 电费 +// usedPower = getUsedPower(startdate, lastdate, merchantId); +// if (usedPower == 0) { +// logger.info("没有电量使用,不生成账单>>>>商户ID:" + merchantId); +// return; +// } +// //按电表 单价从商户配置表中取 因为会修改 +// unitPrice = wxMerchantPowerBillConfig.getPrice(); +// receivePay = new BigDecimal(unitPrice).multiply(new BigDecimal(usedPower)) +// .setScale(Constant.default_long_decimal_size, RoundingMode.HALF_EVEN).toPlainString(); +// } else { +// //按固定金额 单位从统一配置表中取 +// unitPrice = wxPowerBillAutoConfig.getUnitPrice(); +// String price = wxMerchantPowerBillConfig.getPrice(); +// receivePay = new BigDecimal(price).toPlainString(); +// } +// +// JSONArray priceDetals = new JSONArray(); +// JSONObject priceDetal = new JSONObject(); +// priceDetal.put("key", "unitPrice"); +// priceDetal.put("value", unitPrice); +// priceDetals.add(priceDetal); +// priceDetal = new JSONObject(); +// priceDetal.put("key", "power"); +// priceDetal.put("value", new BigDecimal(usedPower).divide(new BigDecimal(100)).toPlainString()); +// priceDetals.add(priceDetal); +// +// wxBillDaily.setReceivePay(receivePay); +// wxBillDaily.setNeedPay(receivePay); +// wxBillDaily.setReceiveDate(receiveDate); +// wxBillDaily.setStarttime(startdate); +// wxBillDaily.setEndtime(enddate); +// wxBillDaily.setPriceDetail(priceDetals.toJSONString()); +// wxBillDaily.setBuildWay(EnumBillDailyBuildWay.AUTO.getCode()); +// wxBillDailyService.saveOrUpdate(wxBillDaily, mallUserInfo); +// +// } +// +// private int getUsedPower(Date startdate, Date lastdate, Long merchantId) { +// KwMerchantMeter kwMerchantMeter = new KwMerchantMeter(); +// kwMerchantMeter.setMerchantId(merchantId); +// kwMerchantMeter.setStatus(EnumMerchantMeterStatus.VALID.getCode()); +// List merchantMeterList = kwMerchantMeterMapper.selectList(new QueryWrapper(kwMerchantMeter)); +// int usedPower = 0; +// if (!merchantMeterList.isEmpty()) { +// int size = merchantMeterList.size(); +// for (int i = 0; i < size; i++) { +// KwMerchantMeter merchantMeter = merchantMeterList.get(i); +// KwMeterDataDto kwMeterDataDto = new KwMeterDataDto(); +// kwMeterDataDto.updateTenantInfo(merchantMeter); +// kwMeterDataDto.setMeterId(merchantMeter.getMeterId()); +// kwMeterDataDto.setStartTime(startdate); +// kwMeterDataDto.setEndTime(lastdate); +// KwMeterDataVo power = kwMeterDataService.getPower(kwMeterDataDto); +// if (power != null) { +// Optional usedPowerOptional = Optional.ofNullable(power.getUsedPower()); +// Integer integer = usedPowerOptional.orElse(0); +// usedPower += integer; +// } +// } +// } +// return usedPower; +// } +// +// private WxBillDaily getBillDaily(WxMerchantPowerBillConfig wxMerchantPowerBillConfig) { +// WxBillDaily wxBillDaily = new WxBillDaily(); +// Long merchantId = wxMerchantPowerBillConfig.getMerchantId(); +// wxBillDaily.setShopId(getShopId(merchantId)); +// wxBillDaily.updateTenantInfo(wxMerchantPowerBillConfig); +// wxBillDaily.setMerchantId(merchantId); +// wxBillDaily.setMerchantName(wxMerchantPowerBillConfig.getMerchantName()); +// wxBillDaily.setType(EnumBillDailyType.POWER.getCode()); +// wxBillDaily.setRentShopType(wxMerchantPowerBillConfig.getMerchantType()); +// wxBillDaily.setPay("0"); +// wxBillDaily.setPayWay(EnumBillPayWay.OTHER.getCode()); +// return wxBillDaily; +// } +// +// private Map getLastMonthDate() { +// ZoneId zoneId = ZoneOffset.systemDefault(); +// LocalDate now = LocalDate.now().minusMonths(1L); +// now = now.with(TemporalAdjusters.firstDayOfMonth()); +// Instant start = now.atStartOfDay().atZone(zoneId).toInstant(); +// Date first = Date.from(start); +// now = now.with(TemporalAdjusters.lastDayOfMonth()); +// Instant end = now.atStartOfDay().atZone(zoneId).toInstant(); +// Date last = Date.from(end); +// now = now.with(TemporalAdjusters.firstDayOfNextMonth()); +// Instant lastday = now.atStartOfDay().atZone(zoneId).toInstant(); +// Date next = Date.from(lastday); +// Map dateMap = new HashMap<>(3); +// dateMap.put("startdate", first); +// dateMap.put("enddate", last); +// dateMap.put("lastdate", next); +// return dateMap; +// } +// +// private Date getReceiveDate(int day) { +// ZoneId zoneId = ZoneOffset.systemDefault(); +// LocalDate of = LocalDate.of(LocalDate.now().getYear(), LocalDate.now().getMonth(), day); +// Instant instant = of.atStartOfDay().atZone(zoneId).toInstant(); +// return Date.from(instant); +// } +// +// private Long getShopId(Long merchantId) { +// WxMerchantShop wxMerchantShop = new WxMerchantShop(); +// wxMerchantShop.setMerchantId(merchantId); +// wxMerchantShop.setIsDel(EnumDelStatus.NOT_DEL.getCode()); +// List select = wxMerchantShopMapper.selectList(new QueryWrapper(wxMerchantShop)); +// if (!select.isEmpty()) { +// return select.get(0).getShopId(); +// } +// return 0L; +// } +// +// private MallUserInfo getMallUserInfo() { +// MallUserInfo mallUserInfo = new MallUserInfo(); +// mallUserInfo.setId(0L); +// mallUserInfo.setName("系统生成"); +// mallUserInfo.setPhone("0"); +// return mallUserInfo; +// } } \ No newline at end of file diff --git a/mallinkService/src/main/java/com/iformall/config/BaseMyBatisConfiguration.java b/mallinkService/src/main/java/com/iformall/config/BaseMyBatisConfiguration.java index 7abc97dba..52bab084b 100644 --- a/mallinkService/src/main/java/com/iformall/config/BaseMyBatisConfiguration.java +++ b/mallinkService/src/main/java/com/iformall/config/BaseMyBatisConfiguration.java @@ -435,6 +435,13 @@ public class BaseMyBatisConfiguration { wxEnergyMeterReadingSharding.setRule(EnumShardingRule.HASH.getCode()); shardingList.add(wxEnergyMeterReadingSharding); + ShardingSphere wxBillPayWaySharding = new ShardingSphere(); + wxBillPayWaySharding.setColumn("tenant_id"); + wxBillPayWaySharding.setTableName("wx_bill_pay_way"); + wxBillPayWaySharding.setCount(100); + wxBillPayWaySharding.setRule(EnumShardingRule.HASH.getCode()); + shardingList.add(wxBillPayWaySharding); + //初始化 shardingSpherePlugin.setShardingSpheres(shardingList); Properties properties = new Properties(); diff --git a/mallinkService/src/main/java/com/iformall/domain/dto/WxBillPayDTO.java b/mallinkService/src/main/java/com/iformall/domain/dto/WxBillPayDTO.java index 7d971976f..02ec170e0 100644 --- a/mallinkService/src/main/java/com/iformall/domain/dto/WxBillPayDTO.java +++ b/mallinkService/src/main/java/com/iformall/domain/dto/WxBillPayDTO.java @@ -1,5 +1,6 @@ package com.iformall.domain.dto; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.base.TenantEntity; import lombok.Data; @@ -14,7 +15,7 @@ public class WxBillPayDTO extends TenantEntity{ private Long id; private Integer billTypeValue;// EnumBillAllType private String addpay;//支付金额 - private Integer payWay;//支付方式 EnumBillPayWay + private WxBillPayWay payWay;//支付方式 private String remark; private String image; } diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillAction.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillAction.java index f1fd4733b..b3500e897 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillAction.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillAction.java @@ -57,8 +57,8 @@ public class WxBillAction extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value = "付款时间", name = "payDate") private Date payDate; - @io.swagger.annotations.ApiModelProperty(value = "付款方式EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "付款方式", name = "payWay") + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "备注", name = "remark") private String remark; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java index 6b2d092f9..a55ed49ae 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java @@ -64,7 +64,7 @@ public class WxBillDaily extends WxBillBaseEntity { private String shopName; @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "费用明细", name = "priceDetail") private String priceDetail; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java index 3e2f29180..bf2a72f69 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java @@ -66,7 +66,7 @@ public class WxBillDeposit extends WxBillBaseEntity { private String shopInfo; @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "冻结状态,0正常1冻结", name = "freeze") private Integer freeze; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java index f22756465..a2b2eceda 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java @@ -65,8 +65,8 @@ public class WxBillOther extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId") private Long shopId; - @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") + private Long payWay; @TableField(exist = false) private Integer allPeriod; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java index e1a235824..65f68ce40 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java @@ -69,8 +69,8 @@ public class WxBillOtherDeposit extends WxBillBaseEntity { return new BigDecimal(getOwe()).subtract(new BigDecimal(returnPrice)).toPlainString(); } - @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") + private Long payWay; @TableField(exist = false) private Integer allPeriod; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillPayWay.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPayWay.java new file mode 100644 index 000000000..0378eb4c2 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPayWay.java @@ -0,0 +1,39 @@ +package com.iformall.domain.po; + +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableName; +import com.iformall.domain.po.base.TenantEntity; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.ToString; +import java.util.Date; +import java.util.List; + +/** + */ +@TableName(value = "wx_bill_pay_way") +@Data +@ToString(callSuper = true) +@EqualsAndHashCode(callSuper = true) +public class WxBillPayWay extends TenantEntity { + + private static final long serialVersionUID = 7009117540201976664L; + + @io.swagger.annotations.ApiModelProperty(value="id",name="id") + private Long id; + + @io.swagger.annotations.ApiModelProperty(value="name",name="name") + private String name; + + @io.swagger.annotations.ApiModelProperty(value="createTime",name="createTime") + private Date createTime; + + @io.swagger.annotations.ApiModelProperty(value="updateTime",name="updateTime") + private Date updateTime; + + @io.swagger.annotations.ApiModelProperty(value = "isDel", name = "isDel") + private Integer isDel; + + @io.swagger.annotations.ApiModelProperty(value = "isSystem", name = "isSystem") + private Integer isSystem; +} diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java index 17f14608d..edf3d6b98 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java @@ -86,8 +86,8 @@ public class WxBillProperty extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; - @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "滞纳金状态", name = "latePayStatus") private Integer latePayStatus; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java index 03ca6b83c..b83156bcb 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java @@ -69,8 +69,8 @@ public class WxBillPropertyDeposit extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; - @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "冻结状态,0正常1冻结", name = "freeze") private Integer freeze; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java index 97ae5bfcb..d0a423c12 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java @@ -157,9 +157,8 @@ public class WxBillRent extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; - @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; - + @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "滞纳金状态", name = "latePayStatus") private Integer latePayStatus; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java index 8052c95c5..5ff214783 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRentManage.java @@ -93,8 +93,8 @@ public class WxBillRentManage extends WxBillBaseEntity { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; - @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "支付方式", name = "payWay") + private Long payWay; @io.swagger.annotations.ApiModelProperty(value = "滞纳金状态", name = "latePayStatus") diff --git a/mallinkService/src/main/java/com/iformall/domain/po/msg/FmInsideNotifyBillPaidSuccessMsg.java b/mallinkService/src/main/java/com/iformall/domain/po/msg/FmInsideNotifyBillPaidSuccessMsg.java index 4a71f9b95..dabeb0099 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/msg/FmInsideNotifyBillPaidSuccessMsg.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/msg/FmInsideNotifyBillPaidSuccessMsg.java @@ -12,8 +12,8 @@ public class FmInsideNotifyBillPaidSuccessMsg extends BaseMsg { @io.swagger.annotations.ApiModelProperty(value = "支付渠道 EnumBillPayChannel", name = "payWay") private Integer payChannel; - @io.swagger.annotations.ApiModelProperty(value = "支付渠道 EnumBillPayWay", name = "payWay") - private Integer payWay; + @io.swagger.annotations.ApiModelProperty(value = "支付渠道", name = "payWay") + private String payWayJson; @io.swagger.annotations.ApiModelProperty(value = "消息内容", name = "jsonMsg") private String jsonMsg; diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillAction.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillAction.java index 197633067..4c7ab50ff 100644 --- a/mallinkService/src/main/java/com/iformall/enums/EnumBillAction.java +++ b/mallinkService/src/main/java/com/iformall/enums/EnumBillAction.java @@ -1,5 +1,6 @@ package com.iformall.enums; +import com.iformall.domain.po.WxBillPayWay; /** * @author gongbiao @@ -42,22 +43,18 @@ public enum EnumBillAction { return message; } - public String getDescription(String oldMoney,String newMoney,Integer payWay,EnumBillStatus oldStatus,EnumBillStatus newStatus) { - EnumBillPayWay pw = null; - if (null != payWay) { - pw = EnumBillPayWay.getEnum(payWay); - } + public String getDescription(String oldMoney,String newMoney,WxBillPayWay payWay,EnumBillStatus oldStatus,EnumBillStatus newStatus) { StringBuffer sb = new StringBuffer("[").append(this.message).append("]"); if (code.intValue() == SELF_SERVICE_PAY.code.intValue()) { - if (null != pw) { - sb.append(pw.getMessage()).append("支付"); + if (null != payWay) { + sb.append(payWay.getName()).append("支付"); } sb.append(newMoney).append("元"); }else if (code.intValue() == UPDATE_BILL.code.intValue()) { sb.append("应付金额").append(oldMoney).append("元变更成").append(newMoney).append("元"); }else if (code.intValue() == OFFLINE_PAY.code.intValue()) { - if (null != pw) { - sb.append(pw.getMessage()).append("支付"); + if (null != payWay) { + sb.append(payWay.getName()).append("支付"); } sb.append(newMoney).append("元"); }else if (code.intValue() == RETURN.code.intValue()) { diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java deleted file mode 100644 index 813b45b67..000000000 --- a/mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java +++ /dev/null @@ -1,37 +0,0 @@ -package com.iformall.enums; - -/** - * Created by Stormeye on 2018/08/09. - */ -public enum EnumBillPayWay { - CASH(1, "现金缴费"), - ALIPAY(2, "支付宝缴费"), - WECHAT_PAY(3, "微信缴费"), - BANK(4, "银行卡转账缴费"), - OTHER(-1, "其他缴费"); - - public static EnumBillPayWay getEnum(Integer code) { - for (EnumBillPayWay value : values()) { - if (value.getCode().equals(code)) { - return value; - } - } - return null; - } - - private Integer code; - private String message; - - EnumBillPayWay(Integer code, String message) { - this.code = code; - this.message = message; - } - - public Integer getCode() { - return code; - } - - public String getMessage() { - return message; - } -} diff --git a/mallinkService/src/main/java/com/iformall/mapper/WxBillPayWayMapper.java b/mallinkService/src/main/java/com/iformall/mapper/WxBillPayWayMapper.java new file mode 100644 index 000000000..c7666a045 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/mapper/WxBillPayWayMapper.java @@ -0,0 +1,18 @@ +package com.iformall.mapper; + +import com.iformall.common.CommonMapper; +import com.iformall.domain.po.WxBillPayWay; +import org.apache.ibatis.annotations.Param; +import java.util.List; + +/** + */ +public interface WxBillPayWayMapper extends CommonMapper { + + List findList(WxBillPayWay wxBillRent); + + WxBillPayWay selectById(@Param("id")Long id,@Param("tenantId")String tenantId); + + void setIsDel(@Param("id")Long id,@Param("tenantId")String tenantId,@Param("isDel")Integer isDel); + +} diff --git a/mallinkService/src/main/java/com/iformall/service/WxFinanceService.java b/mallinkService/src/main/java/com/iformall/service/WxFinanceService.java new file mode 100644 index 000000000..d2848521f --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/WxFinanceService.java @@ -0,0 +1,18 @@ +package com.iformall.service; + +import java.util.Map; +import com.github.pagehelper.PageInfo; +import com.iformall.domain.po.WxBillPayWay; +import com.iformall.domain.po.base.TenantEntity; +/** + */ +public interface WxFinanceService { + + //支付方式 + PageInfo payWayListAsPage(WxBillPayWay record, Integer pageIndex, Integer pageSize); + WxBillPayWay getPayWayById(TenantEntity tenantEntity,Long id); + void saveOrUpdatePayWay(WxBillPayWay record); + void updatePayWayIsDel(WxBillPayWay record); + Map getPayWayMap(WxBillPayWay record); + void payWayInit(TenantEntity tenantInfo); +} diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillBaseService.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillBaseService.java index 32269e6f0..b07e8f789 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillBaseService.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillBaseService.java @@ -9,9 +9,9 @@ import org.springframework.stereotype.Service; import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillAction; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxMerchantBUser; import com.iformall.enums.EnumBillAction; -import com.iformall.enums.EnumBillAllType; import com.iformall.enums.EnumBillStatus; import com.iformall.enums.EnumSystemUserType; import com.iformall.service.WxBillActionService; @@ -24,7 +24,7 @@ public class WxBillBaseService{ @Autowired private WxBillActionService wxBillActionService; - protected void addBillAction(EnumBillAction billAction, Integer billType,Long billId, String oldMoney, String newMoney,Date payDate,Integer payWay,String remark, EnumBillStatus oldStatus,EnumBillStatus newStatus,MallUserInfo mallUserInfo) { + protected void addBillAction(EnumBillAction billAction, Integer billType,Long billId, String oldMoney, String newMoney,Date payDate,WxBillPayWay payWay,String remark, EnumBillStatus oldStatus,EnumBillStatus newStatus,MallUserInfo mallUserInfo) { WxBillAction wxBillAction = new WxBillAction(); wxBillAction.setBillId(billId); wxBillAction.setBillType(billType); @@ -33,13 +33,13 @@ public class WxBillBaseService{ wxBillAction.setDetails(billAction.getDescription(oldMoney, newMoney,payWay,oldStatus,newStatus)); wxBillAction.setAction(billAction.getCode()); wxBillAction.setPayDate(payDate); - wxBillAction.setPayWay(payWay); + wxBillAction.setPayWay(payWay.getId()); wxBillAction.setRemark(remark); wxBillAction.setUserType(EnumSystemUserType.ADMIN.getCode()); wxBillActionService.modifyBill(wxBillAction, mallUserInfo); } - protected void addBillAction(EnumBillAction billAction, Integer billType,Long billId, String oldMoney, String newMoney,Date payDate,Integer payWay,String remark,EnumBillStatus oldStatus,EnumBillStatus newStatus, WxMerchantBUser bUser) { + protected void addBillAction(EnumBillAction billAction, Integer billType,Long billId, String oldMoney, String newMoney,Date payDate,WxBillPayWay payWay,String remark,EnumBillStatus oldStatus,EnumBillStatus newStatus, WxMerchantBUser bUser) { WxBillAction wxBillAction = new WxBillAction(); wxBillAction.setBillId(billId); wxBillAction.setBillType(billType); @@ -48,7 +48,7 @@ public class WxBillBaseService{ wxBillAction.setDetails(billAction.getDescription(oldMoney, newMoney,payWay,oldStatus,newStatus)); wxBillAction.setAction(billAction.getCode()); wxBillAction.setPayDate(payDate); - wxBillAction.setPayWay(payWay); + wxBillAction.setPayWay(payWay.getId()); wxBillAction.setRemark(remark); wxBillAction.setUserType(EnumSystemUserType.MERCHANT.getCode()); wxBillActionService.modifyBill(wxBillAction, bUser); diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java index 72dd95a76..60889cade 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDailyServiceImpl.java @@ -1,7 +1,5 @@ package com.iformall.service.impl; -import com.alibaba.druid.Constants; -import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.iformall.common.ErrorCode; @@ -10,14 +8,22 @@ import com.iformall.common.Result; import com.iformall.common.ResultData; import com.iformall.domain.dto.WxBillPayDTO; import com.iformall.domain.dto.WxBillReceiveUpdateDTO; -import com.iformall.domain.po.*; +import com.iformall.domain.po.MallUserInfo; +import com.iformall.domain.po.WxBillAction; +import com.iformall.domain.po.WxBillDaily; +import com.iformall.domain.po.WxBillPayWay; +import com.iformall.domain.po.WxMerchant; +import com.iformall.domain.po.WxMerchantBUser; +import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillDailyExportVo; import com.iformall.domain.vo.WxBillDailyVo; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; -import com.iformall.enums.*; +import com.iformall.enums.EnumBillAction; +import com.iformall.enums.EnumBillStatus; +import com.iformall.enums.EnumDelStatus; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillDailyMapper; import com.iformall.mapper.WxMerchantMapper; @@ -26,12 +32,12 @@ import com.iformall.mapper.WxShopMapper; import com.iformall.service.ExcelService; import com.iformall.service.WxBillActionService; import com.iformall.service.WxBillDailyService; +import com.iformall.service.WxFinanceService; import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.helper.WxBillAllHelper; import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -41,15 +47,15 @@ import org.springframework.context.annotation.Lazy; import org.springframework.data.redis.core.StringRedisTemplate; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; -import java.util.*; -import java.util.concurrent.TimeUnit; +import java.util.ArrayList; +import java.util.Date; +import java.util.List; +import java.util.Map; /** - * @author gongbiao */ @Service public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillDailyService { @@ -80,6 +86,10 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillDaily record, Integer pageIndex, Integer pageSize) { @@ -495,12 +505,12 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD //租赁账单更新 wxBillDaily.setReceivePay(dto.getNewPrice()); Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillDaily.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillDailyMapper.updateById(wxBillDaily); @@ -592,7 +602,7 @@ public class WxBillDailyServiceImpl extends WxBillBaseService implements WxBillD } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillDailyMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java index 960abc1cd..5547b34d6 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillDepositServiceImpl.java @@ -14,6 +14,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillAction; import com.iformall.domain.po.WxBillDeposit; import com.iformall.domain.po.WxBillOtherDeposit; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxMerchantBUser; @@ -25,7 +26,6 @@ import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.EnumBillAction; -import com.iformall.enums.EnumBillPayWay; import com.iformall.enums.EnumBillStatus; import com.iformall.enums.EnumDelStatus; import com.iformall.enums.EnumRentContractType; @@ -37,6 +37,7 @@ import com.iformall.mapper.WxRentContractMapper; import com.iformall.service.ExcelService; import com.iformall.service.WxBillActionService; import com.iformall.service.WxBillDepositService; +import com.iformall.service.WxFinanceService; import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.WxShopService; @@ -97,6 +98,10 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillDeposit record, Integer pageIndex, Integer pageSize) { @@ -448,12 +453,12 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil dto.getServiceChargePayBefore(), dto.getServiceChargePayUpdate(),null,null,dto.getRemark(),null,null, user); }else { wxBillDeposit.setReceivePay(dto.getNewPrice()); - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillDeposit.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillDepositMapper.updateById(wxBillDeposit); @@ -526,7 +531,7 @@ public class WxBillDepositServiceImpl extends WxBillBaseService implements WxBil } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillDepositMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java index 028854ec5..32687cbe4 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherDepositServiceImpl.java @@ -14,6 +14,7 @@ import com.iformall.domain.po.WxBillAction; import com.iformall.domain.po.WxBillDaily; import com.iformall.domain.po.WxBillDeposit; import com.iformall.domain.po.WxBillOtherDeposit; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxMerchantBUser; @@ -22,7 +23,9 @@ import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; -import com.iformall.enums.*; +import com.iformall.enums.EnumBillAction; +import com.iformall.enums.EnumBillStatus; +import com.iformall.enums.EnumDelStatus; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillOtherDepositMapper; import com.iformall.mapper.WxMerchantMapper; @@ -30,11 +33,12 @@ import com.iformall.mapper.WxShopMapper; import com.iformall.service.ExcelService; import com.iformall.service.WxBillActionService; import com.iformall.service.WxBillOtherDepositService; +import com.iformall.service.WxFinanceService; import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.helper.WxBillAllHelper; +import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -43,7 +47,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; @@ -54,7 +57,6 @@ import java.util.List; import java.util.Map; /** - * @author gongbiao */ @Service public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements WxBillOtherDepositService { @@ -85,6 +87,10 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillOtherDeposit record, Integer pageIndex, Integer pageSize) { @@ -456,12 +462,12 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements }else { wxBillOtherDeposit.setReceivePay(dto.getNewPrice()); Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillOtherDeposit.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillOtherDepositMapper.updateById(wxBillOtherDeposit); @@ -536,7 +542,7 @@ public class WxBillOtherDepositServiceImpl extends WxBillBaseService implements } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillOtherDepositMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java index 1393e6ab2..13f02476a 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillOtherServiceImpl.java @@ -13,6 +13,7 @@ import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillAction; import com.iformall.domain.po.WxBillDaily; import com.iformall.domain.po.WxBillOther; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxBillRent; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxMerchantBUser; @@ -21,7 +22,9 @@ import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; -import com.iformall.enums.*; +import com.iformall.enums.EnumBillAction; +import com.iformall.enums.EnumBillStatus; +import com.iformall.enums.EnumDelStatus; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillOtherMapper; import com.iformall.mapper.WxMerchantMapper; @@ -29,11 +32,12 @@ import com.iformall.mapper.WxShopMapper; import com.iformall.service.ExcelService; import com.iformall.service.WxBillActionService; import com.iformall.service.WxBillOtherService; +import com.iformall.service.WxFinanceService; import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.helper.WxBillAllHelper; +import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; - import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; @@ -42,7 +46,6 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; - import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; @@ -53,7 +56,6 @@ import java.util.List; import java.util.Map; /** - * @author gongbiao */ @Service public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillOtherService { @@ -84,6 +86,10 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillOther record, Integer pageIndex, Integer pageSize) { @@ -399,12 +405,12 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO }else { wxBillOther.setReceivePay(dto.getNewPrice()); Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillOther.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillOtherMapper.updateById(wxBillOther); @@ -479,7 +485,7 @@ public class WxBillOtherServiceImpl extends WxBillBaseService implements WxBillO } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillOtherMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java index e99982362..06969db28 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyDepositServiceImpl.java @@ -12,6 +12,7 @@ import com.iformall.domain.dto.WxBillReceiveUpdateDTO; import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillAction; import com.iformall.domain.po.WxBillDeposit; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxBillProperty; import com.iformall.domain.po.WxBillPropertyDeposit; import com.iformall.domain.po.WxBillRent; @@ -25,7 +26,6 @@ import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; import com.iformall.enums.EnumBillAction; -import com.iformall.enums.EnumBillPayWay; import com.iformall.enums.EnumBillStatus; import com.iformall.enums.EnumDelStatus; import com.iformall.enums.EnumRentShopType; @@ -36,6 +36,7 @@ import com.iformall.mapper.WxPropertyContractMapper; import com.iformall.service.ExcelService; import com.iformall.service.WxBillActionService; import com.iformall.service.WxBillPropertyDepositService; +import com.iformall.service.WxFinanceService; import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.WxShopService; @@ -91,6 +92,10 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillPropertyDeposit record, Integer pageIndex, Integer pageSize) { @@ -433,12 +438,12 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen }else { wxBillPropertyDeposit.setReceivePay(dto.getNewPrice()); Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillPropertyDeposit.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillPropertyDepositMapper.updateById(wxBillPropertyDeposit); @@ -510,7 +515,7 @@ public class WxBillPropertyDepositServiceImpl extends WxBillBaseService implemen } } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillPropertyDepositMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java index 1ad3bcaae..3b50ea12f 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillPropertyServiceImpl.java @@ -9,20 +9,41 @@ import com.iformall.common.Result; import com.iformall.common.ResultData; import com.iformall.domain.dto.WxBillPayDTO; import com.iformall.domain.dto.WxBillReceiveUpdateDTO; -import com.iformall.domain.po.*; +import com.iformall.domain.po.MallUserInfo; +import com.iformall.domain.po.WxBillAction; +import com.iformall.domain.po.WxBillPayWay; +import com.iformall.domain.po.WxBillProperty; +import com.iformall.domain.po.WxBillPropertyDeposit; +import com.iformall.domain.po.WxMerchant; +import com.iformall.domain.po.WxMerchantBUser; +import com.iformall.domain.po.WxPayAccountBill; +import com.iformall.domain.po.WxPropertyContract; +import com.iformall.domain.po.WxShop; import com.iformall.domain.po.base.BaseEntity; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; -import com.iformall.enums.*; +import com.iformall.enums.EnumBillAction; +import com.iformall.enums.EnumBillStatus; +import com.iformall.enums.EnumDelStatus; +import com.iformall.enums.EnumRentShopType; +import com.iformall.enums.EnumYesOrNo; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillActionMapper; import com.iformall.mapper.WxBillPropertyDepositMapper; import com.iformall.mapper.WxBillPropertyMapper; import com.iformall.mapper.WxPropertyContractMapper; -import com.iformall.service.*; +import com.iformall.service.ExcelService; +import com.iformall.service.WxBillActionService; +import com.iformall.service.WxBillPropertyDepositService; +import com.iformall.service.WxBillPropertyService; +import com.iformall.service.WxFinanceService; +import com.iformall.service.WxMerchantService; +import com.iformall.service.WxPayAccountBillService; +import com.iformall.service.WxShopService; import com.iformall.service.helper.WxBillAllHelper; +import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; import org.apache.commons.collections.CollectionUtils; @@ -37,7 +58,12 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; /** @@ -81,7 +107,10 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi @Lazy @Autowired WxBillAllHelper wxBillAllHelper; - + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillProperty record, Integer pageIndex, Integer pageSize) { @@ -519,13 +548,13 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi dto.getServiceChargePayBefore(), dto.getServiceChargePayUpdate(),null,null,dto.getRemark(),null,null, user); } else { Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); wxBillProperty.setReceivePay(dto.getNewPrice()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillProperty.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillPropertyMapper.updateById(wxBillProperty); @@ -618,7 +647,7 @@ public class WxBillPropertyServiceImpl extends WxBillBaseService implements WxBi } } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillPropertyMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java index a0831d353..ef8888f70 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentManageServiceImpl.java @@ -11,8 +11,7 @@ import com.iformall.domain.dto.WxBillPayDTO; import com.iformall.domain.dto.WxBillReceiveUpdateDTO; import com.iformall.domain.po.MallUserInfo; import com.iformall.domain.po.WxBillAction; -import com.iformall.domain.po.WxBillDeposit; -import com.iformall.domain.po.WxBillRent; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxBillRentManage; import com.iformall.domain.po.WxMerchant; import com.iformall.domain.po.WxMerchantBUser; @@ -22,7 +21,12 @@ import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; -import com.iformall.enums.*; +import com.iformall.enums.EnumBillAction; +import com.iformall.enums.EnumBillStatus; +import com.iformall.enums.EnumDelStatus; +import com.iformall.enums.EnumIsPreview; +import com.iformall.enums.EnumRentShopType; +import com.iformall.enums.EnumYesOrNo; import com.iformall.exception.MallinkException; import com.iformall.mapper.WxBillActionMapper; import com.iformall.mapper.WxBillRentManageMapper; @@ -30,11 +34,11 @@ import com.iformall.mapper.WxRentContractMapper; import com.iformall.service.ExcelService; import com.iformall.service.WxBillActionService; import com.iformall.service.WxBillRentManageService; +import com.iformall.service.WxFinanceService; import com.iformall.service.WxMerchantService; import com.iformall.service.WxPayAccountBillService; import com.iformall.service.helper.WxBillAllHelper; import com.iformall.utils.Constant; -import com.iformall.utils.DateUtils; import org.apache.commons.collections.CollectionUtils; import org.apache.commons.lang3.StringUtils; @@ -43,12 +47,16 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; import org.springframework.stereotype.Service; -import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; -import java.util.*; +import java.util.ArrayList; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; /** @@ -83,6 +91,11 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillRentManage wxBillRentManage, Integer pageIndex, Integer pageSize) { @@ -449,12 +462,12 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W //租赁账单更新 wxBillRent.setReceivePay(dto.getNewPrice()); Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillRentManageMapper.updateById(wxBillRent); @@ -548,7 +561,7 @@ public class WxBillRentManageServiceImpl extends WxBillBaseService implements W } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillRentManageMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java index f0d20891a..d53d8b283 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java @@ -9,16 +9,43 @@ import com.iformall.common.Result; import com.iformall.common.ResultData; import com.iformall.domain.dto.WxBillPayDTO; import com.iformall.domain.dto.WxBillReceiveUpdateDTO; -import com.iformall.domain.po.*; +import com.iformall.domain.po.MallUserInfo; +import com.iformall.domain.po.WxBillAction; +import com.iformall.domain.po.WxBillDeposit; +import com.iformall.domain.po.WxBillPayWay; +import com.iformall.domain.po.WxBillRent; +import com.iformall.domain.po.WxMerchant; +import com.iformall.domain.po.WxMerchantBUser; +import com.iformall.domain.po.WxPayAccountBill; +import com.iformall.domain.po.WxRentContract; import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.vo.RatioVo; import com.iformall.domain.vo.WxBillHotNotify; import com.iformall.domain.vo.WxBillNotify; import com.iformall.domain.vo.WxBillSum; -import com.iformall.enums.*; +import com.iformall.enums.EnumBillAction; +import com.iformall.enums.EnumBillStatus; +import com.iformall.enums.EnumBusRatioTime; +import com.iformall.enums.EnumDelStatus; +import com.iformall.enums.EnumGetRatioFrom; +import com.iformall.enums.EnumMissTimeType; +import com.iformall.enums.EnumRentContractType; +import com.iformall.enums.EnumRentShopType; +import com.iformall.enums.EnumYesOrNo; import com.iformall.exception.MallinkException; -import com.iformall.mapper.*; -import com.iformall.service.*; +import com.iformall.mapper.WxBillActionMapper; +import com.iformall.mapper.WxBillDepositMapper; +import com.iformall.mapper.WxBillRentManageMapper; +import com.iformall.mapper.WxBillRentMapper; +import com.iformall.mapper.WxRentContractMapper; +import com.iformall.service.ExcelService; +import com.iformall.service.WxBillActionService; +import com.iformall.service.WxBillDepositService; +import com.iformall.service.WxBillRentService; +import com.iformall.service.WxFinanceService; +import com.iformall.service.WxMerchantService; +import com.iformall.service.WxMerchantTradeDailyService; +import com.iformall.service.WxPayAccountBillService; import com.iformall.service.helper.WxBillAllHelper; import com.iformall.utils.Constant; import com.iformall.utils.DateUtils; @@ -41,7 +68,13 @@ import javax.servlet.http.HttpServletResponse; import java.math.BigDecimal; import java.math.RoundingMode; import java.text.SimpleDateFormat; -import java.util.*; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; /** @@ -79,6 +112,10 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe @Lazy @Autowired WxBillAllHelper wxBillAllHelper; + + @Lazy + @Autowired + WxFinanceService wxFinanceService; @Override public PageInfo listAsPage(WxBillRent record, Integer pageIndex, Integer pageSize) { @@ -621,12 +658,12 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe //租赁账单更新 wxBillRent.setReceivePay(dto.getNewPrice()); Date payDate = null; - Integer payWay = null; + WxBillPayWay payWay = null; String remark = StringUtils.trimToEmpty(dto.getRemark()); if (new BigDecimal(dto.getNewPrice()).compareTo(new BigDecimal(dbBill.getPay())) <= 0) { wxBillRent.setStatus(EnumBillStatus.PAID.getCode()); payDate = new Date(); - payWay = EnumBillPayWay.OTHER.getCode(); + payWay = wxFinanceService.getPayWayById(dto, Constant.bill_pay_way_system); remark = remark + ";【系统】账单实际应付金额调整至小于等于已付金额,自动归结为结清。"; } wxBillRentMapper.updateById(wxBillRent); @@ -719,7 +756,7 @@ public class WxBillRentServiceImpl extends WxBillBaseService implements WxBillRe } wxBillRent.setPayDate(new Date()); - wxBillRent.setPayWay(dto.getPayWay()); + wxBillRent.setPayWay(dto.getPayWay().getId()); wxBillRentMapper.updateById(wxBillRent); dto.setRemark(sb.toString()); return wxBillRent; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java new file mode 100644 index 000000000..bad42dd07 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFinanceServiceImpl.java @@ -0,0 +1,104 @@ +package com.iformall.service.impl; + +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.iformall.common.ErrorCode; +import com.iformall.common.IdWorker; +import com.iformall.domain.po.*; +import com.iformall.domain.po.base.TenantEntity; +import com.iformall.enums.EnumYesOrNo; +import com.iformall.exception.MallinkException; +import com.iformall.mapper.*; +import com.iformall.service.*; +import com.iformall.utils.Constant; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import java.util.*; + +/** + */ +@Service +public class WxFinanceServiceImpl implements WxFinanceService { + private final Logger logger = LoggerFactory.getLogger(this.getClass()); + + @Autowired + WxBillPayWayMapper wxBillPayWayMapper; + + @Override + public PageInfo payWayListAsPage(WxBillPayWay record, Integer pageIndex, Integer pageSize) { + PageInfo page = PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxBillPayWayMapper.findList(record)); + return page; + } + + @Override + public WxBillPayWay getPayWayById(TenantEntity tenantEntity,Long id) { + return wxBillPayWayMapper.selectById(id, tenantEntity.getTenantId()); + } + + @Override + public void saveOrUpdatePayWay(WxBillPayWay record) { + Date date = new Date(); + if (record.getId() == null) { + final IdWorker idWorker = IdWorker.get(); + record.setId(idWorker.nextId()); + record.setCreateTime(date); + record.setUpdateTime(date); + record.setIsSystem(EnumYesOrNo.NO.getCode()); + try { + wxBillPayWayMapper.insert(record); + } catch (Exception e) { + logger.error("保存租赁账单失败,e:" + e.getMessage()); + throw new MallinkException(ErrorCode.DB_FAIL.getCode(), "DB FAILD " + e.getMessage()); + } + } else { + record.setUpdateTime(date); + wxBillPayWayMapper.updateById(record); + } + } + + @Override + public void updatePayWayIsDel(WxBillPayWay record) { + wxBillPayWayMapper.setIsDel(record.getId(), record.getTenantId(), record.getIsDel()); + } + + @Override + public Map getPayWayMap(WxBillPayWay record) { + List list = wxBillPayWayMapper.findList(record); + if (null != list && list.size() > 0 ) { + Map retMap = new HashMap(); + for (int i = 0 ; i paramMap = JSON.parseObject(msg.getJsonMsg(), Map.class); + WxBillPayWay payWay = JSON.parseObject(msg.getPayWayJson(), WxBillPayWay.class); payBillServiceFactory.getPayAdapterService(msg.getPayChannel()) - .paidCallBack(msg.getTenantId(),EnumBillPayWay.getEnum(msg.getPayWay()),paramMap); + .paidCallBack(msg.getTenantId(),payWay,paramMap); } } diff --git a/mallinkService/src/main/java/com/iformall/service/payBill/PayBillAdapterService.java b/mallinkService/src/main/java/com/iformall/service/payBill/PayBillAdapterService.java index 20e87a8bd..9531e8e11 100644 --- a/mallinkService/src/main/java/com/iformall/service/payBill/PayBillAdapterService.java +++ b/mallinkService/src/main/java/com/iformall/service/payBill/PayBillAdapterService.java @@ -2,10 +2,10 @@ package com.iformall.service.payBill; import java.util.Map; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxMerchantBUser; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.base.WxBillBaseEntity; -import com.iformall.enums.EnumBillPayWay; public interface PayBillAdapterService { @@ -13,5 +13,5 @@ public interface PayBillAdapterService { public Object createPay(WxPayAccountBill wxPayAccountBill,WxMerchantBUser buser,WxBillBaseEntity billdetail,Double money,Map params) throws Exception; //支付通知处理 - public void paidCallBack(String tenantId,EnumBillPayWay payWay,Map paramMap); + public void paidCallBack(String tenantId,WxBillPayWay payWay,Map paramMap); } diff --git a/mallinkService/src/main/java/com/iformall/service/payBill/PayBillServiceFactory.java b/mallinkService/src/main/java/com/iformall/service/payBill/PayBillServiceFactory.java index d9125a0a0..6f28b2474 100644 --- a/mallinkService/src/main/java/com/iformall/service/payBill/PayBillServiceFactory.java +++ b/mallinkService/src/main/java/com/iformall/service/payBill/PayBillServiceFactory.java @@ -1,46 +1,12 @@ package com.iformall.service.payBill; import com.iformall.common.ErrorCode; -import com.iformall.enums.EnumAppPlat; import com.iformall.enums.EnumBillPayChannel; -import com.iformall.enums.EnumBillPayWay; -import com.iformall.enums.EnumPayVersion; -import com.iformall.enums.EnumPayWay; import com.iformall.exception.MallinkException; -import com.iformall.service.pay.service.cashout.CashOutAdapterService; -import com.iformall.service.pay.service.cashout.wx.sft.WxCashOutSFTAdapterService; -import com.iformall.service.pay.service.cashout.wx.v2.WxCashOutQYFKAdapterService; -import com.iformall.service.pay.service.fee.ServiceFeeAdapterService; -import com.iformall.service.pay.service.fee.TtServiceFeeService; -import com.iformall.service.pay.service.fee.WxServiceFeeService; -import com.iformall.service.pay.service.pay.CDrivingPayService; -import com.iformall.service.pay.service.pay.CPassivePayService; -import com.iformall.service.pay.service.pay.PayAdapterService; -import com.iformall.service.pay.service.pay.douyin.v2.miniApp.TtMiniAppPayAdapterService; -import com.iformall.service.pay.service.pay.douyin.v3.open.TtOpenPayAdapterService; -import com.iformall.service.pay.service.pay.wx.sft.h5.WxH5PaySFTService; -import com.iformall.service.pay.service.pay.wx.sft.miniApp.appPay.WxMiniAppPaySFTAdapterService; -import com.iformall.service.pay.service.pay.wx.v2.h5.WxH5PayService; -import com.iformall.service.pay.service.pay.wx.v2.miniApp.appPay.WxMiniAppPayAdapterService; -import com.iformall.service.pay.service.pay.wx.v2.miniApp.maPay.WxMiniMaPayAdapterService; -import com.iformall.service.pay.service.pay.wx.v3.miniApp.appPay.WxMiniAppPayV3AdapterService; -import com.iformall.service.pay.service.refund.RefundPayAdapterService; -import com.iformall.service.pay.service.refund.douyin.v2.TtRefundAdapterService; -import com.iformall.service.pay.service.refund.douyin.v3.TtOpenRefundAdapterService; -import com.iformall.service.pay.service.refund.wx.v2.WxRefundAdapterService; -import com.iformall.service.pay.service.refund.wx.v3.WxRefundV3AdapterService; -import com.iformall.service.pay.service.share.PayShareAdapterService; -import com.iformall.service.pay.service.share.douyin.v2.TtPayShareService; -import com.iformall.service.pay.service.share.douyin.v3.TtOpenShareService; -import com.iformall.service.pay.service.share.wx.sft.WxPayShareSFTService; -import com.iformall.service.pay.service.share.wx.v2.WxPayShareService; -import com.iformall.service.pay.service.share.wx.v3.WxPayShareV3Service; import com.iformall.service.payBill.impl.jianhang.JianHangMaServiceImpl; import com.iformall.service.payBill.impl.wx.WxMiniProgramServiceImpl; - import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; - import java.util.Map; import java.util.concurrent.ConcurrentHashMap; diff --git a/mallinkService/src/main/java/com/iformall/service/payBill/impl/PayBillBaseService.java b/mallinkService/src/main/java/com/iformall/service/payBill/impl/PayBillBaseService.java index 72f5b8666..864c62f16 100644 --- a/mallinkService/src/main/java/com/iformall/service/payBill/impl/PayBillBaseService.java +++ b/mallinkService/src/main/java/com/iformall/service/payBill/impl/PayBillBaseService.java @@ -4,9 +4,9 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.iformall.domain.dto.WxBillPayDTO; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxMerchantBUser; import com.iformall.enums.EnumBillAllType; -import com.iformall.enums.EnumBillPayWay; import com.iformall.service.WxMerchantBUserService; import com.iformall.service.helper.WxBillAllHelper; @@ -18,13 +18,13 @@ public class PayBillBaseService { @Autowired WxMerchantBUserService wxMerchantBUserService; - public void updateBillPaid(String tenantId,Long merchantBUserId,EnumBillAllType billType,Long billId,String paid,EnumBillPayWay payWay,String remark) { + public void updateBillPaid(String tenantId,Long merchantBUserId,EnumBillAllType billType,Long billId,String paid,WxBillPayWay payWay,String remark) { WxBillPayDTO dto = new WxBillPayDTO(); dto.setTenantId(tenantId); dto.setId(billId); dto.setBillTypeValue(billType.getCode()); dto.setAddpay(paid); - dto.setPayWay(payWay.getCode()); + dto.setPayWay(payWay); dto.setRemark(remark); WxMerchantBUser buser = wxMerchantBUserService.getById(merchantBUserId); diff --git a/mallinkService/src/main/java/com/iformall/service/payBill/impl/jianhang/JianHangMaServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/payBill/impl/jianhang/JianHangMaServiceImpl.java index aad78803c..f4a59b1d4 100644 --- a/mallinkService/src/main/java/com/iformall/service/payBill/impl/jianhang/JianHangMaServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/payBill/impl/jianhang/JianHangMaServiceImpl.java @@ -13,11 +13,11 @@ import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; import com.iformall.common.IdWorker; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxMerchantBUser; import com.iformall.domain.po.WxPayAccountBill; import com.iformall.domain.po.base.WxBillBaseEntity; import com.iformall.enums.EnumBillAllType; -import com.iformall.enums.EnumBillPayWay; import com.iformall.service.payBill.PayBillAdapterService; import com.iformall.service.payBill.impl.PayBillBaseService; import com.iformall.utils.DateUtils; @@ -45,7 +45,7 @@ public class JianHangMaServiceImpl extends PayBillBaseService implements PayBill } @Override - public void paidCallBack(String tenantId,EnumBillPayWay payWay, Map paramMap) { + public void paidCallBack(String tenantId,WxBillPayWay payWay, Map paramMap) { String success = (String) paramMap.get("SUCCESS"); if ("Y".equals(success.toUpperCase())) { String money = (String) paramMap.get("PAYMENT"); diff --git a/mallinkService/src/main/java/com/iformall/service/payBill/impl/wx/WxMiniProgramServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/payBill/impl/wx/WxMiniProgramServiceImpl.java index 8a73a3f16..681a460f3 100644 --- a/mallinkService/src/main/java/com/iformall/service/payBill/impl/wx/WxMiniProgramServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/payBill/impl/wx/WxMiniProgramServiceImpl.java @@ -13,16 +13,13 @@ import com.aliyun.openservices.shade.org.apache.commons.lang3.StringUtils; import com.iformall.common.ErrorCode; import com.iformall.common.IdWorker; import com.iformall.domain.po.WxAppinfo; +import com.iformall.domain.po.WxBillPayWay; import com.iformall.domain.po.WxMerchantBUser; -import com.iformall.domain.po.WxPark; import com.iformall.domain.po.WxPayAccount; import com.iformall.domain.po.WxPayAccountBill; -import com.iformall.domain.po.base.TenantEntity; import com.iformall.domain.po.base.WxBillBaseEntity; import com.iformall.enums.EnumAppPlat; import com.iformall.enums.EnumBillAllType; -import com.iformall.enums.EnumBillPayWay; -import com.iformall.enums.EnumPayWay; import com.iformall.exception.MallinkException; import com.iformall.service.WxAppinfoService; import com.iformall.service.WxPayAccountService; @@ -30,7 +27,6 @@ import com.iformall.service.pay.service.pay.entity.PayAdapterResult; import com.iformall.service.pay.service.pay.wx.v2.miniApp.appPay.WxMiniAppPayAdapterService; import com.iformall.service.payBill.PayBillAdapterService; import com.iformall.service.payBill.impl.PayBillBaseService; -import com.iformall.utils.DateUtils; import lombok.extern.slf4j.Slf4j; @@ -84,7 +80,7 @@ public class WxMiniProgramServiceImpl extends PayBillBaseService implements PayB } @Override - public void paidCallBack(String tenantId,EnumBillPayWay payWay, Map paramMap) { + public void paidCallBack(String tenantId,WxBillPayWay payWay, Map paramMap) { log.debug("handleWxBillPaidCallBack."+JSON.toJSONString(paramMap)); //支付返回消息 String returnCode = (String)paramMap.get("return_code"); diff --git a/mallinkService/src/main/java/com/iformall/utils/Constant.java b/mallinkService/src/main/java/com/iformall/utils/Constant.java index 46ef1b4f0..c169c2512 100644 --- a/mallinkService/src/main/java/com/iformall/utils/Constant.java +++ b/mallinkService/src/main/java/com/iformall/utils/Constant.java @@ -142,5 +142,9 @@ public class Constant { public static final Integer default_short_decimal_size = 2; public static final Integer bill_near_default_days = 5; public static final Integer bill_all_type_manage_fee = 999; + + public static final Long bill_pay_way_minigrame = 1L; + public static final Long bill_pay_way_system = 2L; + } diff --git a/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml b/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml index a26e88264..c6986ac86 100644 --- a/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillActionMapper.xml @@ -18,7 +18,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml index 6832bc3f3..cdf3c73c0 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml @@ -27,7 +27,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml index 49f990873..4a702425c 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDepositMapper.xml @@ -28,7 +28,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml index 8bec74e60..5b4b78eb5 100644 --- a/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillOtherDepositMapper.xml @@ -29,7 +29,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml index 6dfdf816f..78e581cad 100644 --- a/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillOtherMapper.xml @@ -30,7 +30,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillPayWayMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPayWayMapper.xml new file mode 100644 index 000000000..8e0895ef7 --- /dev/null +++ b/mallinkService/src/main/resources/mapper/WxBillPayWayMapper.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + `id`,`tenant_id`,`parent_tenant_id`,`create_time`,`update_time`,`is_del`,`name`,`is_system` + + + + where 1=1 + and `id` = #{id} + + and `tenant_id` = #{tenantId} + + + and `parent_tenant_id` = #{parentTenantId} + + and `is_del` = #{isDel} + and `is_system` = #{isSystem} + and name like concat('%', #{name},'%') + + and id in + + #{idItem} + + + order by ${sortColumns} + + + + + + + + update wx_bill_pay_way set is_del = #{isDel} where id = #{id} and `tenant_id` = #{tenantId} + + + + diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml index 5a74aeb2c..e2cb2b2a8 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml @@ -29,7 +29,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml index a1c1b57af..b2d0704d8 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml @@ -34,7 +34,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml index 99d3f046a..0a4224907 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentManageMapper.xml @@ -33,7 +33,7 @@ - + diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml index 935f7ce54..d85ab10d8 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml @@ -38,7 +38,7 @@ - +