| @@ -8,6 +8,9 @@ import java.util.ArrayList; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Table(name = "wx_bill_property") | @Table(name = "wx_bill_property") | ||||
| public class WxBillProperty implements Serializable { | public class WxBillProperty implements Serializable { | ||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @@ -41,8 +44,8 @@ public class WxBillProperty implements Serializable { | |||||
| private String merchantName; | private String merchantName; | ||||
| /*租金合同ID**/ | /*租金合同ID**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | |||||
| private Long rentContractId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="propertyContractId") | |||||
| private Long propertyContractId; | |||||
| /*实际应收金额**/ | /*实际应收金额**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| private Integer receivePay; | private Integer receivePay; | ||||
| @@ -88,12 +91,15 @@ public class WxBillProperty implements Serializable { | |||||
| /*更新时间**/ | /*更新时间**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | ||||
| private Date updatetime; | private Date updatetime; | ||||
| public Long getRentContractId() { | |||||
| return rentContractId; | |||||
| public Long getPropertyContractId() { | |||||
| return propertyContractId; | |||||
| } | } | ||||
| public void setRentContractId(Long _rentContractId) { | |||||
| rentContractId = _rentContractId; | |||||
| public void setPropertyContractId(Long propertyContractId) { | |||||
| this.propertyContractId = propertyContractId; | |||||
| } | } | ||||
| public Integer getReceivePay() { | public Integer getReceivePay() { | ||||
| return receivePay; | return receivePay; | ||||
| } | } | ||||
| @@ -196,7 +202,7 @@ public class WxBillProperty implements Serializable { | |||||
| public static enum Field | public static enum Field | ||||
| { | { | ||||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | ||||
| ,RentContractId_ASC("`rentContractId` ASC"),RentContractId_DESC("`rentContractId` DESC") | |||||
| ,RentContractId_ASC("`propertyContractId` ASC"),RentContractId_DESC("`propertyContractId` DESC") | |||||
| ,ReceivePay_ASC("`receivePay` ASC"),ReceivePay_DESC("`receivePay` DESC") | ,ReceivePay_ASC("`receivePay` ASC"),ReceivePay_DESC("`receivePay` DESC") | ||||
| ,Pay_ASC("`pay` ASC"),Pay_DESC("`pay` DESC") | ,Pay_ASC("`pay` ASC"),Pay_DESC("`pay` DESC") | ||||
| ,ReceiveDate_ASC("`receiveDate` ASC"),ReceiveDate_DESC("`receiveDate` DESC") | ,ReceiveDate_ASC("`receiveDate` ASC"),ReceiveDate_DESC("`receiveDate` DESC") | ||||
| @@ -8,6 +8,9 @@ import java.util.ArrayList; | |||||
| import java.util.Date; | import java.util.Date; | ||||
| import java.util.List; | import java.util.List; | ||||
| /** | |||||
| * @author gongbiao | |||||
| */ | |||||
| @Table(name = "wx_bill_property_deposit") | @Table(name = "wx_bill_property_deposit") | ||||
| public class WxBillPropertyDeposit implements Serializable { | public class WxBillPropertyDeposit implements Serializable { | ||||
| private static final long serialVersionUID = 1L; | private static final long serialVersionUID = 1L; | ||||
| @@ -41,8 +44,8 @@ public class WxBillPropertyDeposit implements Serializable { | |||||
| private String merchantName; | private String merchantName; | ||||
| /*租金合同ID**/ | /*租金合同ID**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="rentContractId") | |||||
| private Long rentContractId; | |||||
| @io.swagger.annotations.ApiModelProperty(value="租金合同ID",name="propertyContractId") | |||||
| private Long propertyContractId; | |||||
| /*实际应收金额**/ | /*实际应收金额**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | @io.swagger.annotations.ApiModelProperty(value="实际应收金额",name="receivePay") | ||||
| private Integer receivePay; | private Integer receivePay; | ||||
| @@ -88,12 +91,15 @@ public class WxBillPropertyDeposit implements Serializable { | |||||
| /*更新时间**/ | /*更新时间**/ | ||||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updatetime") | ||||
| private Date updatetime; | private Date updatetime; | ||||
| public Long getRentContractId() { | |||||
| return rentContractId; | |||||
| public Long getPropertyContractId() { | |||||
| return propertyContractId; | |||||
| } | } | ||||
| public void setRentContractId(Long _rentContractId) { | |||||
| rentContractId = _rentContractId; | |||||
| public void setPropertyContractId(Long propertyContractId) { | |||||
| this.propertyContractId = propertyContractId; | |||||
| } | } | ||||
| public Integer getReceivePay() { | public Integer getReceivePay() { | ||||
| return receivePay; | return receivePay; | ||||
| } | } | ||||
| @@ -3,7 +3,7 @@ | |||||
| <mapper namespace="com.iformall.mapper.WxBillPropertyDepositMapper"> | <mapper namespace="com.iformall.mapper.WxBillPropertyDepositMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillPropertyDeposit"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillPropertyDeposit"> | ||||
| <id column="id" jdbcType="INTEGER" property="id" /> | <id column="id" jdbcType="INTEGER" property="id" /> | ||||
| <result column="rent_contract_id" jdbcType="INTEGER" property="rentContractId" /> | |||||
| <result column="property_contract_id" jdbcType="INTEGER" property="propertyContractId" /> | |||||
| <result column="receive_pay" jdbcType="INTEGER" property="receivePay" /> | <result column="receive_pay" jdbcType="INTEGER" property="receivePay" /> | ||||
| <result column="pay" jdbcType="INTEGER" property="pay" /> | <result column="pay" jdbcType="INTEGER" property="pay" /> | ||||
| <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate" /> | <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate" /> | ||||
| @@ -22,13 +22,13 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `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` | |||||
| `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` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != id "> and `id` = #{id} </if> | <if test=" null != id "> and `id` = #{id} </if> | ||||
| <if test=" null != rentContractId "> and `rent_contract_id` = #{rentContractId} </if> | |||||
| <if test=" null != propertyContractId "> and `property_contract_id` = #{propertyContractId} </if> | |||||
| <if test=" null != receivePay "> and `receive_pay` = #{receivePay} </if> | <if test=" null != receivePay "> and `receive_pay` = #{receivePay} </if> | ||||
| <if test=" null != pay "> and `pay` = #{pay} </if> | <if test=" null != pay "> and `pay` = #{pay} </if> | ||||
| <if test=" null != receiveDate "> and `receive_date` = #{receiveDate} </if> | <if test=" null != receiveDate "> and `receive_date` = #{receiveDate} </if> | ||||
| @@ -90,8 +90,8 @@ | |||||
| <update id="updateWaitPayStatus" parameterType="hashmap"> | <update id="updateWaitPayStatus" parameterType="hashmap"> | ||||
| update wx_bill_property_deposit set status=#{waitPay} where id in( | update wx_bill_property_deposit set status=#{waitPay} where id in( | ||||
| select a.id from (select br.id,rc.receive_period,br.rent_contract_id,br.receive_date from wx_bill_property_deposit br | |||||
| left join wx_rent_contract rc on br.rent_contract_id=rc.id | |||||
| select a.id from (select br.id,rc.receive_period,br.property_contract_id,br.receive_date from wx_bill_property_deposit br | |||||
| left join wx_property_contract rc on br.property_contract_id=rc.id | |||||
| where br.tenant_id=#{tenantId} and br.status!=#{paid} and now() < br.receive_date | where br.tenant_id=#{tenantId} and br.status!=#{paid} and now() < br.receive_date | ||||
| and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | ||||
| </update> | </update> | ||||
| @@ -3,7 +3,7 @@ | |||||
| <mapper namespace="com.iformall.mapper.WxBillPropertyMapper"> | <mapper namespace="com.iformall.mapper.WxBillPropertyMapper"> | ||||
| <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillProperty"> | <resultMap id="BaseResultMap" type="com.iformall.domain.po.WxBillProperty"> | ||||
| <id column="id" jdbcType="INTEGER" property="id" /> | <id column="id" jdbcType="INTEGER" property="id" /> | ||||
| <result column="rent_contract_id" jdbcType="INTEGER" property="rentContractId" /> | |||||
| <result column="property_contract_id" jdbcType="INTEGER" property="propertyContractId" /> | |||||
| <result column="receive_pay" jdbcType="INTEGER" property="receivePay" /> | <result column="receive_pay" jdbcType="INTEGER" property="receivePay" /> | ||||
| <result column="pay" jdbcType="INTEGER" property="pay" /> | <result column="pay" jdbcType="INTEGER" property="pay" /> | ||||
| <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate" /> | <result column="receive_date" jdbcType="TIMESTAMP" property="receiveDate" /> | ||||
| @@ -22,13 +22,13 @@ | |||||
| </resultMap> | </resultMap> | ||||
| <sql id="allColumns"> | <sql id="allColumns"> | ||||
| `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` | |||||
| `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` | |||||
| </sql> | </sql> | ||||
| <sql id="dynamicWhereConditions"> | <sql id="dynamicWhereConditions"> | ||||
| where 1 = 1 | where 1 = 1 | ||||
| <if test=" null != id "> and `id` = #{id} </if> | <if test=" null != id "> and `id` = #{id} </if> | ||||
| <if test=" null != rentContractId "> and `rent_contract_id` = #{rentContractId} </if> | |||||
| <if test=" null != propertyContractId "> and `property_contract_id` = #{propertyContractId} </if> | |||||
| <if test=" null != receivePay "> and `receive_pay` = #{receivePay} </if> | <if test=" null != receivePay "> and `receive_pay` = #{receivePay} </if> | ||||
| <if test=" null != pay "> and `pay` = #{pay} </if> | <if test=" null != pay "> and `pay` = #{pay} </if> | ||||
| <if test=" null != receiveDate "> and `receive_date` = #{receiveDate} </if> | <if test=" null != receiveDate "> and `receive_date` = #{receiveDate} </if> | ||||
| @@ -90,8 +90,8 @@ | |||||
| <update id="updateWaitPayStatus" parameterType="hashmap"> | <update id="updateWaitPayStatus" parameterType="hashmap"> | ||||
| update wx_bill_property set status=#{waitPay} where id in( | update wx_bill_property set status=#{waitPay} where id in( | ||||
| select a.id from (select br.id,rc.receive_period,br.rent_contract_id,br.receive_date from wx_bill_property br | |||||
| left join wx_rent_contract rc on br.rent_contract_id=rc.id | |||||
| select a.id from (select br.id,rc.receive_period,br.property_contract_id,br.receive_date from wx_bill_property br | |||||
| left join wx_property_contract rc on br.property_contract_id=rc.id | |||||
| where br.tenant_id=#{tenantId} and br.status!=#{paid} and now() < br.receive_date | where br.tenant_id=#{tenantId} and br.status!=#{paid} and now() < br.receive_date | ||||
| and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | and DATE_ADD(now(),INTERVAL 1 MONTH)>br.receive_date) a) | ||||
| </update> | </update> | ||||