准备编写清理函数
This commit is contained in:
parent
a4ccfaf9b8
commit
f77272ff29
@ -136,20 +136,18 @@
|
|||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<!-- <defaultGoal>compile</defaultGoal> -->
|
<defaultGoal>compile</defaultGoal>
|
||||||
<!-- lock down plugins versions to avoid using Maven defaults (may be moved to
|
|
||||||
parent pom) -->
|
|
||||||
<plugins>
|
<plugins>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-surefire-plugin</artifactId>
|
<artifactId>maven-surefire-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.5.2</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<skip>true</skip>
|
<skip>true</skip>
|
||||||
</configuration>
|
</configuration>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<artifactId>maven-compiler-plugin</artifactId>
|
<artifactId>maven-compiler-plugin</artifactId>
|
||||||
<version>3.13.0</version>
|
<version>3.14.0</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<compilerArguments>
|
<compilerArguments>
|
||||||
<extdirs>${project.basedir}/lib</extdirs>
|
<extdirs>${project.basedir}/lib</extdirs>
|
||||||
@ -159,7 +157,7 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-assembly-plugin</artifactId>
|
<artifactId>maven-assembly-plugin</artifactId>
|
||||||
<version>3.3.0</version>
|
<version>3.7.1</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<descriptorRefs>
|
<descriptorRefs>
|
||||||
<descriptorRef>jar-with-dependencies</descriptorRef>
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
||||||
@ -181,22 +179,22 @@
|
|||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.springframework.boot</groupId>
|
<groupId>org.springframework.boot</groupId>
|
||||||
<artifactId>spring-boot-maven-plugin</artifactId>
|
<artifactId>spring-boot-maven-plugin</artifactId>
|
||||||
<version>3.4.3</version>
|
<version>3.4.3</version>
|
||||||
<configuration>
|
<configuration>
|
||||||
<mainClass>com.cpic.xim.huixiabao.AppMain</mainClass>
|
<mainClass>com.cpic.xim.huixiabao.AppMain</mainClass>
|
||||||
<includeSystemScope>true</includeSystemScope>
|
<includeSystemScope>true</includeSystemScope>
|
||||||
</configuration>
|
</configuration>
|
||||||
<executions>
|
<executions>
|
||||||
<execution>
|
<execution>
|
||||||
<id>repackage</id>
|
<id>repackage</id>
|
||||||
<goals>
|
<goals>
|
||||||
<goal>repackage</goal>
|
<goal>repackage</goal>
|
||||||
</goals>
|
</goals>
|
||||||
</execution>
|
</execution>
|
||||||
</executions>
|
</executions>
|
||||||
</plugin>
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</build>
|
</build>
|
||||||
</project>
|
</project>
|
@ -112,7 +112,61 @@ public class CpicximToXMNHS
|
|||||||
|
|
||||||
public static void removePostedHmbXyxInfo( Vector<HmbXyxInfo> postedItems )
|
public static void removePostedHmbXyxInfo( Vector<HmbXyxInfo> postedItems )
|
||||||
{
|
{
|
||||||
|
Vector<HmbXyxInfo> items = new Vector<HmbXyxInfo>();
|
||||||
|
HmbXyxInfo item = null;
|
||||||
|
|
||||||
|
Connection connection = null;
|
||||||
|
Statement statement = null;
|
||||||
|
ResultSet result = null;
|
||||||
|
|
||||||
|
try
|
||||||
|
{
|
||||||
|
Class.forName( "com.mysql.cj.jdbc.Driver" );
|
||||||
|
|
||||||
|
String url = CpicximToXMNHS.url;
|
||||||
|
String userName = CpicximToXMNHS.userName;
|
||||||
|
String password = CpicximToXMNHS.password;
|
||||||
|
String sql = """
|
||||||
|
delete from HmbXyxInfo_Update where xyxNo = ?""";
|
||||||
|
|
||||||
|
connection = DriverManager.getConnection( url, userName, password );
|
||||||
|
statement = connection.prepareStatement(sql.trim());
|
||||||
|
|
||||||
|
for ( HmbXyxInfo info : postedItems)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
catch ( SQLException error )
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
connection.rollback();
|
||||||
|
}
|
||||||
|
catch ( SQLException e )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
error.printStackTrace();
|
||||||
|
}
|
||||||
|
catch ( ClassNotFoundException error )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
finally
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
|
||||||
|
statement.close();
|
||||||
|
connection.close();
|
||||||
|
}
|
||||||
|
catch ( SQLException error )
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void postHmbList( Vector<HmbXyxInfo> items )
|
public static void postHmbList( Vector<HmbXyxInfo> items )
|
||||||
|
Loading…
x
Reference in New Issue
Block a user