diff --git a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java index 49366b285..fe268878d 100644 --- a/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java +++ b/mallinkService/src/main/java/com/iformall/domain/vo/WxBillAll.java @@ -1,6 +1,5 @@ package com.iformall.domain.vo; -import java.util.Date; import java.util.List; /** @@ -28,10 +27,10 @@ public class WxBillAll { private String month; @io.swagger.annotations.ApiModelProperty(value="开始时间",name="starttime") - private Date starttime; + private String starttime; @io.swagger.annotations.ApiModelProperty(value="结束时间",name="endtime") - private Date endtime; + private String endtime; @io.swagger.annotations.ApiModelProperty(value="商户Id",name="merchantId") private Long merchantId; @@ -89,19 +88,19 @@ public class WxBillAll { this.typeList = typeList; } - public Date getStarttime() { + public String getStarttime() { return starttime; } - public void setStarttime(Date starttime) { + public void setStarttime(String starttime) { this.starttime = starttime; } - public Date getEndtime() { + public String getEndtime() { return endtime; } - public void setEndtime(Date endtime) { + public void setEndtime(String endtime) { this.endtime = endtime; } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java index 01db6fa15..26cabbcfd 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillAllServiceImpl.java @@ -12,6 +12,7 @@ import com.iformall.enums.EnumBillTypeParam; import com.iformall.mapper.WxBillAllMapper; import com.iformall.service.*; import com.iformall.utils.DateUtils; +import org.apache.commons.lang3.StringUtils; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -85,7 +86,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { public ResultData listBill(WxBillAll wxBillAll) { //更新各账单状态 updateBillStatus(wxBillAll); - if(wxBillAll.getStarttime()!=null && wxBillAll.getEndtime()==null){ + if(StringUtils.isEmpty(wxBillAll.getStarttime()) && StringUtils.isEmpty(wxBillAll.getEndtime())){ String month = DateUtils.getSystemTime("yyyy-MM"); wxBillAll.setMonth(month); } diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java index a5f061e4f..51f67fc04 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMsgServiceImpl.java @@ -241,7 +241,7 @@ public class WxMsgServiceImpl implements WxMsgService { if(wxMsgConfig.getRemains()==0){ logger.info("短信数量为0"); - return new ResultData(ErrorCode.MSG_SEND_ERROR.MSG_SUM_ZERO); + return new ResultData(ErrorCode.MSG_SUM_ZERO); } if(wxMsgConfig.getRemains() select bill.id,bill.merchant_id merchantId,bill.shop_id shopId,bill.bill_type_value billTypeValue,bill.bill_type billType,bill.need_pay needPay, bill.receive_pay receivePay,bill.pay,bill.owe,bill.receive_date receiveDate,bill.pay_date payDate, - bill.expired_day expiredDay,bill.status,bill.tenant_id tenantId,m.name merchantName,s.shop_number shopNumber from ( - select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status from wx_bill_rent + bill.expired_day expiredDay,bill.status,bill.tenant_id tenantId,m.name merchantName,s.shop_number shopNumber,bill.starttime,bill.endtime from ( + select id,merchant_id,shop_id,tenant_id,1 bill_type_value,'租金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_rent union - select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status from wx_bill_rent_deposit + select id,merchant_id,shop_id,tenant_id,2 bill_type_value,'租赁押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_rent_deposit union - select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status from wx_bill_property + select id,merchant_id,shop_id,tenant_id,3 bill_type_value,'物业费' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_property union - select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status from wx_bill_property_deposit + select id,merchant_id,shop_id,tenant_id,4 bill_type_value,'物业押金' bill_type,need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,starttime,endtime from wx_bill_property_deposit union - select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type, '' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status from wx_bill_daily where type=1 + select id,merchant_id,shop_id,tenant_id,5 bill_type_value,'水费' bill_type, '' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_daily where type=1 union - select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,'' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status from wx_bill_daily where type=2 + select id,merchant_id,shop_id,tenant_id,6 bill_type_value,'电费' bill_type,'' need_pay,receive_pay,pay,owe,receive_date,pay_date,expired_day,status,'' starttime,'' endtime from wx_bill_daily where type=2 ) bill left join wx_merchant m on bill.merchant_id=m.id left join wx_shop s on bill.shop_id=s.id @@ -107,7 +107,7 @@ - and bill.receive_date between #{starttime} and #{endtime} + and DATE_FORMAT(bill.receive_date,'%Y-%m') between #{starttime} and #{endtime} and bill.status=#{status} @@ -115,7 +115,7 @@ and bill.bill_type_value=#{billTypeValue} - order by bill.id,bill.merchant_id,bill.receive_date + order by bill.merchant_id,bill.receive_date