java110-bean/src/main/java/com/java110/dto/log/TransactionOutLogDto.java
@@ -17,7 +17,18 @@ public static final String STATE_S = "S";//成功 public static final String STATE_F = "F";//失败 // 微信支付 public static final String LOG_TYPE_WECHAT_PAY = "WECHAT_PAY"; // 物联网 public static final String LOG_TYPE_IOT = "IOT"; // 物联网 // 物联网 public static final String LOG_TYPE_SMS = "SMS"; // 短信验证码 // oss public static final String LOG_TYPE_OSS = "OSS"; // OSS public static final String LOG_TYPE_DEFAULT = "DEFAULT"; // 默认 private String requestMessage; private String costTime; private String requestUrl; @@ -32,6 +43,8 @@ private Date createTime; private String statusCd = "0"; private String logType; public String getRequestMessage() { @@ -122,4 +135,12 @@ public void setStatusCd(String statusCd) { this.statusCd = statusCd; } public String getLogType() { return logType; } public void setLogType(String logType) { this.logType = logType; } } java110-bean/src/main/java/com/java110/po/log/TransactionOutLogPo.java
@@ -27,6 +27,8 @@ */ public class TransactionOutLogPo implements Serializable { private String requestMessage; private String costTime; private String requestUrl; @@ -36,6 +38,8 @@ private String requestHeader; private String state; private String responseMessage; private String logType; public String getRequestMessage() { return requestMessage; @@ -109,5 +113,11 @@ this.responseMessage = responseMessage; } public String getLogType() { return logType; } public void setLogType(String logType) { this.logType = logType; } } java110-core/src/main/java/com/java110/core/client/OssUploadTemplate.java
@@ -1,11 +1,15 @@ package com.java110.core.client; import com.alibaba.fastjson.JSONObject; import com.aliyun.oss.OSSClient; import com.java110.core.factory.LogFactory; import com.java110.core.log.LoggerFactory; import com.java110.utils.util.Base64Convert; import com.java110.utils.util.DateUtil; import com.java110.utils.util.OSSUtil; import org.slf4j.Logger; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Component; import org.springframework.web.multipart.MultipartFile; @@ -42,6 +46,7 @@ OSSClient ossClient = null; ByteArrayInputStream is = null; String urlPath = ""; String resMsg = "上传成功"; try { ossClient = OSSUtil.getOSSClient(); fileName = UUID.randomUUID().toString(); @@ -67,7 +72,8 @@ OSSUtil.uploadByInputStream(ossClient, is, ftpPath + urlPath); } catch (Exception e) { logger.error("上传文件失败", e); throw new IllegalArgumentException("上传文件失败"); resMsg = e.getMessage()+e.getLocalizedMessage(); throw new IllegalArgumentException("上传文件失败" + e.getMessage()); } finally { if (is != null) { try { @@ -76,6 +82,9 @@ e.printStackTrace(); } } LogFactory.saveOutLog("OSS", "文件", new ResponseEntity(resMsg, HttpStatus.OK)); } return urlPath; } java110-core/src/main/java/com/java110/core/client/OutRestTemplate.java
@@ -1,6 +1,7 @@ package com.java110.core.client; import com.java110.core.factory.GenerateCodeFactory; import com.java110.core.factory.LogFactory; import com.java110.core.log.LoggerFactory; import com.java110.dto.log.TransactionOutLogDto; import com.java110.intf.common.ITransactionOutLogV1ServiceSMO; @@ -17,6 +18,7 @@ import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.lang.Nullable; import org.springframework.web.client.HttpStatusCodeException; import org.springframework.web.client.RestClientException; @@ -71,49 +73,40 @@ } else { tmpResponseEntity = new ResponseEntity(errMsg, HttpStatus.BAD_REQUEST); } saveLog(url, method.name(), requestEntity, tmpResponseEntity, DateUtil.getCurrentDate().getTime() - startTime.getTime()); LogFactory.saveOutLog(url, "POST", DateUtil.getCurrentDate().getTime() - startTime.getTime(), null, requestEntity.getBody().toString(), tmpResponseEntity); } return responseEntity; } @Override public <T> ResponseEntity<T> postForEntity(String url, @Nullable Object request, Class<T> responseType, Object... uriVariables) throws RestClientException { String errMsg = ""; private void saveLog(String url, String method, HttpEntity<?> requestEntity, ResponseEntity<String> responseEntity, long costTime) { String logServiceCode = MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH,MappingCache.CALL_OUT_LOG); if(StringUtil.isEmpty(logServiceCode) || "OFF".equalsIgnoreCase(logServiceCode) || url.startsWith(ServiceConstant.BOOT_SERVICE_ORDER_URL)){ return; } ITransactionOutLogV1ServiceSMO transactionOutLogV1InnerServiceSMO = null; ResponseEntity<T> responseEntity = null; ResponseEntity tmpResponseEntity = null; Date startTime = DateUtil.getCurrentDate(); try { transactionOutLogV1InnerServiceSMO = ApplicationContextFactory.getBean(ITransactionOutLogV1ServiceSMO.class.getName(), ITransactionOutLogV1ServiceSMO.class); }catch (Exception e){ transactionOutLogV1InnerServiceSMO = ApplicationContextFactory.getBean("transactionOutLogV1ServiceSMOImpl",ITransactionOutLogV1ServiceSMO.class); logger.debug("请求信息:url:{},method:{},request:{},uriVariables:{}", url, "POST", request, uriVariables); responseEntity = super.postForEntity(url, request, responseType, uriVariables); logger.debug("返回信息:responseEntity:{}", responseEntity); } catch (HttpStatusCodeException e) { errMsg = ExceptionUtil.getStackTrace(e); throw e; } finally { if (responseEntity != null) { tmpResponseEntity = new ResponseEntity(responseEntity.getBody(), responseEntity.getStatusCode()); } else { tmpResponseEntity = new ResponseEntity(errMsg, HttpStatus.BAD_REQUEST); } // saveLog(url, "POST", null, tmpResponseEntity, DateUtil.getCurrentDate().getTime() - startTime.getTime()); LogFactory.saveOutLog(url, "POST", DateUtil.getCurrentDate().getTime() - startTime.getTime(), null, request.toString(), tmpResponseEntity); } if(transactionOutLogV1InnerServiceSMO == null){ transactionOutLogV1InnerServiceSMO = ApplicationContextFactory.getBean("transactionOutLogV1ServiceSMOImpl",ITransactionOutLogV1ServiceSMO.class); } TransactionOutLogPo transactionOutLogPo = new TransactionOutLogPo(); transactionOutLogPo.setCostTime(costTime + ""); transactionOutLogPo.setLogId(GenerateCodeFactory.getGeneratorId("11")); transactionOutLogPo.setRequestHeader(requestEntity.getHeaders() == null ? "" : requestEntity.getHeaders().toSingleValueMap().toString()); transactionOutLogPo.setRequestMessage(requestEntity.getBody() == null ? "" : requestEntity.getBody().toString()); transactionOutLogPo.setRequestMethod(method); transactionOutLogPo.setRequestUrl(url); transactionOutLogPo.setResponseHeader(responseEntity.getHeaders() == null ? "" : responseEntity.getHeaders().toSingleValueMap().toString()); transactionOutLogPo.setResponseMessage(responseEntity.getBody() == null ? "": responseEntity.getBody().toString()); transactionOutLogPo.setState(responseEntity.getStatusCode() == HttpStatus.OK ? TransactionOutLogDto.STATE_S:TransactionOutLogDto.STATE_F); transactionOutLogV1InnerServiceSMO.saveTransactionOutLog(transactionOutLogPo); return responseEntity; } } java110-core/src/main/java/com/java110/core/client/RestTemplate.java
@@ -5,6 +5,9 @@ import org.springframework.http.HttpEntity; import org.springframework.http.HttpMethod; import org.springframework.http.ResponseEntity; import org.springframework.lang.Nullable; import org.springframework.web.client.RequestCallback; import org.springframework.web.client.ResponseExtractor; import org.springframework.web.client.RestClientException; /** @@ -41,4 +44,14 @@ return responseEntity; } @Override public <T> ResponseEntity<T> postForEntity(String url, @Nullable Object request, Class<T> responseType, Object... uriVariables) throws RestClientException { logger.debug("请求信息:url:{},method:{},request:{},uriVariables:{}", url, request, uriVariables); ResponseEntity<T> responseEntity = super.postForEntity(url, request, responseType, uriVariables); logger.debug("返回信息:responseEntity:{}", responseEntity); return responseEntity; } } java110-core/src/main/java/com/java110/core/factory/AliSendMessageFactory.java
@@ -11,8 +11,11 @@ import com.java110.dto.sms.SmsConfigDto; import com.java110.utils.cache.MappingCache; import com.java110.vo.ResultVo; import org.apache.juli.logging.Log; import org.slf4j.Logger; import com.java110.core.log.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import java.util.Random; /* @@ -85,6 +88,7 @@ try { CommonResponse response = client.getCommonResponse(request); logger.debug("发送验证码信息:{}", response.getData()); LogFactory.saveOutLog("SMS","{\"code\":" + code + "}",new ResponseEntity(response.getData(),HttpStatus.OK)); } catch (ServerException e) { e.printStackTrace(); } catch (ClientException e) { java110-core/src/main/java/com/java110/core/factory/LogFactory.java
New file @@ -0,0 +1,120 @@ package com.java110.core.factory; import com.java110.dto.log.TransactionOutLogDto; import com.java110.intf.common.ITransactionOutLogV1ServiceSMO; import com.java110.po.log.TransactionOutLogPo; import com.java110.utils.cache.MappingCache; import com.java110.utils.constant.MappingConstant; import com.java110.utils.constant.ServiceConstant; import com.java110.utils.factory.ApplicationContextFactory; import com.java110.utils.util.StringUtil; import org.springframework.http.HttpHeaders; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; public class LogFactory { /** * 保存对外交互日志 * * @param url 地址 * @param reqStr 请求参数 * @param responseEntity 返回参数 */ public static void saveOutLog(String url, String reqStr, ResponseEntity responseEntity) { saveOutLog(url, "无", 0, null, reqStr, responseEntity); } /** * 保存对外交互日志 * * @param url 地址 * @param method 方法 * @param reqStr 请求参数 * @param responseEntity 返回参数 */ public static void saveOutLog(String url, String method, String reqStr, ResponseEntity responseEntity) { saveOutLog(url, method, 0, null, reqStr, responseEntity); } /** * 保存对外交互日志 * * @param url 地址 * @param method 方法 * @param costTime 所需时间 * @param reqHeaders 请求头 * @param reqStr 请求参数 * @param responseEntity 返回参数 */ public static void saveOutLog(String url, String method, long costTime, HttpHeaders reqHeaders, String reqStr, ResponseEntity responseEntity) { try { String logServiceCode = MappingCache.getValue(MappingConstant.DOMAIN_SYSTEM_SWITCH, MappingCache.CALL_OUT_LOG); if (StringUtil.isEmpty(logServiceCode) || "OFF".equalsIgnoreCase(logServiceCode) || url.startsWith(ServiceConstant.BOOT_SERVICE_ORDER_URL)) { return; } ITransactionOutLogV1ServiceSMO transactionOutLogV1InnerServiceSMO = null; try { transactionOutLogV1InnerServiceSMO = ApplicationContextFactory.getBean(ITransactionOutLogV1ServiceSMO.class.getName(), ITransactionOutLogV1ServiceSMO.class); } catch (Exception e) { transactionOutLogV1InnerServiceSMO = ApplicationContextFactory.getBean("transactionOutLogV1ServiceSMOImpl", ITransactionOutLogV1ServiceSMO.class); } if (transactionOutLogV1InnerServiceSMO == null) { transactionOutLogV1InnerServiceSMO = ApplicationContextFactory.getBean("transactionOutLogV1ServiceSMOImpl", ITransactionOutLogV1ServiceSMO.class); } TransactionOutLogPo transactionOutLogPo = new TransactionOutLogPo(); //todo 分析日志类型 String logType = analysisLogType(url); transactionOutLogPo.setCostTime(costTime + ""); transactionOutLogPo.setLogId(GenerateCodeFactory.getGeneratorId("11")); transactionOutLogPo.setRequestHeader(reqHeaders == null ? "{}" : reqHeaders.toSingleValueMap().toString()); transactionOutLogPo.setRequestMessage(reqStr); transactionOutLogPo.setRequestMethod(method); transactionOutLogPo.setRequestUrl(url); transactionOutLogPo.setResponseHeader(responseEntity.getHeaders() == null ? "" : responseEntity.getHeaders().toSingleValueMap().toString()); transactionOutLogPo.setResponseMessage(responseEntity.getBody().toString()); transactionOutLogPo.setState(responseEntity.getStatusCode() == HttpStatus.OK ? TransactionOutLogDto.STATE_S : TransactionOutLogDto.STATE_F); transactionOutLogPo.setLogType(logType); transactionOutLogV1InnerServiceSMO.saveTransactionOutLog(transactionOutLogPo); } catch (Exception e) { e.printStackTrace(); } } /** * 分析日志类型 * * @param url * @return */ private static String analysisLogType(String url) { if (url.contains("9999") || url.contains("iot") || url.contains("extApi")) { return TransactionOutLogDto.LOG_TYPE_IOT; } if (url.contains("api.mch.weixin.qq.com")) { return TransactionOutLogDto.LOG_TYPE_WECHAT_PAY; } if(TransactionOutLogDto.LOG_TYPE_SMS.equals(url)){ return TransactionOutLogDto.LOG_TYPE_SMS; } if(TransactionOutLogDto.LOG_TYPE_OSS.equals(url)){ return TransactionOutLogDto.LOG_TYPE_OSS; } return TransactionOutLogDto.LOG_TYPE_DEFAULT; } } java110-core/src/main/java/com/java110/core/factory/TencentSendMessageFactory.java
@@ -12,6 +12,8 @@ import com.tencentcloudapi.sms.v20190711.models.SendSmsResponse; import org.slf4j.Logger; import com.java110.core.log.LoggerFactory; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import java.util.Random; /* @@ -85,13 +87,16 @@ sendSmsRequest.setTemplateParamSet(templateParam); sendSmsRequest.setSign(MappingCache.getValue(TENCENT_SMS_DOMAIN, "Sign")); //签名内容,不是填签名id,见《创建短信签名和模版》小节 SendSmsResponse sendSmsResponse = null; String errMsg= "发送短信失败:"; try { sendSmsResponse = smsClient.SendSms(sendSmsRequest); //发送短信 } catch (TencentCloudSDKException e) { logger.error("发送短信失败", e); errMsg = e.getMessage(); } logger.debug("腾讯短信验证码发送,请求报文" + JSONObject.toJSONString(sendSmsRequest) + ",返回日志" + (sendSmsResponse != null ? JSONObject.toJSONString(sendSmsResponse) : "")); LogFactory.saveOutLog("SMS", JSONObject.toJSONString(sendSmsRequest), new ResponseEntity((sendSmsResponse != null ? JSONObject.toJSONString(sendSmsResponse) : errMsg), HttpStatus.OK)); } java110-core/src/main/java/com/java110/core/smo/ISaveTransactionLogSMO.java
@@ -2,6 +2,7 @@ import com.java110.dto.log.AssetImportLogDto; import com.java110.po.log.TransactionLogPo; import com.java110.po.log.TransactionOutLogPo; /** * @ClassName ISaveTransactionLog @@ -22,4 +23,6 @@ * @param assetImportLogDto */ void saveAssetImportLog(AssetImportLogDto assetImportLogDto); } java110-core/src/main/java/com/java110/core/smo/impl/SaveTransactionLogSMOImpl.java
@@ -5,13 +5,18 @@ import com.java110.core.context.IPageData; import com.java110.core.context.PageData; import com.java110.core.factory.CallApiServiceFactory; import com.java110.core.factory.GenerateCodeFactory; import com.java110.core.smo.ISaveTransactionLogSMO; import com.java110.dto.app.AppDto; import com.java110.dto.log.AssetImportLogDto; import com.java110.dto.log.TransactionOutLogDto; import com.java110.intf.common.ITransactionLogInnerServiceSMO; import com.java110.intf.common.ITransactionOutLogV1ServiceSMO; import com.java110.po.log.TransactionLogPo; import com.java110.po.log.TransactionOutLogPo; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpMethod; import org.springframework.http.HttpStatus; import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; @@ -36,6 +41,9 @@ @Autowired(required = false) private RestTemplate outRestTemplate; @Autowired(required = false) private ITransactionOutLogV1ServiceSMO transactionOutLogV1InnerServiceSMOImpl; @Override @Async public void saveLog(TransactionLogPo transactionLogPo) { @@ -58,4 +66,5 @@ CallApiServiceFactory.callCenterService(tmpRestTemplate, newPd, JSONObject.toJSONString(assetImportLogDto), apiUrl, HttpMethod.POST); } } java110-db/src/main/resources/mapper/common/TransactionOutLogV1ServiceDaoImplMapper.xml
@@ -5,132 +5,143 @@ <mapper namespace="transactionOutLogV1ServiceDaoImpl"> <!-- 保存调用外系统日志信息 add by wuxw 2018-07-03 --> <insert id="saveTransactionOutLogInfo" parameterType="Map"> insert into transaction_out_log( request_message,cost_time,request_url,request_method,response_header,log_id,request_header,state,response_message ) values ( #{requestMessage},#{costTime},#{requestUrl},#{requestMethod},#{responseHeader},#{logId},#{requestHeader},#{state},#{responseMessage} ) request_message,cost_time,request_url,request_method,response_header,log_id,request_header,state,response_message <if test="logType != null and logType != ''"> ,log_type </if> ) values ( #{requestMessage},#{costTime},#{requestUrl},#{requestMethod},#{responseHeader},#{logId},#{requestHeader},#{state},#{responseMessage} <if test="logType != null and logType != ''"> ,#{logType} </if> ) </insert> <!-- 查询调用外系统日志信息 add by wuxw 2018-07-03 --> <select id="getTransactionOutLogInfo" parameterType="Map" resultType="Map"> select t.request_message,t.request_message requestMessage,t.cost_time,t.cost_time costTime,t.request_url,t.request_url requestUrl,t.request_method,t.request_method requestMethod,t.response_header,t.response_header responseHeader,t.log_id,t.log_id logId,t.request_header,t.request_header requestHeader,t.state,t.response_message,t.response_message responseMessage from transaction_out_log t where 1 =1 <if test="requestMessage !=null and requestMessage != ''"> and t.request_message= #{requestMessage} </if> <if test="costTime !=null and costTime != ''"> and t.cost_time= #{costTime} </if> <if test="requestUrl !=null and requestUrl != ''"> and t.request_url= #{requestUrl} </if> <if test="requestMethod !=null and requestMethod != ''"> and t.request_method= #{requestMethod} </if> <if test="responseHeader !=null and responseHeader != ''"> and t.response_header= #{responseHeader} </if> <if test="logId !=null and logId != ''"> and t.log_id= #{logId} </if> <if test="requestHeader !=null and requestHeader != ''"> and t.request_header= #{requestHeader} </if> <if test="state !=null and state != ''"> and t.state= #{state} </if> <if test="responseMessage !=null and responseMessage != ''"> and t.response_message= #{responseMessage} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> select t.request_message,t.request_message requestMessage,t.cost_time,t.cost_time costTime,t.request_url,t.request_url requestUrl,t.request_method,t.request_method requestMethod,t.response_header,t.response_header responseHeader,t.log_id,t.log_id logId,t.request_header,t.request_header requestHeader,t.state,t.response_message,t.response_message responseMessage,t.log_type logType from transaction_out_log t where 1 =1 <if test="requestMessage !=null and requestMessage != ''"> and t.request_message= #{requestMessage} </if> <if test="costTime !=null and costTime != ''"> and t.cost_time= #{costTime} </if> <if test="requestUrl !=null and requestUrl != ''"> and t.request_url= #{requestUrl} </if> <if test="requestMethod !=null and requestMethod != ''"> and t.request_method= #{requestMethod} </if> <if test="responseHeader !=null and responseHeader != ''"> and t.response_header= #{responseHeader} </if> <if test="logId !=null and logId != ''"> and t.log_id= #{logId} </if> <if test="logType !=null and logType != ''"> and t.log_type= #{logType} </if> <if test="requestHeader !=null and requestHeader != ''"> and t.request_header= #{requestHeader} </if> <if test="state !=null and state != ''"> and t.state= #{state} </if> <if test="responseMessage !=null and responseMessage != ''"> and t.response_message= #{responseMessage} </if> order by t.create_time desc <if test="page != -1 and page != null "> limit #{page}, #{row} </if> </select> <!-- 修改调用外系统日志信息 add by wuxw 2018-07-03 --> <update id="updateTransactionOutLogInfo" parameterType="Map"> update transaction_out_log t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="requestMessage !=null and requestMessage != ''"> , t.request_message= #{requestMessage} </if> <if test="costTime !=null and costTime != ''"> , t.cost_time= #{costTime} </if> <if test="requestUrl !=null and requestUrl != ''"> , t.request_url= #{requestUrl} </if> <if test="requestMethod !=null and requestMethod != ''"> , t.request_method= #{requestMethod} </if> <if test="responseHeader !=null and responseHeader != ''"> , t.response_header= #{responseHeader} </if> <if test="requestHeader !=null and requestHeader != ''"> , t.request_header= #{requestHeader} </if> <if test="state !=null and state != ''"> , t.state= #{state} </if> <if test="responseMessage !=null and responseMessage != ''"> , t.response_message= #{responseMessage} </if> where 1=1 <if test="logId !=null and logId != ''"> and t.log_id= #{logId} </if> update transaction_out_log t set t.status_cd = #{statusCd} <if test="newBId != null and newBId != ''"> ,t.b_id = #{newBId} </if> <if test="requestMessage !=null and requestMessage != ''"> , t.request_message= #{requestMessage} </if> <if test="costTime !=null and costTime != ''"> , t.cost_time= #{costTime} </if> <if test="requestUrl !=null and requestUrl != ''"> , t.request_url= #{requestUrl} </if> <if test="requestMethod !=null and requestMethod != ''"> , t.request_method= #{requestMethod} </if> <if test="responseHeader !=null and responseHeader != ''"> , t.response_header= #{responseHeader} </if> <if test="requestHeader !=null and requestHeader != ''"> , t.request_header= #{requestHeader} </if> <if test="state !=null and state != ''"> , t.state= #{state} </if> <if test="responseMessage !=null and responseMessage != ''"> , t.response_message= #{responseMessage} </if> where 1=1 <if test="logId !=null and logId != ''"> and t.log_id= #{logId} </if> </update> <!-- 查询调用外系统日志数量 add by wuxw 2018-07-03 --> <select id="queryTransactionOutLogsCount" parameterType="Map" resultType="Map"> select count(1) count from transaction_out_log t where 1 =1 <if test="requestMessage !=null and requestMessage != ''"> and t.request_message= #{requestMessage} </if> <if test="costTime !=null and costTime != ''"> and t.cost_time= #{costTime} </if> <if test="requestUrl !=null and requestUrl != ''"> and t.request_url= #{requestUrl} </if> <if test="requestMethod !=null and requestMethod != ''"> and t.request_method= #{requestMethod} </if> <if test="responseHeader !=null and responseHeader != ''"> and t.response_header= #{responseHeader} </if> <if test="logId !=null and logId != ''"> and t.log_id= #{logId} </if> <if test="requestHeader !=null and requestHeader != ''"> and t.request_header= #{requestHeader} </if> <if test="state !=null and state != ''"> and t.state= #{state} </if> <if test="responseMessage !=null and responseMessage != ''"> and t.response_message= #{responseMessage} </if> <select id="queryTransactionOutLogsCount" parameterType="Map" resultType="Map"> select count(1) count from transaction_out_log t where 1 =1 <if test="requestMessage !=null and requestMessage != ''"> and t.request_message= #{requestMessage} </if> <if test="costTime !=null and costTime != ''"> and t.cost_time= #{costTime} </if> <if test="requestUrl !=null and requestUrl != ''"> and t.request_url= #{requestUrl} </if> <if test="requestMethod !=null and requestMethod != ''"> and t.request_method= #{requestMethod} </if> <if test="responseHeader !=null and responseHeader != ''"> and t.response_header= #{responseHeader} </if> <if test="logId !=null and logId != ''"> and t.log_id= #{logId} </if> <if test="logType !=null and logType != ''"> and t.log_type= #{logType} </if> <if test="requestHeader !=null and requestHeader != ''"> and t.request_header= #{requestHeader} </if> <if test="state !=null and state != ''"> and t.state= #{state} </if> <if test="responseMessage !=null and responseMessage != ''"> and t.response_message= #{responseMessage} </if> </select> </select> </mapper> java110-utils/src/main/java/com/java110/utils/util/OSSUtil.java
@@ -95,6 +95,7 @@ ossClient.putObject(bucketName, objectName, inputStream); } catch (Exception e) { e.printStackTrace(); throw new IllegalArgumentException(e.getMessage()); } finally { if (ossClient != null) { ossClient.shutdown(); service-acct/src/main/java/com/java110/acct/payment/adapt/wechat/WechatNativeQrcodePaymentFactoryAdapt.java
@@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSONObject; import com.java110.acct.payment.IPaymentFactoryAdapt; import com.java110.core.client.RestTemplate; import com.java110.core.context.ICmdDataFlowContext; import com.java110.core.factory.GenerateCodeFactory; import com.java110.core.factory.WechatFactory; @@ -25,7 +26,6 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; import java.util.List; import java.util.Map; service-acct/src/main/java/com/java110/acct/payment/adapt/wechat/WechatPaymentFactoryAdapt.java
@@ -2,6 +2,7 @@ import com.alibaba.fastjson.JSONObject; import com.java110.acct.payment.IPaymentFactoryAdapt; import com.java110.core.client.RestTemplate; import com.java110.core.context.ICmdDataFlowContext; import com.java110.core.factory.GenerateCodeFactory; import com.java110.core.factory.WechatFactory; @@ -28,7 +29,6 @@ import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Service; import org.springframework.web.client.RestTemplate; import java.util.List; import java.util.Map;