From a753bca194442c5a2fb6cae36e9445914133859d Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sun, 27 Jan 2019 13:23:17 +0800 Subject: [PATCH 1/8] =?UTF-8?q?[=E7=89=A9=E4=B8=9A=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E5=88=9B=E5=BB=BA][=E8=8E=B7=E5=8F=96=E7=AD=BE=E7=BA=A6?= =?UTF-8?q?=E6=95=B0=E6=8D=AE]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxRentContractMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index cf42e17ea..0e699a534 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -186,7 +186,7 @@ left join wx_shop s on rc.shop_id=s.id left join wx_mall_building b on s.building=b.id left join wx_mall_floor f on s.floor=f.id - where rc.status not in(1,5,6,7) and rc.tenant_id=#{tenantId} + where rc.status not in(0,1,5,6,7) and rc.tenant_id=#{tenantId} and rc.rent_shop_type = #{rentShopType} order by id desc From d03c6364f5af8cf9fe3f89e86c502afbfbad4ce0 Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sun, 27 Jan 2019 13:25:08 +0800 Subject: [PATCH 2/8] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxRentContractMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index 0e699a534..f111f3ade 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -104,7 +104,7 @@ rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName, rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type, rc.start_date startDate,rc.end_date endDate,br.`name` brandName,rc.apply_status applyStatus,rc.bank_name - bankName, + bankName,rc.merchant_id merchantId rc.rent_shop_type rentShopType from wx_rent_contract rc left join wx_shop s on rc.shop_id=s.id From 886d5cd7c3877fd919877531348284e7a872986d Mon Sep 17 00:00:00 2001 From: gongbiao Date: Sun, 27 Jan 2019 14:00:58 +0800 Subject: [PATCH 3/8] =?UTF-8?q?[=E7=A7=9F=E8=B5=81=E5=90=88=E5=90=8C][?= =?UTF-8?q?=E4=BF=AE=E6=94=B9][=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2?= =?UTF-8?q?=E8=AF=AD=E5=8F=A5]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/resources/mapper/WxRentContractMapper.xml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml index f111f3ade..ec1ffc72a 100644 --- a/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxRentContractMapper.xml @@ -104,8 +104,7 @@ rc.price,rc.contract_number contractNumber,s.shop_number shopNumber,f.floor_name floorName,b.building_name buildingName, rc.lease,rc.filepath,rc.filename,rc.pay_account payAccount,rc.sign_date signDate,rc.merchant_id merchantId,rc.type, rc.start_date startDate,rc.end_date endDate,br.`name` brandName,rc.apply_status applyStatus,rc.bank_name - bankName,rc.merchant_id merchantId - rc.rent_shop_type rentShopType + bankName,rc.merchant_id merchantId,rc.rent_shop_type rentShopType from wx_rent_contract rc left join wx_shop s on rc.shop_id=s.id left join wx_mall_floor f on s.floor=f.id From 7a267f4c39a8ca2748591dafc988775f87ceba62 Mon Sep 17 00:00:00 2001 From: Stormeye Wu Date: Sun, 27 Jan 2019 14:56:16 +0800 Subject: [PATCH 4/8] =?UTF-8?q?[MYSQL][=E4=BF=AE=E6=94=B9]:Communications?= =?UTF-8?q?=20link=20failure=20fix?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- mallinkAdmin/src/main/resources/application-dev.yml | 4 ++-- mallinkAdmin/src/main/resources/application-prod.yml | 4 ++-- mallinkAdmin/src/main/resources/application-test.yml | 4 ++-- mallinkBApi/src/main/resources/application-dev.yml | 4 ++-- mallinkBApi/src/main/resources/application-prod.yml | 4 ++-- mallinkBApi/src/main/resources/application-test.yml | 4 ++-- mallinkCApi/src/main/resources/application-dev.yml | 4 ++-- mallinkCApi/src/main/resources/application-prod.yml | 4 ++-- mallinkCApi/src/main/resources/application-test.yml | 4 ++-- mallinkSchedule/src/main/resources/application-dev.yml | 4 ++-- mallinkSchedule/src/main/resources/application-prod.yml | 4 ++-- mallinkSchedule/src/main/resources/application-test.yml | 4 ++-- 12 files changed, 24 insertions(+), 24 deletions(-) diff --git a/mallinkAdmin/src/main/resources/application-dev.yml b/mallinkAdmin/src/main/resources/application-dev.yml index 9a44be55a..11c340efb 100644 --- a/mallinkAdmin/src/main/resources/application-dev.yml +++ b/mallinkAdmin/src/main/resources/application-dev.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkAdmin/src/main/resources/application-prod.yml b/mallinkAdmin/src/main/resources/application-prod.yml index 4e3fe8273..6a7ae47a9 100644 --- a/mallinkAdmin/src/main/resources/application-prod.yml +++ b/mallinkAdmin/src/main/resources/application-prod.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkAdmin/src/main/resources/application-test.yml b/mallinkAdmin/src/main/resources/application-test.yml index 73665ba7c..95614d338 100644 --- a/mallinkAdmin/src/main/resources/application-test.yml +++ b/mallinkAdmin/src/main/resources/application-test.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkBApi/src/main/resources/application-dev.yml b/mallinkBApi/src/main/resources/application-dev.yml index 9313311da..737b9d17b 100644 --- a/mallinkBApi/src/main/resources/application-dev.yml +++ b/mallinkBApi/src/main/resources/application-dev.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkBApi/src/main/resources/application-prod.yml b/mallinkBApi/src/main/resources/application-prod.yml index 12e579a99..db4aba906 100644 --- a/mallinkBApi/src/main/resources/application-prod.yml +++ b/mallinkBApi/src/main/resources/application-prod.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkBApi/src/main/resources/application-test.yml b/mallinkBApi/src/main/resources/application-test.yml index 13c973402..26f6f0ede 100644 --- a/mallinkBApi/src/main/resources/application-test.yml +++ b/mallinkBApi/src/main/resources/application-test.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkCApi/src/main/resources/application-dev.yml b/mallinkCApi/src/main/resources/application-dev.yml index ea2d43c65..07091e190 100644 --- a/mallinkCApi/src/main/resources/application-dev.yml +++ b/mallinkCApi/src/main/resources/application-dev.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkCApi/src/main/resources/application-prod.yml b/mallinkCApi/src/main/resources/application-prod.yml index d93753e5d..ec942d369 100644 --- a/mallinkCApi/src/main/resources/application-prod.yml +++ b/mallinkCApi/src/main/resources/application-prod.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkCApi/src/main/resources/application-test.yml b/mallinkCApi/src/main/resources/application-test.yml index 7121e560b..6dd07629d 100644 --- a/mallinkCApi/src/main/resources/application-test.yml +++ b/mallinkCApi/src/main/resources/application-test.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkSchedule/src/main/resources/application-dev.yml b/mallinkSchedule/src/main/resources/application-dev.yml index 4d216e66a..70c47007f 100644 --- a/mallinkSchedule/src/main/resources/application-dev.yml +++ b/mallinkSchedule/src/main/resources/application-dev.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkSchedule/src/main/resources/application-prod.yml b/mallinkSchedule/src/main/resources/application-prod.yml index 52c9a9bd3..41098c265 100644 --- a/mallinkSchedule/src/main/resources/application-prod.yml +++ b/mallinkSchedule/src/main/resources/application-prod.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false diff --git a/mallinkSchedule/src/main/resources/application-test.yml b/mallinkSchedule/src/main/resources/application-test.yml index 6a7759992..29602f8c0 100644 --- a/mallinkSchedule/src/main/resources/application-test.yml +++ b/mallinkSchedule/src/main/resources/application-test.yml @@ -11,8 +11,8 @@ spring: initialSize: 1 maxWait: 60000 minIdle: 1 - timeBetweenEvictionRunsMillis: 60000 - minEvictableIdleTimeMillis: 300000 + timeBetweenEvictionRunsMillis: 28000 + minEvictableIdleTimeMillis: 28000 validationQuery: select 'x' testWhileIdle: true testOnBorrow: false From a6c7384cda451a9bebc13151fe8946d626f58c10 Mon Sep 17 00:00:00 2001 From: luozukai Date: Sun, 27 Jan 2019 15:34:29 +0800 Subject: [PATCH 5/8] =?UTF-8?q?[=E5=AE=A1=E6=89=B9=E6=B5=81][=E4=BF=AE?= =?UTF-8?q?=E6=94=B9][=E5=88=A4=E6=96=AD=E4=BB=BB=E5=8A=A1=E4=B8=8D?= =?UTF-8?q?=E5=AD=98=E5=9C=A8=E7=BB=99=E5=89=8D=E7=AB=AF=E6=8F=90=E7=A4=BA?= =?UTF-8?q?]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/com/iformall/common/ErrorCode.java | 7 ++++++- .../com/iformall/service/impl/WxFlowServiceImpl.java | 10 +++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/common/ErrorCode.java b/mallinkService/src/main/java/com/iformall/common/ErrorCode.java index 713e73875..5caecb556 100644 --- a/mallinkService/src/main/java/com/iformall/common/ErrorCode.java +++ b/mallinkService/src/main/java/com/iformall/common/ErrorCode.java @@ -28,11 +28,16 @@ public enum ErrorCode{ SYS_REPEAT_SUBMIT_EXCEPTION(1013, "请勿重复操作"), /** - * 数据库 + * 审批流 */ FLOW_FAIL(24000, "审批流操作出错"), + /** + * 审批流不存在 + */ + FLOW_INST_NOT_EXIST(24001, "任务不存在"), + /** * 数据库 */ diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java index 91e391ecb..733bfc4bc 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxFlowServiceImpl.java @@ -2,6 +2,7 @@ package com.iformall.service.impl; import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; +import com.iformall.common.ErrorCode; import com.iformall.common.Result; import com.iformall.common.ResultData; import com.iformall.domain.po.*; @@ -92,7 +93,7 @@ public class WxFlowServiceImpl implements WxFlowService { rent.setApplyStatus(applyStatus); wxRentContractService.updateApplyStatus(rent); - // 如果审批完成,而且是补录,修改状态 + // 如果审批完成,而且是补录直接改为已签约状态(普通需要绑定商户才是已签约) if(supplement!=null && supplement && EnumRentContractAppStatus.FINISH.getCode().intValue() == applyStatus.intValue()) { wxRentContractService.updateRentContractStatus(businessId); } @@ -252,6 +253,9 @@ public class WxFlowServiceImpl implements WxFlowService { } String processInstanceId = resultList.get(0).getProcessInstanceId(); ProcessInstance pi = runtimeService.createProcessInstanceQuery().processInstanceId(processInstanceId).singleResult(); + if(pi == null){ + return new ResultData(ErrorCode.FLOW_INST_NOT_EXIST.getCode(), "任务不存在"); + } Task task = taskService.createTaskQuery().processInstanceId(pi.getId()).singleResult(); Map mapInfo = taskService.getVariables(task.getId()); List> taskAssigneeList = (List)mapInfo.get("taskAssignee"); @@ -318,7 +322,7 @@ public class WxFlowServiceImpl implements WxFlowService { Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); if (task == null) { - throw new MallinkException(Result.ERROR, "流程不存在"); + return new ResultData(ErrorCode.FLOW_INST_NOT_EXIST.getCode(), "任务不存在"); } taskName = task.getName(); taskKey = task.getTaskDefinitionKey(); @@ -464,7 +468,7 @@ public class WxFlowServiceImpl implements WxFlowService { String taskKey; Task task = taskService.createTaskQuery().taskId(taskId).singleResult(); if (task == null) { - throw new MallinkException(Result.ERROR, "流程不存在"); + return new ResultData(ErrorCode.FLOW_INST_NOT_EXIST.getCode(), "任务不存在"); } taskName = task.getName(); taskKey = task.getTaskDefinitionKey(); From 12dc922f7d81aaea0074a5d47c17d140c51c535e Mon Sep 17 00:00:00 2001 From: luozukai Date: Sun, 27 Jan 2019 15:53:13 +0800 Subject: [PATCH 6/8] =?UTF-8?q?[=E5=AE=A1=E6=89=B9=E6=B5=81][=E6=B7=BB?= =?UTF-8?q?=E5=8A=A0][=E8=A1=A5=E5=BD=95=E7=BC=96=E8=BE=91=E4=B9=9F?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=AE=A1=E6=89=B9=E6=B5=81]?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/WxRentContractController.java | 4 +-- .../service/WxRentContractService.java | 2 +- .../impl/WxRentContractServiceImpl.java | 26 ++++++++++++++++--- 3 files changed, 26 insertions(+), 6 deletions(-) diff --git a/mallinkAdmin/src/main/java/com/iformall/controller/WxRentContractController.java b/mallinkAdmin/src/main/java/com/iformall/controller/WxRentContractController.java index 09293a725..eb080c6bd 100644 --- a/mallinkAdmin/src/main/java/com/iformall/controller/WxRentContractController.java +++ b/mallinkAdmin/src/main/java/com/iformall/controller/WxRentContractController.java @@ -51,14 +51,14 @@ public class WxRentContractController extends BaseController { public ResultData update(@RequestBody WxRentContract wxRentContract) { logger.debug("[" + getIpAddr() + "] WxRentContractController::update"); wxRentContract.setTenantId(getTenantId()); - return wxRentContractService.update(wxRentContract, getUser().getId()); + return wxRentContractService.update(wxRentContract, getUser().getId(),getUser().getName()); } @PostMapping("updateMoney") public ResultData updateMoney(@RequestBody WxRentContract wxRentContract) { logger.debug("[" + getIpAddr() + "] WxRentContractController::updateMoney"); wxRentContract.setTenantId(getTenantId()); - return wxRentContractService.update(wxRentContract, getUser().getId()); + return wxRentContractService.update(wxRentContract, getUser().getId(),getUser().getName()); } @PostMapping("updateFile") diff --git a/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java b/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java index c62dd7e7f..0ab69056f 100644 --- a/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java +++ b/mallinkService/src/main/java/com/iformall/service/WxRentContractService.java @@ -40,7 +40,7 @@ public interface WxRentContractService { */ ResultData save(WxRentContract record,Long userId,String userName); - ResultData update(WxRentContract record, Long userId); + ResultData update(WxRentContract record, Long userId,String userName); /** * 根据Id删除实体 diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java index d8839340c..f27cb9afe 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxRentContractServiceImpl.java @@ -215,11 +215,31 @@ public class WxRentContractServiceImpl implements WxRentContractService { return new ResultData(Result.SUCCESS, "保存租赁合同信息成功", record); } - @Transactional(rollbackFor = {Exception.class}) @Override - public ResultData update(WxRentContract record, Long userId) { - return getResultDataForUpdate(record, userId); + public ResultData update(WxRentContract record, Long userId,String userName) { + ResultData resultData = getResultDataForUpdate(record, userId); + try { + // 启动审批流 + if(record.getFlowParams() != null){ + record.getFlowParams().put("businessId",record.getId().toString()); + if(record.getMerchantId() != null) { + record.getFlowParams().put("supplement", true); //设置补录 + } + wxFlowService.start(record.getFlowParams(),userId,userName,record.getTenantId()); + + // 合同状态改成待签约 + WxRentContract updateRentContract = new WxRentContract(); + updateRentContract.setId(record.getId()); + updateRentContract.setStatus(EnumRentContractStatus.WAIT_SIGN.getCode()); + wxRentContractMapper.updateStatus(updateRentContract); + logger.info("id:{},启动审批流成功 ,是否补录:{}",record.getId().toString(),record.getMerchantId() != null); + } + } catch (Exception e) { + logger.error("启动审批流失败,e:" + e.getMessage()); + throw new MallinkException(ErrorCode.FLOW_FAIL.getCode(), "FLOW FAILD " + e.getMessage()); + } + return resultData; } public ResultData getResultDataForUpdate(WxRentContract record, Long userId) { From 39beb5abd7af590082dd26168a9852314e3c2fe5 Mon Sep 17 00:00:00 2001 From: hupeng Date: Sun, 27 Jan 2019 17:01:14 +0800 Subject: [PATCH 7/8] =?UTF-8?q?[BUG][1000915]:=E8=A7=A3=E5=86=B3=E5=95=86?= =?UTF-8?q?=E6=88=B7=E7=A6=81=E7=94=A8=E5=90=8E=E5=88=B8=E4=B8=8D=E8=83=BD?= =?UTF-8?q?=E4=B8=8B=E6=9E=B6=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/iformall/service/impl/WxMerchantServiceImpl.java | 1 + .../src/main/resources/mapper/WxCouponChannelMapper.xml | 6 +++++- .../src/main/resources/mapper/WxCouponSendMapper.xml | 6 +++++- .../src/main/resources/mapper/WxOrderMapper.xml | 9 +++++++-- 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java index 7924f708b..675c48bb7 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java @@ -247,6 +247,7 @@ public class WxMerchantServiceImpl implements WxMerchantService { couponIds.stream().filter(cid->!isCouponMerchantValid(cid)).forEach(cid->{ WxCoupon wxCoupon = new WxCoupon(); wxCoupon.setId(cid); + wxCoupon.setTenantId(wxMerchant.getTenantId()); wxCoupon.setStatus(EnumCouponStatus.COUPON_STATUS_TAKE_OFFF.getCode()); wxCouponService.saveOrUpdate(wxCoupon); }); diff --git a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml index ed67253d4..c510e418c 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponChannelMapper.xml @@ -97,7 +97,11 @@ - update wx_coupon_channel set status=#{status} where tenant_id=#{tenantId} and coupon_id=#{couponId} + update wx_coupon_channel set status=#{status} + where coupon_id=#{couponId} + + and tenant_id = #{tenantId} + diff --git a/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml b/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml index 56cf63396..df27907ce 100644 --- a/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxCouponSendMapper.xml @@ -89,7 +89,11 @@ - update wx_coupon_send set status=#{status} where tenant_id=#{tenantId} and coupon_id=#{couponId} + update wx_coupon_send set status=#{status} + where coupon_id=#{couponId} + + and tenant_id = #{tenantId} + diff --git a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml index ec857fe2a..f901dfc48 100644 --- a/mallinkService/src/main/resources/mapper/WxOrderMapper.xml +++ b/mallinkService/src/main/resources/mapper/WxOrderMapper.xml @@ -173,8 +173,13 @@ - update wx_order set order_status=#{orderStatus} where tenant_id=#{tenantId} and product_id=#{productId} and press_end_date is not null - + update wx_order set order_status=#{orderStatus} + where product_id=#{productId} + and press_end_date is not null + + and `tenant_id` = #{tenantId} + + From 008d28b1c0943744939f1bd0b9062f15a25146eb Mon Sep 17 00:00:00 2001 From: hupeng Date: Sun, 27 Jan 2019 17:02:20 +0800 Subject: [PATCH 8/8] =?UTF-8?q?[BUG][1000918]:=E4=BF=AE=E5=A4=8D=E5=95=86?= =?UTF-8?q?=E6=88=B7=E5=81=9C=E7=94=A8=E5=90=8E=E8=BF=98=E8=83=BD=E5=BF=AB?= =?UTF-8?q?=E9=80=9F=E5=A4=8D=E5=88=B6=E6=8A=95=E6=94=BE=E5=88=B8=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iformall/service/impl/WxCouponServiceImpl.java | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java index 0a9bd8312..b9d3eb09f 100644 --- a/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java +++ b/mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java @@ -1,6 +1,7 @@ package com.iformall.service.impl; import java.util.*; +import java.util.stream.Collectors; import com.alibaba.fastjson.JSONObject; import com.github.pagehelper.PageHelper; @@ -10,6 +11,7 @@ import com.iformall.common.ResultData; import com.iformall.domain.po.WxCoupon; import com.iformall.domain.po.WxCouponMerchant; import com.iformall.domain.vo.WxCouponCVo; +import com.iformall.domain.vo.WxMerchantVo; import com.iformall.enums.*; import com.iformall.mapper.WxCouponMapper; import com.iformall.mapper.WxCouponMerchantMapper; @@ -71,7 +73,15 @@ public class WxCouponServiceImpl implements WxCouponService { @Override public WxCouponCVo getVoById(Long id) { - return wxCouponMapper.findVoDetail(id); + WxCouponCVo wxCouponCVo = wxCouponMapper.findVoDetail(id); + List merchantList = wxCouponCVo.getMerchantVoList(); + if (merchantList != null) { + merchantList = merchantList.stream().filter( + m->m.getMerchantStatus().equals(EnumMerchantStatus.VALID.getCode())) + .collect(Collectors.toList()); + } + wxCouponCVo.setMerchantVoList(merchantList); + return wxCouponCVo; }