Просмотр исходного кода

Merge commit 'refs/tags/jenkins-back-end-738^{}' into release

release_toaliyun_real
hupeng 7 лет назад
Родитель
Сommit
f9ae5afffe
3 измененных файлов: 14 добавлений и 16 удалений
  1. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  2. +6
    -6
      mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml
  3. +7
    -9
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java Просмотреть файл

@@ -164,7 +164,7 @@ public class WxRentContractServiceImpl implements WxRentContractService {
if (record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) { if (record.getType().equals(EnumRentContractType.RENT_BY_JOINT.getCode())) {
BigDecimal hundred = new BigDecimal(100); BigDecimal hundred = new BigDecimal(100);
BigDecimal revenue = new BigDecimal(record.getRevenue() == null ? 0 : record.getRevenue()).divide(hundred); BigDecimal revenue = new BigDecimal(record.getRevenue() == null ? 0 : record.getRevenue()).divide(hundred);
BigDecimal payRatio = new BigDecimal(record.getPayRatio() == null ? 0 : record.getPayRatio()).divide(hundred);
BigDecimal payRatio = new BigDecimal(record.getPayRatio() == null ? 0 : record.getPayRatio()).divide(new BigDecimal(10000));
BigDecimal price = revenue.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN); BigDecimal price = revenue.multiply(payRatio).setScale(2, RoundingMode.HALF_EVEN);
record.setPrice(price.multiply(hundred).intValue()); record.setPrice(price.multiply(hundred).intValue());
} }


+ 6
- 6
mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml Просмотреть файл

@@ -134,13 +134,13 @@
<select id="queryRentContractEndSoonStatus" resultType="int" <select id="queryRentContractEndSoonStatus" resultType="int"
parameterType="com.iformall.domain.po.WxPropertyContract"> parameterType="com.iformall.domain.po.WxPropertyContract">
select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1
and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
select count(id) from wx_property_contract where tenant_id=#{tenantId} and status=4
and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
<if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if> <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
</select> </select>
<select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxPropertyContract"> <select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxPropertyContract">
select count(id) from wx_property_contract where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7
select count(id) from wx_property_contract where tenant_id=#{tenantId} and status in (2,3,4)
and rental_start_date &lt;= now() and rental_end_date >= now() and rental_start_date &lt;= now() and rental_end_date >= now()
<if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if> <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
</select> </select>
@@ -152,15 +152,15 @@
</select> </select>
<update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> <update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxPropertyContract">
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
</update> </update>
<update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> <update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxPropertyContract">
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_start_date &lt;= now() and rental_end_date >= now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and rental_start_date &lt;= now() and rental_end_date >= now()
</update> </update>
<update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> <update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxPropertyContract">
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=6 and status!=7 and rental_end_date &lt;now()
update wx_property_contract set status=#{status} where tenant_id=#{tenantId} and status!=1 and status!=5 and status!=6 and status!=7 and rental_end_date &lt;now()
</update> </update>
<update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxPropertyContract"> <update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxPropertyContract">


+ 7
- 9
mallinkService/src/main/resources/mapper/WxRentContractMapper.xml Просмотреть файл

@@ -129,15 +129,13 @@
</select> </select>
<select id="queryRentContractEndSoonStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract"> <select id="queryRentContractEndSoonStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract">
select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6
and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status=4
and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
<if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if> <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
</select> </select>
<select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract"> <select id="queryRentContractPaidStatus" resultType="int" parameterType="com.iformall.domain.po.WxRentContract">
select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and
status!=7
and rental_start_date &lt;= now() and rental_end_date >= now()
select count(id) from wx_rent_contract where tenant_id=#{tenantId} and status in (2,3,4)
<if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if> <if test=" null != rentShopType ">and rent_shop_type = #{rentShopType}</if>
</select> </select>
@@ -150,19 +148,19 @@
</select> </select>
<update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxRentContract"> <update id="updateRentContractEndSoonStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=5 and status!=1 and status!=6 and status!=7 and DATEDIFF(rental_end_date,now()) &lt;= 30 and rental_end_date > now()
</update> </update>
<update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxRentContract"> <update id="updateRentContractPaidStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and status!=7 and rental_start_date &lt;= now() and rental_end_date >= now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=5 and status!=6 and status!=7 and rental_start_date &lt;= now() and rental_end_date >= now()
</update> </update>
<update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxRentContract"> <update id="updateRentContractEndStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=6 and status!=7 and rental_end_date &lt;now()
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=1 and status!=5 and status!=6 and status!=7 and rental_end_date &lt;now()
</update> </update>
<update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxRentContract"> <update id="updateRentWaitSignStatus" parameterType="com.iformall.domain.po.WxRentContract">
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=7 and merchant_id is null
update wx_rent_contract set status=#{status} where tenant_id=#{tenantId} and status!=0 and status!=5 and status!=6 and status!=7 and merchant_id is null
</update> </update>


<update id="updateApplyStatus" parameterType="com.iformall.domain.po.WxRentContract"> <update id="updateApplyStatus" parameterType="com.iformall.domain.po.WxRentContract">


Загрузка…
Отмена
Сохранить