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 @@
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}