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

[租赁物业合同][修改][mapper.xml]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
3a9a93ccef
4 измененных файлов: 54 добавлений и 2 удалений
  1. +4
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java
  2. +3
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java
  3. +2
    -2
      mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java
  4. +45
    -0
      mallinkService/src/main/resources/mapper/WxRentContractMapper.xml

+ 4
- 0
mallinkService/src/main/java/com/iformall/domain/vo/WxRentPropertyContractVo.java Просмотреть файл

@@ -68,5 +68,9 @@ public class WxRentPropertyContractVo extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value = "操作类型1区分租赁物业2合并租赁物业", name = "operationType")
private Integer operationType;

@io.swagger.annotations.ApiModelProperty(value = "租赁商铺类型1店铺2多经点位", name = "rentShopType")
private Integer rentShopType;


}


+ 3
- 0
mallinkService/src/main/java/com/iformall/mapper/WxRentContractMapper.java Просмотреть файл

@@ -2,6 +2,7 @@ package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.vo.WxRentPropertyContractVo;

import java.util.List;
import java.util.Map;
@@ -59,4 +60,6 @@ public interface WxRentContractMapper extends CommonMapper<WxRentContract, Long>

Integer getShopType(WxRentContract wxRentContract);

List<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record);

}

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

@@ -1837,8 +1837,8 @@ public class WxRentContractServiceImpl implements WxRentContractService {
}

@Override
public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo wxRentPropertyContractVo, Integer pageNum, Integer pageSize) {
return null;
public PageInfo<WxRentPropertyContractVo> listContractVo(WxRentPropertyContractVo record, Integer pageIndex, Integer pageSize) {
return PageHelper.startPage(pageIndex, pageSize).doSelectPageInfo(() -> wxRentContractMapper.listContractVo(record));
}

public static double getMonthNeedPay(Double price,Date start,Date end){


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

@@ -296,6 +296,51 @@
select s.type from wx_rent_contract r left join wx_shop s on(s.id = r.`shop_id`)
where r.id = #{id}
</select>
<resultMap id="contractMap" type="com.iformall.domain.vo.WxRentPropertyContractVo">
<id column="id" property="id"/>
<result column="contract_number" property="contractNumber"/>
<result column="shop_number" property="shopNumber"/>
<result column="merchant_name" property="merchantName"/>
<result column="rent_info" property="rentInfo"/>
<result column="rental_start_date" property="rentalStartDate"/>
<result column="rental_end_date" property="rentalEndDate"/>
<result column="rent_price" property="rentPrice"/>
<result column="property_price" property="propertyPrice"/>
<result column="type" property="type"/>
<result column="status" property="status"/>
<result column="apply_status" property="applyStatus"/>
<result column="operation_type" property="operationType"/>
<result column="rent_shop_type" property="rentShopType"/>
</resultMap>
<select id="listContractVo" parameterType="com.iformall.domain.vo.WxRentPropertyContractVo" resultMap="contractMap">
select rc.id,rc.merchant_name,rc.rental_start_date,rc.rental_end_date,rc.`status`,
rc.price as rent_price,rc.contract_number,s.shop_number shopNumber,
rc.type,rc.apply_status,rc.rent_shop_type,rc.rent_info rentInfo,pc.price as property_price
from wx_rent_contract rc inner join wx_property_contract pc on rc.id=pc.rent_contract_id
left join wx_shop s on rc.shop_id=s.id
<where>
rc.tenant_id=#{tenantId}
<if test=" null != merchantName and merchantName!=''">and rc.`merchant_name` like
concat('%',#{merchantName},'%')
</if>
<if test=" null != shopNumber and shopNumber!='' and null != rentShopType and rentShopType==1">
and json_extract(rc.rent_info,'$[*].shopNumber') like concat('%',#{shopNumber},'%')
</if>
<if test=" null != shopNumber and shopNumber!='' and null != rentShopType and rentShopType==2">
and s.`shop_number` like concat('%',#{shopNumber},'%')
</if>
<if test=" null != status ">and rc.`status` = #{status}</if>
<if test=" null != type ">and rc.`type` = #{type}</if>
<if test=" null != rentShopType ">and rc.`rent_shop_type` = #{rentShopType}</if>
<if test=" null != applyStatus ">and rc.`apply_status` = #{applyStatus}</if>
<if test=" null != operationType ">and rc.`operation_type` = #{operationType}</if>
</where>
<if test=" null != sortColumns">order by ${sortColumns}</if>
<if test=" null == sortColumns">order by rc.id desc</if>
</select>


</mapper>

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