From a9ca0823ab8f33ca85abebcf6ec4a8da235adb49 Mon Sep 17 00:00:00 2001 From: jiangping <jp@doumee.com> Date: 星期二, 30 一月 2024 14:36:49 +0800 Subject: [PATCH] 开发业务接口 --- server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java index 09fe4cb..afbfe4c 100644 --- a/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java +++ b/server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java @@ -145,7 +145,7 @@ if(fileList == null || fileList.size() == 0){ throw new BusinessException(ResponseStatus.DATA_EMPTY); } - String fileName = model.getName() +"鐞嗚禂璧勬枡涓媉"+System.currentTimeMillis()+".zip" ; + String fileName = model.getName() +"_浼佷笟璇佷欢_"+System.currentTimeMillis()+".zip" ; String encodeFileName = URLEncoder.encode(fileName); response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName); response.setContentType("application/octet-stream"); @@ -318,13 +318,16 @@ company.setSignId(""); } if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null){ + boolean isNew = false; for(Multifile f : company.getIdcardImgList()){ if(f.getId() !=null){ continue; } + isNew = true; multifileList.add(initMultiFileByCompay(company,f,Constants.MultiFile.COM_IDCARD_IMG.getKey())); } - objList.add(Constants.MultiFile.COM_IDCARD_IMG.getKey()); + if(isNew) + objList.add(Constants.MultiFile.COM_IDCARD_IMG.getKey()); } if(objList.size()>0){ multifileMapper.update(null,new UpdateWrapper<Multifile>().lambda() @@ -426,9 +429,8 @@ } private void isValidUpdateParam(Company company) { if( StringUtils.isBlank(company.getName()) - ||StringUtils.isBlank(company.getUsername()) +// ||StringUtils.isBlank(company.getUsername()) ||StringUtils.isBlank(company.getCode()) - ||StringUtils.isBlank(company.getCaptche()) ||StringUtils.isBlank(company.getLegalName()) ||StringUtils.isBlank(company.getEmail()) ){ throw new BusinessException(ResponseStatus.BAD_REQUEST); @@ -465,7 +467,6 @@ dealFileDataForUpdate(company); Company update = new Company(); - update.setIsdeleted(company.getId()); update.setName(company.getName()); update.setCode(company.getCode()); update.setEditDate(new Date()); @@ -476,6 +477,8 @@ update.setTaxCode(company.getTaxCode()); update.setTaxBank(company.getTaxBank()); update.setEmail(company.getEmail()); + update.setId(model.getId()); + update.setLegalName(company.getLegalName()); update.setInvoiceAddr(company.getInvoiceAddr()); update.setSignIdStatus(company.getSignIdStatus()); update.setInvoiceEmail(company.getInvoiceEmail()); @@ -486,7 +489,7 @@ //濡傛灉閭鍙戠敓鏀瑰彉 update.setSignStatus(Constants.ZERO); } - companyMapper.updateById(company); + companyMapper.updateById(update); company.setCreator(update.getEditor()); company.setCreateDate(update.getEditDate()); if(StringUtils.isNotBlank(company.getUsername())){ @@ -564,6 +567,7 @@ * public boolean organizationCreate (String fullname,String creditCode,String legalName,String email,File businessimg,String notifyUrl){ */ @Override + @Async public void startSignAuth(Integer id){ Company company = companyMapper.selectById(id); Multifile f = multifileMapper.selectOne(new QueryWrapper<Multifile>().lambda() -- Gitblit v1.9.3