|
|
|
@ -3,7 +3,6 @@ package com.base.springcloud.service.imp; |
|
|
|
import com.base.springcloud.aspect.annotation.BusinessException; |
|
|
|
import com.base.springcloud.bo.DepartBO; |
|
|
|
import com.base.springcloud.bo.MerchantConfigBO; |
|
|
|
import com.base.springcloud.bo.OrderBO; |
|
|
|
import com.base.springcloud.constant.ErrorConstant; |
|
|
|
import com.base.springcloud.constant.PaymentConstant; |
|
|
|
import com.base.springcloud.dao.MerchantConfigMapper; |
|
|
|
@ -73,7 +72,7 @@ public class MerchantServiceImp implements MerchantService { |
|
|
|
*/ |
|
|
|
private String uploadCertificate(MultipartFile certFile) { |
|
|
|
String filePath = OssBootUtil.upload(certFile, PaymentConstant.MECHANT_CERTIFICATE_SAVE_PATH); |
|
|
|
String temp[] = filePath.split("\\/"); |
|
|
|
String[] temp = filePath.split("/"); |
|
|
|
return PaymentConstant.MECHANT_CERTIFICATE_SAVE_PATH + PaymentConstant.SLASH + temp[temp.length - 1]; |
|
|
|
} |
|
|
|
|
|
|
|
@ -142,15 +141,13 @@ public class MerchantServiceImp implements MerchantService { |
|
|
|
MerchantConfig merchantConfig = new MerchantConfig(); |
|
|
|
BeanUtils.copyProperties(merchantConfigBO,merchantConfig); |
|
|
|
List<MerchantConfig> merchantConfigList = merchantConfigMapper.queryMerchantConfig(merchantConfig); |
|
|
|
if(!Optional.ofNullable(merchantConfigList).isPresent()){ |
|
|
|
// TODO 抛出业务异常
|
|
|
|
} |
|
|
|
List<MerchantConfigBO> merchantConfigBOList = merchantConfigList.stream().map(o -> { |
|
|
|
// TODO 抛出业务异常
|
|
|
|
assert merchantConfigList != null; |
|
|
|
return merchantConfigList.stream().map(o -> { |
|
|
|
MerchantConfigBO result = new MerchantConfigBO(); |
|
|
|
BeanUtils.copyProperties(o, result); |
|
|
|
return result; |
|
|
|
}).collect(Collectors.toList()); |
|
|
|
return merchantConfigBOList; |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|
@ -196,7 +193,7 @@ public class MerchantServiceImp implements MerchantService { |
|
|
|
}finally { |
|
|
|
try{ |
|
|
|
is.close(); |
|
|
|
}catch (IOException e){ |
|
|
|
}catch (IOException ignored){ |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|