Browse Source

逸曜数据清洗

wzy 1 month ago
parent
commit
682c6c4562

+ 68 - 0
mjava-yiyao/pom.xml

@@ -0,0 +1,68 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.springframework.boot</groupId>
+        <artifactId>spring-boot-starter-parent</artifactId>
+        <version>2.2.0.RELEASE</version> <!-- 使用最新的稳定版或其他适用版本 -->
+        <relativePath/> <!-- lookup parent from repository -->
+    </parent>
+
+    <groupId>com.malk.yiyao</groupId>
+    <artifactId>mjava-yiyao</artifactId>
+
+    <properties>
+        <maven.compiler.source>8</maven.compiler.source>
+        <maven.compiler.target>8</maven.compiler.target>
+        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+    </properties>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-web</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter-test</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>junit</groupId>
+            <artifactId>junit</artifactId>
+            <scope>test</scope>
+        </dependency>
+        <dependency>
+            <groupId>com.malk</groupId>
+            <artifactId>base</artifactId>
+            <version>1.1-SNAPSHOT</version>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <finalName>boyang</finalName>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.maven.plugins</groupId>
+                <artifactId>maven-compiler-plugin</artifactId>
+                <version>3.1</version>
+                <configuration>
+                    <source>1.8</source>
+                    <target>1.8</target>
+                    <encoding>UTF-8</encoding>
+                </configuration>
+            </plugin>
+            <plugin>
+                <groupId>org.springframework.boot</groupId>
+                <artifactId>spring-boot-maven-plugin</artifactId>
+                <configuration>
+                    <executable>true</executable>
+                    <includeSystemScope>true</includeSystemScope>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+
+</project>

+ 17 - 0
mjava-yiyao/src/main/java/com/malk/yiyao/YiyaoApplication.java

@@ -0,0 +1,17 @@
+package com.malk.yiyao;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+import org.springframework.scheduling.annotation.EnableScheduling;
+
+@SpringBootApplication(scanBasePackages = {"com.malk"})
+@EnableScheduling
+public class YiyaoApplication {
+    public static void main(String[] args) {
+        try {
+            SpringApplication.run(YiyaoApplication.class,args);
+        }catch (Exception e){
+            e.printStackTrace();
+        }
+    }
+}

+ 20 - 0
mjava-yiyao/src/main/java/com/malk/yiyao/controller/YiyaoController.java

@@ -0,0 +1,20 @@
+package com.malk.yiyao.controller;
+
+import com.malk.server.common.McR;
+import com.malk.yiyao.service.YiyaoService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@RequestMapping
+public class YiyaoController {
+
+    @Autowired
+    private YiyaoService yiyaoService;
+
+    public McR updateYiyao1(){
+        return yiyaoService.updateYiyao1();
+    }
+
+}

+ 23 - 0
mjava-yiyao/src/main/java/com/malk/yiyao/service/YiyaoService.java

@@ -0,0 +1,23 @@
+package com.malk.yiyao.service;
+
+import com.malk.server.common.McR;
+
+public interface YiyaoService {
+    McR updateYiyao1();
+
+    McR updateYiyao2();
+
+    McR updateYiyao3();
+
+    McR updateYiyao4();
+
+    McR updateYiyao5();
+
+    McR updateYiyao6();
+
+    McR updateYiyao7();
+
+    McR updateYiyao8();
+
+    McR updateYiyao9();
+}

File diff suppressed because it is too large
+ 1491 - 0
mjava-yiyao/src/main/java/com/malk/yiyao/service/impl/YiyaoServiceImpl.java


+ 26 - 0
mjava-yiyao/src/main/resources/application-dev.yml

@@ -0,0 +1,26 @@
+server:
+  port: 9033
+  servlet:
+    context-path: /yiyao
+
+enable:
+  scheduling: false
+logging:
+  config: classpath:logback-spring.xml
+  path: /home/server/yiyao/log/
+  level:
+    com.malk.*: debug
+
+# dingtalk
+dingtalk:
+  agentId: 2691784047
+  appKey: dinghbynhnd2dbgypmsa
+  appSecret: Kl5Xw8x0TlEIlvcJuUkYZD18UTTShJmfdKrAIpY8oX-Q_tazyUKA28nQh7dG5-mq
+  corpId: dingcc1b1ffad0d5ca1d
+  aesKey:
+  token:
+
+aliwork:
+  appType: APP_HJJ3X3QN4WEWDHU2BJR2
+  systemToken: 7X866C81QPIHJKBFFM1QW4S8BV1U3U4MFO5RLY1
+

+ 27 - 0
mjava-yiyao/src/main/resources/application-prod.yml

@@ -0,0 +1,27 @@
+server:
+  port: 9033
+  servlet:
+    context-path: /yiyao
+
+enable:
+  scheduling: false
+logging:
+  config: classpath:logback-spring.xml
+  path: /home/server/yiyao/log/
+  level:
+    com.malk.*: info
+
+# dingtalk
+dingtalk:
+  agentId: 3749205961
+  appKey: dingdcxnvojhmwi1lau0
+  appSecret: K0dfunjkLVQKzEN6KXbjdUxcVAX5_hyc0rTNzrj4MugXKc-dkn0erpAxzhSeGPVC
+  corpId:
+  aesKey:
+  token:
+  operator: 344749020127590108
+
+aliwork:
+  appType: APP_TTZS5KICGVVQNZ3RS8T4
+  systemToken: DWF66OA1K1VTVWET83C0SD6RULBO31AQEYG8MQO
+

+ 15 - 0
mjava-yiyao/src/main/resources/application.yml

@@ -0,0 +1,15 @@
+spring:
+  profiles:
+    active: dev
+  servlet:
+    multipart:
+      max-file-size: 100MB
+      max-request-size: 100MB
+  http:
+    enabled: false
+
+#  configuration:
+#    log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
+  global-config:
+    db-config:
+      id-type: auto

+ 61 - 0
mjava-yiyao/src/main/resources/logback-spring.xml

@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<configuration debug="false" scan="false" scanPeriod="60 seconds">
+    <springProperty scope="context" name="LOG_HOME" source="logging.path" defaultValue="/home/server/log/"/>
+    <property name="FileNamePattern" value="${LOG_HOME}%d{yyyyMM}/%d{dd}"/>
+
+    <!-- 定义控制台输出 -->
+    <appender name="stdout" class="ch.qos.logback.core.ConsoleAppender">
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} - [%thread] - %-5level - %logger{50} - %msg%n</pattern>
+        </layout>
+    </appender>
+
+    <appender name="appLogAppender" class="ch.qos.logback.core.rolling.RollingFileAppender">
+        <!-- 指定日志文件的名称 -->
+        <!--<file>${FileNamePattern}/info.log</file>-->
+
+        <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+            <fileNamePattern>${FileNamePattern}/info-%i.log</fileNamePattern>
+            <MaxHistory>30</MaxHistory>
+            <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
+                <MaxFileSize>30MB</MaxFileSize>
+            </timeBasedFileNamingAndTriggeringPolicy>
+        </rollingPolicy>
+
+        <layout class="ch.qos.logback.classic.PatternLayout">
+            <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [ %thread ] - [ %-5level ] [ %logger{50} : %line ] - %msg%n</pattern>
+        </layout>
+    </appender>
+
+    <appender name="SIFT" class="ch.qos.logback.classic.sift.SiftingAppender">
+        <discriminator>
+            <Key>processid</Key>
+            <DefaultValue>sys</DefaultValue>
+        </discriminator>
+        <sift>
+            <appender name="FILE-${processid}"
+                      class="ch.qos.logback.core.rolling.RollingFileAppender">
+                <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
+                    <FileNamePattern>
+                        ${FileNamePattern}/${processid}.log
+                    </FileNamePattern>
+                </rollingPolicy>
+                <layout class="ch.qos.logback.classic.PatternLayout">
+                    <Pattern>
+                        %d{yyyyMMdd:HH:mm:ss.SSS} [%thread] %-5level %msg%n
+                    </Pattern>
+                </layout>
+            </appender>
+        </sift>
+    </appender>
+
+
+    <!-- 日志输出级别 -->
+    <logger name="org.springframework" level="debug"  additivity="false"/>
+    <logger name="com.malk.connecter" level="debug"/>
+    <root level="INFO">
+        <appender-ref ref="stdout"/>
+        <appender-ref ref="appLogAppender"/>
+        <appender-ref ref="SIFT"/>
+    </root>
+</configuration>

+ 64 - 0
mjava-yiyao/src/test/java/com/malk/yiyao/YiyaoTest.java

@@ -0,0 +1,64 @@
+package com.malk.yiyao;
+
+import com.malk.yiyao.service.YiyaoService;
+import lombok.extern.slf4j.Slf4j;
+import org.junit.Test;
+import org.junit.runner.RunWith;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.test.context.junit4.SpringRunner;
+
+@Slf4j
+@SpringBootTest
+@RunWith(SpringRunner.class)
+public class YiyaoTest {
+    @Autowired
+    private YiyaoService yiyaoService;
+
+
+    @Test
+    public void test() {
+        yiyaoService.updateYiyao1();
+    }
+
+    @Test
+    public void test2() {
+        yiyaoService.updateYiyao2();
+    }
+
+    @Test
+    public void test3() {
+        yiyaoService.updateYiyao3();
+    }
+
+    @Test
+    public void test4() {
+        yiyaoService.updateYiyao4();
+    }
+
+    @Test
+    public void test5() {
+        yiyaoService.updateYiyao5();
+    }
+
+    @Test
+    public void test6() {
+        yiyaoService.updateYiyao6();
+    }
+
+    @Test
+    public void test7() {
+        yiyaoService.updateYiyao7();
+    }
+
+    @Test
+    public void test8() {
+        yiyaoService.updateYiyao8();
+    }
+
+    @Test
+    public void test9() {
+        yiyaoService.updateYiyao9();
+    }
+
+}