From d985cde2781d0fa2e51c3531652e136bb18265a3 Mon Sep 17 00:00:00 2001 From: zhaoqifeng Date: Tue, 28 Jul 2020 15:36:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=93=8D=E4=BD=9C=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/CodeServiceImpl.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java index 8b8d4890ae..85979d119d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/CodeServiceImpl.java @@ -133,21 +133,21 @@ public class CodeServiceImpl implements CodeService { codeExtDTO.setExtJson(extJson); codeExtService.update(codeExtDTO); -// WxMaCodeCommitReq request = ConvertUtils.sourceToTarget(formDTO, WxMaCodeCommitReq.class); -// request.setExtJson(extJson); -// //调用微信API上传代码 -// WxResult wxResult = wxMaCodeService.commit(authInfo.getAuthorizerAccessToken(), request); -// //上传失败,抛出异常 -// if (!wxResult.success()) { -// saveOperation(formDTO.getCustomerId(), null, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, wxResult.getErrorMsg()); -// throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); -// } + WxMaCodeCommitReq request = ConvertUtils.sourceToTarget(formDTO, WxMaCodeCommitReq.class); + request.setExtJson(extJson); + //调用微信API上传代码 + WxResult wxResult = wxMaCodeService.commit(authInfo.getAuthorizerAccessToken(), request); + //上传失败,抛出异常 + if (!wxResult.success()) { + saveOperation(formDTO.getCustomerId(), null, formDTO.getUserVersion(), CodeConstant.OPER_UPLOAD, wxResult.getErrorMsg()); + throw new RenException(wxResult.getErrorCode(), wxResult.getErrorMsg()); + } //获取客户信息 CustomerDTO customerDTO = new CustomerDTO(); customerDTO.setId(formDTO.getCustomerId()); PaCustomerDTO paCustomerDTO = paCustomerService.get(formDTO.getCustomerId()); //将之前上传信息删除 -// codeCustomerService.deleteCode(formDTO.getCustomerId(), formDTO.getClientType()); + codeCustomerService.deleteCode(formDTO.getCustomerId(), formDTO.getClientType()); //将上传信息存入表中 CodeCustomerDTO codeCustomerDTO = ConvertUtils.sourceToTarget(formDTO, CodeCustomerDTO.class);