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 bb1a27ed5..576c1fc59 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxBillRent.java @@ -37,33 +37,18 @@ public class WxBillRent implements Serializable { public void setIds(List ids) { this.ids = ids; } - - @Transient - protected String shopNumber; - - - - /*商铺ID**/ - @io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId") - private Long shopId; - /*使用面积**/ - @io.swagger.annotations.ApiModelProperty(value="使用面积",name="userArea") - private BigDecimal userArea; - /*单价**/ - @io.swagger.annotations.ApiModelProperty(value="单价",name="price") - private BigDecimal price; - /*应缴金额**/ - @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") - private BigDecimal needPay; - /*应收金额**/ + + + + /*租金合同ID**/ + @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") + private Long rentContractId; + /*实际应收金额**/ @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") - private BigDecimal receivePay; + private Integer receivePay; /*实收金额**/ - @io.swagger.annotations.ApiModelProperty(value="实缴金额",name="pay") - private BigDecimal pay; - /*缴费周期**/ - @io.swagger.annotations.ApiModelProperty(value="缴费周期",name="receivePeriod") - private Integer receivePeriod; + @io.swagger.annotations.ApiModelProperty(value="实收金额",name="pay") + private Integer pay; /*收款日期**/ @io.swagger.annotations.ApiModelProperty(value="收款日期",name="receiveDate") private Date receiveDate; @@ -76,76 +61,53 @@ public class WxBillRent implements Serializable { /*逾期天数**/ @io.swagger.annotations.ApiModelProperty(value="逾期天数",name="expiredDay") private Integer expiredDay; - /*付款方式:1微信2支付宝3银行4现金**/ - @io.swagger.annotations.ApiModelProperty(value="付款方式:1微信2支付宝3银行4现金",name="payWay") - private Integer payWay; - /*单据编号**/ - @io.swagger.annotations.ApiModelProperty(value="单据编号",name="receiptNum") - private String receiptNum; - - /*租户ID**/ - @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") + /*租户**/ + @io.swagger.annotations.ApiModelProperty(value="租户",name="tenantId") private String tenantId; - /*欠缴**/ - @io.swagger.annotations.ApiModelProperty(value="欠缴金额",name="owe") + @io.swagger.annotations.ApiModelProperty(value="欠缴",name="owe") private BigDecimal owe; + /*账单状态1未到期2待缴3逾期未缴4部分逾期5已结清**/ + @io.swagger.annotations.ApiModelProperty(value="账单状态1未到期2待缴3欠缴4已结清",name="status") + private Integer status; + /*是否删除 是1否0 未到期不显示**/ + @io.swagger.annotations.ApiModelProperty(value="是否删除 是1否0 未到期不显示",name="isDel") + private Integer isDel; + /*应收金额**/ + @io.swagger.annotations.ApiModelProperty(value="应收金额",name="needPay") + private Integer needPay; + /*商户ID**/ + @io.swagger.annotations.ApiModelProperty(value="商户ID",name="merchantId") + private Long merchantId; + /*账号ID**/ + @io.swagger.annotations.ApiModelProperty(value="账号ID",name="userId") + private Long userId; + /*商铺ID**/ + @io.swagger.annotations.ApiModelProperty(value="商铺ID",name="shopId") + private Long shopId; - /***/ - @io.swagger.annotations.ApiModelProperty(value="payStatus",name="payStatus") - private Integer payStatus; - - - public String getShopNumber() { - return shopNumber; - } - - public void setShopNumber(String shopNumber) { - this.shopNumber = shopNumber; - } + /*更新时间**/ + @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") + private Date updatetime; - public Long getShopId() { - return shopId; - } - public void setShopId(Long _shopId) { - shopId = _shopId; - } - public BigDecimal getUserArea() { - return userArea; - } - public void setUserArea(BigDecimal _userArea) { - userArea = _userArea; - } - public BigDecimal getPrice() { - return price; + public Long getRentContractId() { + return rentContractId; } - public void setPrice(BigDecimal _price) { - price = _price; + public void setRentContractId(Long _rentContractId) { + rentContractId = _rentContractId; } - public BigDecimal getNeedPay() { - return needPay; - } - public void setNeedPay(BigDecimal _needPay) { - needPay = _needPay; - } - public BigDecimal getReceivePay() { + public Integer getReceivePay() { return receivePay; } - public void setReceivePay(BigDecimal _receivePay) { + public void setReceivePay(Integer _receivePay) { receivePay = _receivePay; } - public BigDecimal getPay() { + public Integer getPay() { return pay; } - public void setPay(BigDecimal _pay) { + public void setPay(Integer _pay) { pay = _pay; } - public Integer getReceivePeriod() { - return receivePeriod; - } - public void setReceivePeriod(Integer _receivePeriod) { - receivePeriod = _receivePeriod; - } public Date getReceiveDate() { return receiveDate; } @@ -170,60 +132,81 @@ public class WxBillRent implements Serializable { public void setExpiredDay(Integer _expiredDay) { expiredDay = _expiredDay; } - public Integer getPayWay() { - return payWay; + public String getTenantId() { + return tenantId; } - public void setPayWay(Integer _payWay) { - payWay = _payWay; + public void setTenantId(String _tenantId) { + tenantId = _tenantId; } - public String getReceiptNum() { - return receiptNum; + public BigDecimal getOwe() { + return owe; } - public void setReceiptNum(String _receiptNum) { - receiptNum = _receiptNum; + public void setOwe(BigDecimal _owe) { + owe = _owe; } - - public String getTenantId() { - return tenantId; + public Integer getStatus() { + return status; } - - public void setTenantId(String tenantId) { - this.tenantId = tenantId; + public void setStatus(Integer _status) { + status = _status; } - - - public BigDecimal getOwe() { - return owe; + public Integer getIsDel() { + return isDel; } - - public void setOwe(BigDecimal owe) { - this.owe = owe; + public void setIsDel(Integer _isDel) { + isDel = _isDel; + } + public Integer getNeedPay() { + return needPay; + } + public void setNeedPay(Integer _needPay) { + needPay = _needPay; + } + public Long getMerchantId() { + return merchantId; + } + public void setMerchantId(Long _merchantId) { + merchantId = _merchantId; + } + public Long getUserId() { + return userId; + } + public void setUserId(Long _userId) { + userId = _userId; + } + public Long getShopId() { + return shopId; + } + public void setShopId(Long _shopId) { + shopId = _shopId; } - public Integer getPayStatus() { - return payStatus; + public Date getUpdatetime() { + return updatetime; } - public void setPayStatus(Integer payStatus) { - this.payStatus = payStatus; + public void setUpdatetime(Date updatetime) { + this.updatetime = updatetime; } public static enum Field { Id_ASC("`id` ASC"),Id_DESC("`id` DESC") - ,ShopId_ASC("`shop_id` ASC"),ShopId_DESC("`shop_id` DESC") - ,UserArea_ASC("`userArea` ASC"),UserArea_DESC("`userArea` DESC") - ,Price_ASC("`price` ASC"),Price_DESC("`price` DESC") - ,NeedPay_ASC("`needPay` ASC"),NeedPay_DESC("`needPay` DESC") + ,RentContractId_ASC("`rentContractId` ASC"),RentContractId_DESC("`rentContractId` DESC") ,ReceivePay_ASC("`receivePay` ASC"),ReceivePay_DESC("`receivePay` DESC") ,Pay_ASC("`pay` ASC"),Pay_DESC("`pay` DESC") - ,ReceivePeriod_ASC("`receive_period` ASC"),ReceivePeriod_DESC("`receive_period` DESC") ,ReceiveDate_ASC("`receiveDate` ASC"),ReceiveDate_DESC("`receiveDate` DESC") ,PayDate_ASC("`payDate` ASC"),PayDate_DESC("`payDate` DESC") ,Createtime_ASC("`createtime` ASC"),Createtime_DESC("`createtime` DESC") ,ExpiredDay_ASC("`expiredDay` ASC"),ExpiredDay_DESC("`expiredDay` DESC") - ,PayWay_ASC("`payWay` ASC"),PayWay_DESC("`payWay` DESC") - ,ReceiptNum_ASC("`receiptNum` ASC"),ReceiptNum_DESC("`receiptNum` DESC") + ,TenantId_ASC("`tenantId` ASC"),TenantId_DESC("`tenantId` DESC") + ,Owe_ASC("`owe` ASC"),Owe_DESC("`owe` DESC") + ,Status_ASC("`status` ASC"),Status_DESC("`status` DESC") + ,IsDel_ASC("`isDel` ASC"),IsDel_DESC("`isDel` DESC") + ,NeedPay_ASC("`needPay` ASC"),NeedPay_DESC("`needPay` DESC") + ,MerchantId_ASC("`merchantId` ASC"),MerchantId_DESC("`merchantId` DESC") + ,UserId_ASC("`userId` ASC"),UserId_DESC("`userId` DESC") + ,ShopId_ASC("`shopId` ASC"),ShopId_DESC("`shopId` DESC") ; private String value; Field(String value){ @@ -256,7 +239,7 @@ public class WxBillRent implements Serializable { sb.append(","); sb.append(fields[k].toString()); } - this.sortColumns=sb.toString(); + } public void setSortColumns(String sortColumns) diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java index e66bd68b3..2ab8c12bd 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java @@ -19,7 +19,7 @@ public class WxRentContract implements Serializable { protected Long id; @Transient - protected List ids; + protected List ids; @Transient protected String sortColumns; @@ -33,10 +33,10 @@ public class WxRentContract implements Serializable { return sortColumns; } - public List getIds() { + public List getIds() { return ids; } - public void setIds(List ids) { + public void setIds(List ids) { this.ids = ids; } 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 af9fbb54b..58f2e652e 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxBillRentServiceImpl.java @@ -1,6 +1,5 @@ package com.iformall.service.impl; -import java.util.*; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; import com.iformall.common.IdWorker; @@ -12,6 +11,10 @@ import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Date; +import java.util.List; +import java.util.Map; + @Service public class WxBillRentServiceImpl implements WxBillRentService { private final Logger logger = LoggerFactory.getLogger(this.getClass()); @@ -41,11 +44,12 @@ public class WxBillRentServiceImpl implements WxBillRentService { if (record.getId() == null) { final IdWorker idWorker = IdWorker.get(); record.setId(idWorker.nextId()); - record.setCreatetime(new Date()); - record.setPayStatus(record.getOwe().doubleValue()>0?0:1); + Date date = new Date(); + record.setCreatetime(date); + record.setUpdatetime(date); wxBillRentMapper.insertSelective(record); } else { - record.setPayStatus(record.getOwe().doubleValue()>0?0:1); + record.setUpdatetime(new Date()); wxBillRentMapper.updateByPrimaryKeySelective(record); } } diff --git a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml index c55616192..0e52c9434 100644 --- a/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxBillRentMapper.xml @@ -3,46 +3,51 @@ - - - - - - - + + + - - - + + + + + + + + - `id`,`shop_id`,`user_area`,`price`,`need_pay`,`receive_pay`,`pay`,`receive_period`,`receive_date`,`pay_date`,`createtime`,`expired_day`,`pay_way`,`receipt_num`,`tenant_id`,`owe`,`pay_status` + `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` where 1 = 1 and `id` = #{id} - and `shop_id` = #{shopId} - and `user_area` = #{userArea} - and `price` = #{price} - and `need_pay` = #{needPay} + and `rent_contract_id` = #{rentContractId} and `receive_pay` = #{receivePay} and `pay` = #{pay} - and `receive_period` = #{receivePeriod} and `receive_date` = #{receiveDate} and `pay_date` = #{payDate} and `createtime` = #{createtime} and `expired_day` = #{expiredDay} - and `pay_way` = #{payWay} - and `receipt_num` = #{receiptNum} - and `tenant_id` = #{tenantId} + and `tenant_id` = #{tenantId} + and `owe` = #{owe} + and `status` = #{status} + and `is_del` = #{isDel} + and `need_pay` = #{needPay} + and `merchant_id` = #{merchantId} + and `user_id` = #{userId} + and `shop_id` = #{shopId} + and `updatetime` = #{updatetime} + + and id in @@ -57,48 +62,9 @@ - - +