From 8f0e828e6eacc1c0ed86053f39916a938ee6a99d Mon Sep 17 00:00:00 2001 From: winter <664946893@qq.com> Date: Fri, 15 Nov 2024 19:30:04 +0800 Subject: [PATCH] fix --- .../WxPropertyContractController.java | 2 - .../db/migration/V202411000000001.sql | 2 + .../domain/po/WxPropertyContract.java | 40 ++++++++----------- .../impl/WxPropertyContractServiceImpl.java | 1 - .../mapper/WxPropertyContractMapper.xml | 3 +- 5 files changed, 19 insertions(+), 29 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java index 8fa6b97d6..7fb89038a 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/contract/WxPropertyContractController.java @@ -138,7 +138,6 @@ public class WxPropertyContractController extends WxContractBaseController { if (null == wxPropertyContract.getAdjustPeriod()) { return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "adjustPeriod不能为空"); } - wxPropertyContract.setShopIdStr(","+wxPropertyContract.getShopIds()+","); }else { WxRentContract rentContract = rentContractService.getSimpleDeatil(wxPropertyContract.getRentContractId()); if (null == rentContract) { @@ -159,7 +158,6 @@ public class WxPropertyContractController extends WxContractBaseController { wxPropertyContract.setEndDate(rentContract.getEndDate()); wxPropertyContract.setSignDate(rentContract.getSignDate()); wxPropertyContract.setRentInfo(rentContract.getRentInfo()); - wxPropertyContract.setShopIdStr(rentContract.getShopIdStr()); wxPropertyContract.setCustomersId(rentContract.getCustomersId()); } wxPropertyContract.setRentStartType(EnumRentStartType.RENTTIME.getCode()); diff --git a/mallinkAdmin/src/main/resources/db/migration/V202411000000001.sql b/mallinkAdmin/src/main/resources/db/migration/V202411000000001.sql index 353bcf0dd..19a2344de 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V202411000000001.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V202411000000001.sql @@ -44,6 +44,8 @@ alter table wx_property_contract drop column shop_ids; alter table wx_property_contract drop column shop_numbers; alter table wx_property_contract drop column pay_date; +ALTER TABLE wx_property_contract DROP COLUMN shop_id_str; + #此处要把万星的合同,根据商户的刷成customers_id (商业和soho的) alter table wx_rent_contract add column customers_id bigint(20) not null comment '客户ID'; diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java index 6c6dcab43..e4d39f984 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxPropertyContract.java @@ -254,9 +254,6 @@ public class WxPropertyContract extends TenantEntity { @io.swagger.annotations.ApiModelProperty(value = "首期账单收款截止日期", name = "firstBillReceiveDate") private Date firstBillReceiveDate; - @io.swagger.annotations.ApiModelProperty(value = "店铺编号串", name = "shopIdStr") - private String shopIdStr; - //查询过期提醒 @TableField(exist = false) private Integer outDateNofity; @@ -301,6 +298,22 @@ public class WxPropertyContract extends TenantEntity { return null; } + public List shopIdsByShop() { + String rentInfo = this.getRentInfo(); + if (!StringUtils.isBlank(rentInfo)) { + JSONArray rentInfoArray = JSONArray.parseArray(rentInfo); + int size = rentInfoArray.size(); + List shopIdList = new ArrayList(); + for (int i = 0; i < size; i++) { + JSONObject rentInfoObject = rentInfoArray.getJSONObject(i); + Long shopId = rentInfoObject.getLong("id"); + shopIdList.add(shopId); + } + return shopIdList; + } + return null; + } + public List getFeesStardarsList() { if (StringUtils.isNotBlank(feesStandardsInfo)) { return JSON.parseArray(feesStandardsInfo, WxEnergyFees.class); @@ -328,27 +341,6 @@ public class WxPropertyContract extends TenantEntity { return null; } - public List shopIdsByShop() { - if (StringUtils.isBlank(this.shopIdStr)) { - return null; - } - String[] sidss = this.shopIdStr.split(","); - if (null == sidss || sidss.length <= 0 ) { - return null; - } - List shopIds = new ArrayList(); - for (int i = 0 ; i < sidss.length; i++) { - String s = sidss[i]; - if (StringUtils.isNotBlank(s)) { - shopIds.add(Long.parseLong(s)); - } - } - if (shopIds.size() <= 0 ) { - return null; - } - return shopIds; - } - @TableField(exist = false) private List merchantIds; diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java index e1a06b93b..0d9182555 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxPropertyContractServiceImpl.java @@ -492,7 +492,6 @@ public class WxPropertyContractServiceImpl implements WxPropertyContractService record.setEndDate(wxPropertyContract.getEndDate()); record.setAdjustPeriod(wxPropertyContract.getAdjustPeriod()); record.setCreateType(wxPropertyContract.getCreateType()); - record.setShopIdStr(wxPropertyContract.getShopIdStr()); record.setFeeStandards(wxPropertyContract.getFeesStardarsList()); record.setRentInfo(wxPropertyContract.getRentInfo()); record.setRentArea(wxPropertyContract.getRentArea()); diff --git a/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml b/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml index 978e266f2..50c8304f9 100644 --- a/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxPropertyContractMapper.xml @@ -64,7 +64,6 @@ - @@ -73,7 +72,7 @@ `deposit`,`is_del`,`receive_period_unit`,`create_by`,`update_by`,`first_bill_receive_date`, `updatetime`,`createtime`,`rent_area`,`fees_standards_info`,`first_bill_date_start`,`first_bill_date_end`, `link_person`,`link_phone`,`pay_account`,`filename`,`lease`,`rent_contract_id`,`day_price_calcute`,`month_average_days`, - `start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`,fixed_price,`pay_period_rate`,shop_id_str, + `start_date`,`end_date`,`apply_status`,`adjust_period`,`business_type`,adjust_ratio,`rent_info`,fixed_price,`pay_period_rate`, `file_names`,price_unit,rent_price,subject_name,rent_start_type,`operation_type`,late_pay_ratio,late_pay_day,end_contract_time,out_date_notify_days,out_date_notify_phone