From 7a78385de091a985c263d5442ded1e0dd46e20eb Mon Sep 17 00:00:00 2001 From: xiaohanzi Date: Mon, 17 Aug 2020 20:30:32 +0800 Subject: [PATCH] fix contract --- .../controller/workflow/WxFlowAbleController.java | 14 ++++++++++++++ .../V202007311200__FOR_MEMBER_ONLY_001.sql | 3 +++ .../com/iformall/domain/po/WxRentContract.java | 3 +++ .../main/resources/mapper/WxRentContractMapper.xml | 4 +++- 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java b/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java index 3627eabd5..f89a8742e 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/workflow/WxFlowAbleController.java @@ -236,6 +236,20 @@ public class WxFlowAbleController extends BaseController { wxFlowModel.updateTenantInfo(getTenantInfo()); return new ResultData(wxFlowService.getModelBybusiness(wxFlowModel)); } + + @ApiOperation("业务查询是否存在模板") + @GetMapping(value = "/businessHasFlow") + @SystemControllerLog(description = "工作流-模板列表") + public Integer businessHasFlow(@ModelAttribute WxFlowModel wxFlowModel) { + logger.debug("[" + getIpAddr() + "] FlowAbleController::getModelBybusiness"); + wxFlowModel.updateTenantInfo(getTenantInfo()); + List models = wxFlowService.getModelBybusiness(wxFlowModel); + if (null != models && models.size() > 0 ) { + return 1; + }else { + return 0; + } + } /** * 配置列表 diff --git a/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql b/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql index 535c45c08..2f6ad8ea2 100644 --- a/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql +++ b/mallinkAdmin/src/main/resources/db/migration/V202007311200__FOR_MEMBER_ONLY_001.sql @@ -57,3 +57,6 @@ ALTER TABLE wx_rent_contract DROP COLUMN shop_id; ALTER TABLE `wx_rent_contract` ADD COLUMN `shop_name` VARCHAR(100) COMMENT '店铺名称'; +ALTER TABLE `wx_rent_contract` +ADD COLUMN `from_id` BIGINT(20) DEFAULT NULL COMMENT '来源ID,针对续签,从哪个合同续签'; + diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java index 92bf7e776..8a25948b2 100644 --- a/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java +++ b/mallinkService/src/main/java/com/iformall/domain/po/WxRentContract.java @@ -31,6 +31,9 @@ public class WxRentContract extends TenantEntity { protected Long id; + @io.swagger.annotations.ApiModelProperty(value = "来源ID,针对续签,从哪个合同续签", name = "fromId") + private Long fromId; + @TableField(exist = false) @SortColumn(column = "shopNumber") private String shopNumber; diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index 97c7a632c..c35fbaed7 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -68,6 +68,7 @@ + @@ -84,7 +85,7 @@ `tenant_id`,`parent_tenant_id`,`filepath`,`status`,`contract_number`,`deposit`,`pay_date`,`is_del`,`merchant_name`, `brand`,`business_id`,`shop_type`,`updatetime`,`createtime`,`link_person`,`link_phone`, `pay_account`,`filename`,`lease`,`type`,`revenue`,`adjust_ratio`,`adjust_period`,`pay_ratio`, - `start_date`,`end_date`,`shop_name`, + `start_date`,`end_date`,`shop_name`,`from_id`, `apply_status`,`bank_name`,`rent_shop_type`,`fix_start_date`,`fix_end_date`, `business_type`,`rent_info`, `file_names`,price_unit,rent_price,`subject_name`,rent_start_type, `rent_input_way`,`adjust_ratio_way`,`operation_type`,late_pay_ratio,late_pay_day,bus_discount_ratio,bus_discount_time @@ -94,6 +95,7 @@ where 1 = 1 and `id` = #{id} + and `from_id` = #{fromId} and `merchant_id` = #{merchantId} and `price` = #{price} and `rental_start_date` = #{rentalStartDate}