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

[物业合同][修改][多文件上传]

release_toaliyun_real
gongbiao 7 лет назад
Родитель
Сommit
efd3dbf82a
3 измененных файлов: 31 добавлений и 11 удалений
  1. +16
    -8
      mallinkAdmin/src/main/resources/db/migration/V201904012109__ADD_RENT_FILES.sql
  2. +12
    -1
      mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java
  3. +3
    -2
      mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml

+ 16
- 8
mallinkAdmin/src/main/resources/db/migration/V201904012109__ADD_RENT_FILES.sql Просмотреть файл

@@ -1,11 +1,19 @@
ALTER TABLE `wx_rent_contract`
ADD COLUMN `file_names` JSON NULL COMMENT '合同支持多文件' AFTER `fix_end_date`;

update `wx_rent_contract`
set `file_names` =
CASE
WHEN `filename` is not null and LENGTH(`filename`) > 0 THEN
CONCAT('[{\"filename\":\"',`filename`,'\",\"filepath\":\"',`filepath`,'\"}]')
ELSE
CONCAT('[]')
END;
update wx_rent_contract set file_names=CONCAT('[{\"filename\":\"',`filename`,'\",\"filepath\":\"',`filepath`,'\"}]')
where filename is not null or LENGTH(`filename`) >0;

update wx_rent_contract set file_names=CONCAT('[]') where filename is null or LENGTH(`filename`)=0 ;


ALTER TABLE `wx_property_contract`
ADD COLUMN `file_names` JSON NULL COMMENT '合同支持多文件';

update wx_property_contract set file_names=CONCAT('[{\"filename\":\"',`filename`,'\",\"filepath\":\"',`filepath`,'\"}]')
where filename is not null or LENGTH(`filename`) >0;

update wx_property_contract set file_names=CONCAT('[]') where filename is null or LENGTH(`filename`)=0 ;




+ 12
- 1
mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java Просмотреть файл

@@ -178,7 +178,18 @@ public class WxPropertyContract implements Serializable {
@io.swagger.annotations.ApiModelProperty(value = "租金信息", name = "rentInfo")
private String rentInfo;

public String getRentInfo() {
@io.swagger.annotations.ApiModelProperty(value = "上传文件名", name = "fileNames")
private String fileNames;

public String getFileNames() {
return fileNames;
}

public void setFileNames(String fileNames) {
this.fileNames = fileNames;
}

public String getRentInfo() {
return rentInfo;
}



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

@@ -37,6 +37,7 @@
<result column="business_type" property="businessType"/>
<result column="adjust_ratio" property="adjustRatio"/>
<result column="rent_info" jdbcType="VARCHAR" property="rentInfo"/>
<result column="file_names" jdbcType="VARCHAR" property="fileNames"/>

</resultMap>
@@ -46,7 +47,7 @@
`deposit`,`pay_date`,`is_del`,`merchant_name`,`brand`,`business_id`,
`shop_type`,`shop_id`,`updatetime`,`createtime`,`rent_area`,
`link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`,
`start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`
`start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`, `file_names`
</sql>
<sql id="dynamicWhereConditions">
@@ -106,7 +107,7 @@
rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,
start_date startDate,end_date endDate,rc.rent_contract_id rentContractId,br.`name` brandName,
s.addr,rc.apply_status applyStatus,rc.adjust_period adjustPeriod,rc.business_type businessType,
rc.adjust_ratio adjustRatio,rc.rent_info rentInfo
rc.adjust_ratio adjustRatio,rc.rent_info rentInfo, rc.file_names fileNames
from wx_property_contract rc
left join wx_shop s on rc.shop_id=s.id
left join wx_mall_floor f on s.floor=f.id


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