| @@ -4,6 +4,7 @@ import com.iformall.common.CommonMapper; | |||||
| import com.iformall.domain.po.WxBillProperty; | import com.iformall.domain.po.WxBillProperty; | ||||
| import com.iformall.domain.po.WxPropertyContract; | import com.iformall.domain.po.WxPropertyContract; | ||||
| import com.iformall.domain.po.WxRentContract; | import com.iformall.domain.po.WxRentContract; | ||||
| import java.util.List; | import java.util.List; | ||||
| import java.util.Map; | import java.util.Map; | ||||
| @@ -42,4 +43,5 @@ public interface WxBillPropertyMapper extends CommonMapper<WxBillProperty, Long> | |||||
| void insertBills(List<WxBillProperty> resultList); | void insertBills(List<WxBillProperty> resultList); | ||||
| WxBillProperty selectBillOne(WxBillProperty propertyQuery); | |||||
| } | } | ||||
| @@ -41,4 +41,6 @@ public interface WxBillRentMapper extends CommonMapper<WxBillRent, Long> { | |||||
| void updateBills(@Param("bills") List<WxBillRent> resultList); | void updateBills(@Param("bills") List<WxBillRent> resultList); | ||||
| WxBillRent selectBillOne(WxBillRent rentQuery); | |||||
| } | } | ||||
| @@ -967,7 +967,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| rentQuery.setRentShopType(EnumRentShopType.POINT.getCode()); | rentQuery.setRentShopType(EnumRentShopType.POINT.getCode()); | ||||
| } | } | ||||
| rentQuery.setIsPreview(EnumIsPreview.NO.getCode()); | rentQuery.setIsPreview(EnumIsPreview.NO.getCode()); | ||||
| WxBillRent rent = wxBillRentMapper.selectOne(rentQuery); | |||||
| WxBillRent rent = wxBillRentMapper.selectBillOne(rentQuery); | |||||
| if (rent != null && !rent.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { | if (rent != null && !rent.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { | ||||
| long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); | long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); | ||||
| if (rent.getOwe() <= pay) { | if (rent.getOwe() <= pay) { | ||||
| @@ -992,7 +992,7 @@ public class WxBillAllServiceImpl implements WxBillAllService { | |||||
| propertyQuery.setRentShopType(EnumRentShopType.POINT.getCode()); | propertyQuery.setRentShopType(EnumRentShopType.POINT.getCode()); | ||||
| } | } | ||||
| propertyQuery.setIsPreview(EnumIsPreview.NO.getCode()); | propertyQuery.setIsPreview(EnumIsPreview.NO.getCode()); | ||||
| WxBillProperty property = wxBillPropertyMapper.selectOne(propertyQuery); | |||||
| WxBillProperty property = wxBillPropertyMapper.selectBillOne(propertyQuery); | |||||
| if (property != null && !property.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { | if (property != null && !property.getStatus().equals(EnumBillRentStatus.PAID.getCode())) { | ||||
| long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); | long pay = new BigDecimal(bill.getPayStr()).multiply(new BigDecimal(100)).longValueExact(); | ||||
| if (property.getOwe() <= pay) { | if (property.getOwe() <= pay) { | ||||
| @@ -217,6 +217,12 @@ | |||||
| where id = #{item.id} | where id = #{item.id} | ||||
| </foreach> | </foreach> | ||||
| </update> | </update> | ||||
| <select id="selectBillOne" parameterType="com.iformall.domain.po.WxBillProperty"> | |||||
| select * from wx_bill_rent where tenant_id#{tenantId} and merchant_id=#{merchantId} | |||||
| AND rent_shop_type = #{rentShopType} AND is_preview = #{isPreview} | |||||
| AND date_format(starttime,'%Y-%m-%d 00:00:00.0') = #{starttime} AND date_format(endtime,'%Y-%m-%d 00:00:00.0') = #{endtime} | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||
| @@ -216,7 +216,12 @@ | |||||
| where id = #{item.id} | where id = #{item.id} | ||||
| </foreach> | </foreach> | ||||
| </update> | </update> | ||||
| <select id="selectBillOne" parameterType="com.iformall.domain.po.WxBillRent"> | |||||
| select * from wx_bill_rent where tenant_id#{tenantId} and merchant_id=#{merchantId} | |||||
| AND rent_shop_type = #{rentShopType} AND is_preview = #{isPreview} | |||||
| AND date_format(starttime,'%Y-%m-%d 00:00:00.0') = #{starttime} AND date_format(endtime,'%Y-%m-%d 00:00:00.0') = #{endtime} | |||||
| </select> | |||||
| </mapper> | </mapper> | ||||