Skip to content

Commit

Permalink
fix some package errors
Browse files Browse the repository at this point in the history
  • Loading branch information
blackstar-baba committed Dec 21, 2020
1 parent 6bad012 commit 54e8cdc
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 8 deletions.
1 change: 0 additions & 1 deletion application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,6 @@
</dependency>
</dependencies>
<build>
<finalName>${pkg.name}-${project.version}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down
6 changes: 5 additions & 1 deletion application/src/bin/restart.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
#!/bin/sh

# project name
APPLICATION="@project.artifactId@"
APPLICATION="@pkg.name@"

# java file name
APPLICATION_JAR="@[email protected]"

# bin directory absolute path
cd `dirname $0`
cd ..

# stop app
echo stop ${APPLICATION} Application...
sh shutdown.sh
Expand Down
2 changes: 1 addition & 1 deletion application/src/bin/shutdown.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# project name
APPLICATION="@project.artifactId@"
APPLICATION="@pkg.name@"

# jar file name
APPLICATION_JAR="@[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion application/src/bin/startup.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh

# project name
APPLICATION="@project.artifactId@"
APPLICATION="@pkg.name@"

# java file name
APPLICATION_JAR="@[email protected]"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ public class AppSourceServiceImpl extends ServiceImpl<AppSourceMapper, AppSource

private int ignoreDepth = 1;

private static final String APP_SOURCE_ID = "00000000-0000-0000-0000-000000000000";

@Autowired
private RestTemplate restTemplate;

Expand Down Expand Up @@ -117,9 +119,11 @@ public boolean load(MultipartFile file) {
@Transactional
public boolean loadToDb(){
try {
AppSource appSource = list().get(0);
appSource.setStatus(DbConst.APP_SOURCE_RELOAD);
appSourceService.updateById(appSource);
AppSource appSource = getById(APP_SOURCE_ID);
if(appSource != null) {
appSource.setStatus(DbConst.APP_SOURCE_RELOAD);
appSourceService.updateById(appSource);
}
LocalDateTime now = LocalDateTime.now();
File appsFile = new File(appsDir);
String[] fileNames = appsFile.list();
Expand Down Expand Up @@ -168,7 +172,7 @@ public boolean loadToDb(){

}
appSourceService.saveOrUpdate(AppSource.builder()
.id("00000000-0000-0000-0000-000000000000")
.id(APP_SOURCE_ID)
//set true version
.version(new String(versionContext, StandardCharsets.UTF_8))
.repository(null)
Expand Down

0 comments on commit 54e8cdc

Please sign in to comment.