From 3a45da15c947c2d478a44a51bd0f926647b1b841 Mon Sep 17 00:00:00 2001
From: MrShi <1878285526@qq.com>
Date: 星期五, 11 四月 2025 16:33:17 +0800
Subject: [PATCH] 提交

---
 server/service/src/main/java/com/doumee/service/business/impl/CompanyServiceImpl.java |   26 +++++++++++++++-----------
 1 files changed, 15 insertions(+), 11 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 2f06be6..549104a 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
@@ -38,6 +38,7 @@
 import java.lang.reflect.Array;
 import java.net.URI;
 import java.net.URLEncoder;
+import java.nio.charset.Charset;
 import java.util.*;
 
 /**
@@ -176,8 +177,9 @@
             if(fileList == null || fileList.size() == 0){
                 throw  new BusinessException(ResponseStatus.DATA_EMPTY);
             }
-            String fileName =  model.getName() +"_浼佷笟璇佷欢_"+System.currentTimeMillis()+".zip" ;
-            String encodeFileName = URLEncoder.encode(fileName);
+
+            String fileName =  model.getName() +"-浼佷笟璇佷欢-"+System.currentTimeMillis() ;
+            String encodeFileName =URLEncoder.encode(fileName, Charset.forName("UTF-8").toString())+".zip";
             response.setHeader("Content-Disposition","attachment;filename=" + encodeFileName);
             response.setContentType("application/octet-stream");
             response.setHeader("eva-opera-type", "download");
@@ -365,8 +367,8 @@
             ||StringUtils.isBlank(company.getEmail())){
             throw new BusinessException(ResponseStatus.BAD_REQUEST);
         }
-
-        if(!debugModel){
+        String  phoneAtuh = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.COMPANY_PHONE_AUTH).getCode();
+        if(!debugModel && !StringUtils.equals(phoneAtuh,Constants.ONE+"")){
             //鎵嬫満楠岃瘉鐮佹牎楠�
             SmsEmailServiceImpl.isCaptcheValide(smsEmailMapper,company.getPhone(),company.getCaptche());
         }
@@ -381,14 +383,14 @@
         }else  {
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"璇蜂笂浼犺惀涓氭墽鐓э紒");
         }
-        if(company.getSignImg()!=null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){
-            multifileList.add(initMultiFileByCompay(company,company.getSignImg(),Constants.MultiFile.COM_SING_IMG.getKey()));
-        }else {
+//        if(company.getSignImg()!=null && StringUtils.isNotBlank(company.getSignImg().getFileurl())){
+//            multifileList.add(initMultiFileByCompay(company,company.getSignImg(),Constants.MultiFile.COM_SING_IMG.getKey()));
+//        }else {
          //   throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"璇蜂笂浼犵數瀛愮绔狅紒");
-        }
+//        }
         if(company.getIdcardImgList()!=null && company.getIdcardImgList()!=null&& company.getIdcardImgList().size()>0){
             for(Multifile f : company.getIdcardImgList()){
-                multifileList.add(initMultiFileByCompay(company,f,Constants.MultiFile.COM_IDCARD_IMG.getKey()));
+                    multifileList.add(initMultiFileByCompay(company,f,Constants.MultiFile.COM_IDCARD_IMG.getKey()));
             }
         }else {
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"璇蜂笂浼犺韩浠借瘉鎵弿浠讹紒");
@@ -485,7 +487,8 @@
                 || StringUtils.isBlank(company.getCaptche())){
             throw  new BusinessException(ResponseStatus.BAD_REQUEST );
         }
-        if(!debugModel){
+        String  phoneAtuh = systemDictDataBiz.queryByCode(Constants.SYSTEM,Constants.COMPANY_PHONE_AUTH).getCode();
+        if(!debugModel && !StringUtils.equals(phoneAtuh,Constants.ONE+"")){
             SmsEmailServiceImpl.isCaptcheValide(smsEmailMapper,company.getPhone(),company.getCaptche());
         }
         Company model = companyMapper.selectById(company.getId());
@@ -549,9 +552,10 @@
 
         if(companyMapper.selectCount(new QueryWrapper<Company>().lambda()
                 .ne(Company::getId,company.getId())
+                .eq(Company::getIsdeleted,Constants.ZERO)
                 .and(w->w.eq(Company::getCode,company.getCode())
                     .or().eq(Company::getEmail,company.getEmail())
-                    .or().eq(Company::getUsername,company.getUsername())
+//                    .or().eq(Company::getUsername,company.getUsername())
                     .or().eq(Company::getName,company.getName()))
                 )>0){
             throw new BusinessException(ResponseStatus.BAD_REQUEST.getCode(),"瀵逛笉璧凤紝璇ヤ紒涓氥�愬悕绉般�戙�愮粺涓�淇$敤浠g爜銆戙�愰偖绠便�戞垨鑰呫�愪紒涓氳处鍙枫�戝凡瀛樺湪锛岃纭鍚庨噸鏂版彁浜わ紒");

--
Gitblit v1.9.3