From 46f413e1541dd4768359dae48f09cbdf344e6663 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sat, 27 Oct 2018 11:58:25 +0800 Subject: [PATCH] =?UTF-8?q?[=E6=97=A5=E5=B8=B8=E8=B4=B9=E7=94=A8=E5=90=88?= =?UTF-8?q?=E5=90=8C][=E6=B7=BB=E5=8A=A0][=E7=B1=BB=E5=9E=8B=E5=AD=97?= =?UTF-8?q?=E6=AE=B5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/domain/po/WxBillDaily.java | 11 ++++++ .../com/iformall/enums/EnumBillDailyType.java | 38 +++++++++++++++++++ .../resources/mapper/WxBillDailyMapper.xml | 11 ++++-- 3 files changed, 57 insertions(+), 3 deletions(-) create mode 100644 mallinkService/src/main/java/com/iformall/enums/EnumBillDailyType.java 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 2eca92e8d..b61a6fa32 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillDaily.java @@ -51,6 +51,17 @@ public class WxBillDaily implements Serializable { this.merchantName = merchantName; } + @io.swagger.annotations.ApiModelProperty(value="账单类型",name="type") + private Integer type; + + public Integer getType() { + return type; + } + + public void setType(Integer type) { + this.type = type; + } + /*实际应收金额**/ @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") private Integer receivePay; diff --git a/mallinkService/src/main/java/com/iformall/enums/EnumBillDailyType.java b/mallinkService/src/main/java/com/iformall/enums/EnumBillDailyType.java new file mode 100644 index 000000000..c6bf1b61d --- /dev/null +++ b/mallinkService/src/main/java/com/iformall/enums/EnumBillDailyType.java @@ -0,0 +1,38 @@ +package com.iformall.enums; + + +/** + * @author gongbiao + */ + +public enum EnumBillDailyType { + + WATER(1,"水费"), + POWER(2,"电费"), + ; + + public static EnumBillDailyType getEnum(Integer code) { + for (EnumBillDailyType value : values()) { + if (value.getCode().equals(code)) { + return value; + } + } + return null; + } + + private Integer code; + private String message; + + EnumBillDailyType(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 79f42231b..7f85ec115 100644 --- a/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillDailyMapper.xml @@ -17,10 +17,12 @@ + + - `id`,`receive_pay`,`pay`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`tenant_id`,`owe`,`status`,`is_del`,`merchant_id`,`user_id`,`shop_id`,`updatetime` + `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` @@ -39,7 +41,9 @@ and `merchant_id` = #{merchantId} and `user_id` = #{userId} and `shop_id` = #{shopId} - and `updatetime` = #{updatetime} + and `updatetime` = #{updatetime} + and `type` = #{type} + and id in @@ -58,7 +62,7 @@ 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.`merchant_id` merchantId,br.shop_id shopId,br.type from wx_bill_daily br left join wx_merchant m on br.merchant_id=m.id left join wx_shop s on br.shop_id=s.id @@ -68,6 +72,7 @@ and br.`tenant_id` = #{tenantId} and br.`status` = #{status} and br.`is_del` = #{isDel} + and br.`type` = #{type} order by id