From 35584e96f4d47f433a9ea3d5b248932e49d82e46 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Thu, 11 Apr 2019 15:25:51 +0800 Subject: [PATCH] =?UTF-8?q?[=E8=B4=A6=E5=8D=95][=E4=BF=AE=E6=94=B9][?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E6=94=AF=E4=BB=98=E6=96=B9=E5=BC=8F=E5=AD=97?= =?UTF-8?q?=E6=AE=B5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../V201904111520__UPDATE_BILL_TABLE.sql | 14 +++++++ .../com/iformall/domain/po/WxBillDaily.java | 11 ++++++ .../com/iformall/domain/po/WxBillDeposit.java | 11 ++++++ .../com/iformall/domain/po/WxBillOther.java | 11 ++++++ .../domain/po/WxBillOtherDeposit.java | 11 ++++++ .../iformall/domain/po/WxBillProperty.java | 11 ++++++ .../domain/po/WxBillPropertyDeposit.java | 11 ++++++ .../com/iformall/domain/po/WxBillRent.java | 11 ++++++ .../com/iformall/enums/EnumBillPayWay.java | 37 +++++++++++++++++++ .../resources/mapper/WxBillDailyMapper.xml | 10 +++-- .../resources/mapper/WxBillDepositMapper.xml | 8 +++- .../mapper/WxBillOtherDepositMapper.xml | 8 +++- .../resources/mapper/WxBillOtherMapper.xml | 9 +++-- .../mapper/WxBillPropertyDepositMapper.xml | 8 +++- .../resources/mapper/WxBillPropertyMapper.xml | 10 +++-- .../resources/mapper/WxBillRentMapper.xml | 9 ++++- 16 files changed, 172 insertions(+), 18 deletions(-) create mode 100644 mallinkAdmin/src/main/resources/db/migration/V201904111520__UPDATE_BILL_TABLE.sql create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java diff --git a/mallinkAdmin/src/main/resources/db/migration/V201904111520__UPDATE_BILL_TABLE.sql b/mallinkAdmin/src/main/resources/db/migration/V201904111520__UPDATE_BILL_TABLE.sql new file mode 100644 index 000000000..082b3a9f4 --- /dev/null +++ b/mallinkAdmin/src/main/resources/db/migration/V201904111520__UPDATE_BILL_TABLE.sql @@ -0,0 +1,14 @@ +ALTER TABLE `wx_bill_rent` +ADD COLUMN `pay_way` smallint (2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; +ALTER TABLE `wx_bill_rent_deposit` +ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; +ALTER TABLE `wx_bill_property` +ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; +ALTER TABLE `wx_bill_property_deposit` +ADD COLUMN `pay_way` smallint (2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; +ALTER TABLE `wx_bill_other` +ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; +ALTER TABLE `wx_bill_other_deposit` +ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; +ALTER TABLE `wx_bill_daily` +ADD COLUMN `pay_way` smallint(2) NULL DEFAULT NULL COMMENT '支付方式1现金2支付宝3微信4银行卡转账-1其他'; \ No newline at end of file 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 63329d737..489cef538 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java @@ -108,6 +108,17 @@ public class WxBillDaily implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType") private Integer rentShopType; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public Integer getReceivePay() { return receivePay; } 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 ae9846d5a..49f1937b2 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDeposit.java @@ -107,6 +107,17 @@ public class WxBillDeposit implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public String getShopInfo() { return shopInfo; } 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 67d145637..24a602843 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOther.java @@ -119,6 +119,17 @@ public class WxBillOther implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型", name = "rentShopType") private Integer rentShopType; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public Integer getReceivePay() { return receivePay; } 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 1154fc19b..a1ede6d37 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillOtherDeposit.java @@ -125,6 +125,17 @@ public class WxBillOtherDeposit implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "退还金额", name = "returnPrice") private Integer returnPrice; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public Integer getReceivePay() { return receivePay; } 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 3bf185759..55ac3abd2 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillProperty.java @@ -122,6 +122,17 @@ public class WxBillProperty implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public String getShopInfo() { return shopInfo; } 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 7dc143b2e..c9b4dd6ff 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillPropertyDeposit.java @@ -107,6 +107,17 @@ public class WxBillPropertyDeposit implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public String getShopInfo() { return shopInfo; } 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 3f60e4eca..54d9781ed 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java @@ -124,6 +124,17 @@ public class WxBillRent implements Serializable { @io.swagger.annotations.ApiModelProperty(value = "商铺信息", name = "shopInfo") private String shopInfo; + @io.swagger.annotations.ApiModelProperty(value = "支付方式:见枚举EnumBillPayWay", name = "payWay") + private Integer payWay; + + public Integer getPayWay() { + return payWay; + } + + public void setPayWay(Integer payWay) { + this.payWay = payWay; + } + public String getShopInfo() { return shopInfo; } diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java new file mode 100644 index 000000000..f9e520183 --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumBillPayWay.java @@ -0,0 +1,37 @@ +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/resources/mapper/WxBillDailyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml index 0ecc8c059..bdb26c312 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml @@ -19,13 +19,14 @@ + `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`, `tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime`,`type`, - `rent_shop_type` + `rent_shop_type`,`pay_way` @@ -47,7 +48,7 @@ and `updatetime` = #{updatetime} and `type` = #{type} and `rent_shop_type` = #{rentShopType} - + and `pay_way` = #{payWay} and id in @@ -65,8 +66,8 @@ select br.`id`,br.`receive_pay` receivePay,br.`pay`,br.`receive_date` receiveDate, br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, - m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, - br.`merchant_id` merchantId,br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType + m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`,br.`merchant_id` merchantId, + br.shop_id shopId,br.name,br.comments,br.`rent_shop_type` rentShopType,br.pay_way payWay from wx_bill_other br left join wx_merchant m on br.merchant_id=m.id left join wx_shop s on br.shop_id=s.id @@ -79,6 +81,7 @@ and br.`is_del` = #{isDel} and br.`name` = #{name} and br.`rent_shop_type` = #{rentShopType} + and br.`pay_way` = #{payWay} order by id desc diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml index a657487f4..036c9d9c7 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyDepositMapper.xml @@ -22,13 +22,14 @@ + `id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`, `pay_date`,`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`, - `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`return_price`,`shop_info` + `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`,`return_price`,`shop_info`,`pay_way` @@ -51,6 +52,7 @@ and `shop_id` = #{shopId} and `updatetime` = #{updatetime} and `rent_shop_type` = #{rentShopType} + and `pay_way` = #{payWay} and id in @@ -71,7 +73,7 @@ br.`pay_date` payDate,br.`createtime`,br.`expired_day` expiredDay,br.`owe`,br.`status`, br.`need_pay` needPay,m.`name` merchantName,s.shop_number shopNumber,br.`updatetime`, br.`merchant_id` merchantId,br.`rent_shop_type` rentShopType,br.`return_price` returnPrice,br.`shop_info` - shopInfo + shopInfo,br.pay_way payWay,br.pay_way payWay from wx_bill_property_deposit br left join wx_merchant m on br.merchant_id=m.id left join wx_shop s on br.shop_id=s.id @@ -83,6 +85,8 @@ and br.`is_del` = #{isDel} and br.`rent_shop_type` = #{rentShopType} and br.`property_contract_id` = #{propertyContractId} + and br.`pay_way` = #{payWay} + order by id desc diff --git a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml index 843c72541..303faa46c 100644 --- a/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillPropertyMapper.xml @@ -27,6 +27,7 @@ + @@ -34,8 +35,8 @@ `id`,`property_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`, `createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`, `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`, - `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info` - + `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`, + `pay_way` @@ -60,6 +61,7 @@ and `rent_shop_type` = #{rentShopType} and is_preview = 0 and is_preview = #{isPreview} + and `pay_way` = #{payWay} and id in @@ -85,7 +87,7 @@ else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe) end latePayPrice, (select max(period) from wx_bill_property where property_contract_id=br.property_contract_id) - allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo + allPeriod,d.`status` depositStatus,br.`shop_info` shopInfo,br.pay_way payWay from wx_bill_property br left join wx_merchant m on br.merchant_id=m.id left join wx_shop s on br.shop_id=s.id left join wx_bill_property_deposit d on br.property_contract_id=d.property_contract_id @@ -100,6 +102,8 @@ and br.`receive_date` between #{starttime} and #{endtime} and br.`rent_shop_type` = #{rentShopType} and br.`property_contract_id` = #{propertyContractId} + and br.`pay_way` = #{payWay} + order by br.${sortColumns} diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml index 088ddcc72..d8f9240e6 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml @@ -27,6 +27,7 @@ + @@ -34,7 +35,8 @@ `id`,`rent_contract_id`,`receive_pay`,`pay`,`receive_date`,`pay_date`, `createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`need_pay`, `merchant_id`,`user_id`,`shop_id`,`updatetime`,`rent_shop_type`, - `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info` + `revenue`,`late_pay_ratio`,`late_pay_time`,`late_pay_price`,`period`,`is_preview`,`shop_info`, + `pay_way` @@ -59,6 +61,7 @@ and `rent_shop_type` = #{rentShopType} and is_preview = 0 and is_preview = #{isPreview} + and `pay_way` = #{payWay} and id in @@ -86,7 +89,7 @@ br.`rent_contract_id` rentContractId,d.receive_pay deposit,case when br.late_pay_time is null then 0 else FLOOR(DATEDIFF(now(),br.late_pay_time)*br.late_pay_ratio/10000*br.owe) end latePayPrice, (select max(period) from wx_bill_rent where rent_contract_id=br.rent_contract_id) allPeriod,d.`status` - depositStatus,br.shop_info shopInfo + depositStatus,br.shop_info shopInfo,br.pay_way payWay from wx_bill_rent br left join wx_merchant m on br.merchant_id=m.id left join wx_shop s on br.shop_id=s.id left join wx_rent_contract r on br.rent_contract_id=r.id @@ -102,6 +105,8 @@ and br.`receive_date` between #{starttime} and #{endtime} and br.`rent_shop_type` = #{rentShopType} and br.`rent_contract_id` = #{rentContractId} + and br.`pay_way` = #{payWay} + order by br.${sortColumns}