mac 2 лет назад
Родитель
Сommit
dc9c0c6613

+ 31 - 29
kxs-common/kxs-common-core/src/main/resources/logback-spring.xml

@@ -72,6 +72,30 @@
 	<logger name="org.apache.http.impl.conn.Wire" level="WARN" />
 	<logger name="org.apache.http.impl.conn.Wire" level="WARN" />
 
 
 	<!-- 引入sls日志 -->
 	<!-- 引入sls日志 -->
+	<springProfile name="dev">
+		<root level="INFO">
+			<appender-ref ref="console"/>
+			<appender-ref ref="aliyun" />
+		</root>
+	</springProfile>
+
+	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
+
+	<springProfile name="test">
+		<root level="INFO">
+			<appender-ref ref="console"/>
+			<appender-ref ref="debug"/>
+			<appender-ref ref="error"/>
+		</root>
+	</springProfile>
+	<springProfile name="prod">
+		<root level="INFO">
+			<appender-ref ref="console"/>
+			<appender-ref ref="debug"/>
+			<appender-ref ref="error"/>
+			<appender-ref ref="aliyun" />
+		</root>
+	</springProfile>
 	<appender name="aliyun" class="com.aliyun.openservices.log.logback.LoghubAppender">
 	<appender name="aliyun" class="com.aliyun.openservices.log.logback.LoghubAppender">
 		<!-- Configure account and network  -->
 		<!-- Configure account and network  -->
 		<endpoint>cn-chengdu.log.aliyuncs.com</endpoint>
 		<endpoint>cn-chengdu.log.aliyuncs.com</endpoint>
@@ -84,14 +108,12 @@
 		<logStore>kxs-store</logStore>
 		<logStore>kxs-store</logStore>
 
 
 		<!-- Optional parameters -->
 		<!-- Optional parameters -->
-<!--		#单个 producer 实例能缓存的日志大小上限,默认为 100MB。-->
-		<!-- 可选项 -->
-		<springName name="kxs-gateway">
-			<topic>kxs-gateway</topic>
-		</springName>
+		<!-- 主题名称 -->
+		<topic>${spring.application.name}</topic>
+		<!--		#单个 producer 实例能缓存的日志大小上限,默认为 100MB。-->
 		<totalSizeInBytes>104857600</totalSizeInBytes>
 		<totalSizeInBytes>104857600</totalSizeInBytes>
 		<maxBlockMs>0</maxBlockMs>
 		<maxBlockMs>0</maxBlockMs>
-<!--		执行日志发送任务的线程池大小,默认为可用处理器个数。-->
+		<!--		执行日志发送任务的线程池大小,默认为可用处理器个数。-->
 		<ioThreadCount>8</ioThreadCount>
 		<ioThreadCount>8</ioThreadCount>
 		<batchSizeThresholdInBytes>524288</batchSizeThresholdInBytes>
 		<batchSizeThresholdInBytes>524288</batchSizeThresholdInBytes>
 		<batchCountThreshold>4096</batchCountThreshold>
 		<batchCountThreshold>4096</batchCountThreshold>
@@ -116,29 +138,9 @@
 			<level>ERROR</level>
 			<level>ERROR</level>
 			<level>INFO</level>
 			<level>INFO</level>
 		</filter>
 		</filter>
-	</appender>
 
 
-	<!-- Level: FATAL 0  ERROR 3  WARN 4  INFO 6  DEBUG 7 -->
+		<!-- 屏蔽transfer模块 -->
+		<logger name="com.kxs.transfer.api" level="OFF"/>
 
 
-	<springProfile name="dev">
-		<root level="INFO">
-			<appender-ref ref="console"/>
-			<appender-ref ref="aliyun" />
-		</root>
-	</springProfile>
-	<springProfile name="test">
-		<root level="INFO">
-			<appender-ref ref="console"/>
-			<appender-ref ref="debug"/>
-			<appender-ref ref="error"/>
-		</root>
-	</springProfile>
-	<springProfile name="prod">
-		<root level="INFO">
-			<appender-ref ref="console"/>
-			<appender-ref ref="debug"/>
-			<appender-ref ref="error"/>
-			<appender-ref ref="aliyun" />
-		</root>
-	</springProfile>
+	</appender>
 </configuration>
 </configuration>

+ 5 - 5
kxs-gateway/src/main/java/com/kxs/gateway/api/filter/RequestDecoderFilter.java

@@ -109,9 +109,9 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
 		Flux<DataBuffer> modifiedBody = serverRequest.bodyToFlux(String.class).flatMap(body -> {
 		Flux<DataBuffer> modifiedBody = serverRequest.bodyToFlux(String.class).flatMap(body -> {
 			// 解密请求体
 			// 解密请求体
 			try {
 			try {
-				log.info("待解密请求参数:{}", body);
+//				log.info("待解密请求参数:{}", body);
 				String decryptStr = cryptoAes.decryptStr(body);
 				String decryptStr = cryptoAes.decryptStr(body);
-				log.info("解密后参数:{}", decryptStr);
+//				log.info("解密后参数:{}", decryptStr);
 
 
 				DataBufferFactory dataBufferFactory = exchange.getResponse().bufferFactory();
 				DataBufferFactory dataBufferFactory = exchange.getResponse().bufferFactory();
 				DataBuffer bodyDataBuffer = dataBufferFactory.wrap(decryptStr.getBytes());
 				DataBuffer bodyDataBuffer = dataBufferFactory.wrap(decryptStr.getBytes());
@@ -165,9 +165,9 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
 			if(CharSequenceUtil.isEmpty(decryptedParam)){
 			if(CharSequenceUtil.isEmpty(decryptedParam)){
 				return chain.filter(exchange);
 				return chain.filter(exchange);
 			}
 			}
-			log.info("GET:{},请求待解密数据 :{}", exchange.getRequest().getURI(),decryptedParam);
+//			log.info("GET:{},请求待解密数据 :{}", exchange.getRequest().getURI(),decryptedParam);
 			String decryptStr = cryptoAes.decryptStr(decryptedParam);
 			String decryptStr = cryptoAes.decryptStr(decryptedParam);
-			log.info("GET解密后数据 :{}", decryptStr);
+//			log.info("GET解密后数据 :{}", decryptStr);
 
 
 			JSONObject decryptJson = JSON.parseObject(decryptStr);
 			JSONObject decryptJson = JSON.parseObject(decryptStr);
 			//构建新的请求参数webflux
 			//构建新的请求参数webflux
@@ -188,7 +188,7 @@ public class RequestDecoderFilter extends AbstractGatewayFilterFactory<Object> {
 					parameters.add(key, URLEncoder.encode(String.valueOf(value), StandardCharsets.UTF_8));
 					parameters.add(key, URLEncoder.encode(String.valueOf(value), StandardCharsets.UTF_8));
 				}
 				}
 			});
 			});
-			log.info("GET解密后数据 :{}", parameters);
+//			log.info("GET解密后数据 :{}", parameters);
 			// 构建修改后的URI
 			// 构建修改后的URI
 			URI modifiedUri = UriComponentsBuilder.fromUri(exchange.getRequest().getURI())
 			URI modifiedUri = UriComponentsBuilder.fromUri(exchange.getRequest().getURI())
 					.replaceQueryParams(parameters)
 					.replaceQueryParams(parameters)

+ 0 - 27
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/config/KxsOldConfigProperties.java

@@ -1,27 +0,0 @@
-package com.kxs.product.biz.config;
-
-import lombok.Data;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-
-import java.util.List;
-
-
-/**
- * 关于老平台的配置文件
- *
- * @author 没秃顶的码农
- * @date 2024-03-15
- */
-@Data
-@RefreshScope
-@ConfigurationProperties("kxs.old")
-public class KxsOldConfigProperties {
-
-
-	/**
-	 * 是否开启循环过期扣款
-	 */
-	private Boolean recycleEnable;
-
-}

+ 0 - 26
kxs-product/kxs-product-biz/src/main/java/com/kxs/product/biz/task/KxsProductTask.java

@@ -1,40 +1,14 @@
 package com.kxs.product.biz.task;
 package com.kxs.product.biz.task;
 
 
-import cn.hutool.crypto.symmetric.AES;
-import com.alibaba.fastjson.JSON;
-import com.alibaba.nacos.api.config.annotation.NacosValue;
-import com.kxs.common.core.util.R;
 import com.kxs.common.security.annotation.Inner;
 import com.kxs.common.security.annotation.Inner;
-import com.kxs.product.api.model.KxsMachine;
-import com.kxs.product.api.model.KxsMachineDeduct;
-import com.kxs.product.biz.config.KxsOldConfigProperties;
-import com.kxs.product.biz.mapper.KxsMachineDeductMapper;
-import com.kxs.product.biz.mapper.KxsMachineMapper;
 import com.kxs.product.biz.service.KxsMachineService;
 import com.kxs.product.biz.service.KxsMachineService;
-import com.kxs.system.api.feign.RemoteOldService;
 import lombok.RequiredArgsConstructor;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import lombok.extern.slf4j.Slf4j;
-import org.springframework.beans.factory.annotation.Value;
-import org.springframework.boot.context.properties.ConfigurationProperties;
-import org.springframework.boot.context.properties.EnableConfigurationProperties;
-import org.springframework.cloud.context.config.annotation.RefreshScope;
-import org.springframework.context.annotation.Configuration;
-import org.springframework.data.redis.core.RedisTemplate;
-import org.springframework.scheduling.annotation.Async;
-import org.springframework.scheduling.annotation.EnableAsync;
-import org.springframework.scheduling.annotation.EnableScheduling;
-import org.springframework.scheduling.annotation.Scheduled;
-import org.springframework.stereotype.Component;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.bind.annotation.RestController;
 
 
-import java.time.LocalDate;
-import java.time.LocalDateTime;
-import java.util.HashMap;
-import java.util.List;
-
 /**
 /**
  * 产品模块定时任务
  * 产品模块定时任务
  *
  *