Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init

This commit is contained in:
guohb
2024-04-23 16:58:34 +08:00
5 changed files with 14 additions and 10 deletions

View File

@@ -8,6 +8,7 @@
<result column="rent_type" jdbcType="TINYINT" property="rentType" />
<result column="sign_time" jdbcType="TIMESTAMP" property="signTime" />
<result column="contract_start_time" jdbcType="TIMESTAMP" property="contractStartTime" />
<result column="contract_end_time" jdbcType="TIMESTAMP" property="contractEndTime" />
<result column="contract_months" jdbcType="INTEGER" property="contractMonths" />
<result column="shop_rent_type" jdbcType="TINYINT" property="shopRentType" />
<result column="month_rent" jdbcType="VARCHAR" property="monthRent" />
@@ -23,7 +24,7 @@
</resultMap>
<sql id="allColumn">
id, shop_id, point_id, rent_type, sign_time, contract_start_time, contract_months, shop_rent_type,
id, shop_id, point_id, rent_type, sign_time, contract_start_time, contract_end_time, contract_months, shop_rent_type,
month_rent, first_year_month_rent, second_year_month_rent, third_year_month_rent, contract_pic,
house_certificate_pic, audit_id, deleted, create_time, update_time
</sql>

View File

@@ -42,6 +42,12 @@ public class ShopRentInfoDO {
@Column(name = "contract_start_time")
private Date contractStartTime;
/**
* 合同结束日期
*/
@Column(name = "contract_end_time")
private Date contractEndTime;
/**
* 签约年限
*/

View File

@@ -40,6 +40,9 @@ public class AddRentContractRequest {
@ApiModelProperty("合同开始日期")
private Date contractStartTime;
@ApiModelProperty("合同结束日期")
private Date contractEndTime;
@ApiModelProperty("签约年限")
private Integer contractMonths;
@@ -79,7 +82,7 @@ public class AddRentContractRequest {
}
return true;
}
if(Objects.isNull(signTime) || Objects.isNull(contractStartTime)){
if(Objects.isNull(signTime) || Objects.isNull(contractStartTime) || Objects.isNull(contractEndTime)){
return false;
}
if(Objects.isNull(contractMonths) || Objects.isNull(shopRentType)){
@@ -111,6 +114,7 @@ public class AddRentContractRequest {
shopRentInfoDO.setRentType(param.getRentType());
shopRentInfoDO.setSignTime(param.getSignTime());
shopRentInfoDO.setContractStartTime(param.getContractStartTime());
shopRentInfoDO.setContractEndTime(param.getContractEndTime());
shopRentInfoDO.setContractMonths(param.getContractMonths());
shopRentInfoDO.setShopRentType(param.getShopRentType());
shopRentInfoDO.setMonthRent(param.getMonthRent());

View File

@@ -28,11 +28,9 @@ public class UpdateRentContractRequest {
@ApiModelProperty("租赁id")
private Long rentId;
@NotNull
@ApiModelProperty("店铺id")
private Long shopId;
@NotNull
@ApiModelProperty("铺位id")
private Long pointId;
@@ -79,9 +77,6 @@ public class UpdateRentContractRequest {
if(Objects.isNull(rentId)){
return false;
}
if(Objects.isNull(shopId) || Objects.isNull(pointId)){
return false;
}
if(RentTypeEnum.OWN.getCode().equals(rentType)){
if(CollectionUtils.isEmpty(houseCertificatePic) || houseCertificatePic.size() > 3){
return false;

View File

@@ -82,9 +82,7 @@ public class ShopRentInfoVO {
result.setSignTime(shopRentInfo.getSignTime());
if(RentTypeEnum.RENT.getCode().equals(shopRentInfo.getRentType())){
result.setContractStartTime(shopRentInfo.getContractStartTime());
LocalDate start = shopRentInfo.getContractStartTime().toInstant().atZone(java.time.ZoneId.systemDefault()).toLocalDate();
Instant instant = start.plusMonths(shopRentInfo.getContractMonths()).minusDays(1L).atStartOfDay().atZone(ZoneId.systemDefault()).toInstant();
result.setContractEndTime(Date.from(instant));
result.setContractEndTime(shopRentInfo.getContractEndTime());
result.setContractMonths(shopRentInfo.getContractMonths());
}
result.setShopRentType(shopRentInfo.getShopRentType());