Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
cym1102 committed Jun 6, 2022
1 parent a3769c9 commit 469bdae
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 12 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ Path : JDK安装目录\bin
2.下载最新版发行包jar

```
Linux: wget -O /home/svnWebUI/svnWebUI.jar http://file.nginxwebui.cn/svnWebUI-1.6.6.jar
Linux: wget -O /home/svnWebUI/svnWebUI.jar http://file.nginxwebui.cn/svnWebUI-1.6.7.jar
Windows: 直接使用浏览器下载 http://file.nginxwebui.cn/svnWebUI-1.6.6.jar
Windows: 直接使用浏览器下载 http://file.nginxwebui.cn/svnWebUI-1.6.7.jar
```

有新版本只需要修改路径中的版本即可
Expand Down
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.cym</groupId>
<artifactId>svnWebUI</artifactId>
<version>1.6.6</version>
<version>1.6.7</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand All @@ -13,7 +13,7 @@
<parent>
<groupId>org.noear</groupId>
<artifactId>solon-parent</artifactId>
<version>1.7.6</version>
<version>1.8.1</version>
</parent>

<dependencies>
Expand Down Expand Up @@ -47,7 +47,7 @@
<dependency>
<groupId>cn.hutool</groupId>
<artifactId>hutool-all</artifactId>
<version>5.7.22</version>
<version>5.8.0</version>
</dependency>
<dependency>
<groupId>org.noear</groupId>
Expand Down
3 changes: 3 additions & 0 deletions src/main/java/com/cym/config/InitConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,9 @@ public void init() {
// 预热定时任务
scheduleTask.hookTasks();

// 刷新配置文件
configService.refresh();

// 展示logo
showLogo();

Expand Down
3 changes: 0 additions & 3 deletions src/main/java/com/cym/controller/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -87,17 +87,14 @@ public JsonResult importOver(String dirTemp) {
if (line.contains("=")) {
String name = line.split("=")[0].trim();
String pass = line.split("=")[1].trim();

userService.importUser(name, pass);
}

if (line.contains(":$apr1")) {
String name = line.split(":")[0].trim();
String pass = "123456";

userService.importUser(name, pass);
}

}

FileUtil.del(dirTemp);
Expand Down
11 changes: 7 additions & 4 deletions src/main/java/com/cym/service/UserService.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
package com.cym.service;

import java.util.List;

import org.noear.solon.annotation.Inject;
import org.noear.solon.extend.aspect.annotation.Service;

Expand All @@ -12,6 +10,7 @@
import com.cym.sqlhelper.utils.ConditionAndWrapper;
import com.cym.sqlhelper.utils.ConditionOrWrapper;
import com.cym.sqlhelper.utils.SqlHelper;
import com.cym.utils.SvnAdminUtils;

import cn.hutool.core.util.StrUtil;

Expand All @@ -21,7 +20,9 @@ public class UserService {
SqlHelper sqlHelper;
// 加密盐值
String solt = "specalEncode";

@Inject
SvnAdminUtils svnAdminUtils;

public User login(String name, String pass) {
ConditionAndWrapper conditionAndWrapper = new ConditionAndWrapper().eq(User::getName, name).eq(User::getPass, pass);

Expand Down Expand Up @@ -56,6 +57,9 @@ public User getByName(String name, String userId) {
}

public void importUser(String name, String pass) {
if (name.equals(svnAdminUtils.adminUserName)) {
return;
}
Long count = sqlHelper.findCountByQuery(new ConditionAndWrapper().eq(User::getName, name), User.class);
if (count == 0) {
User user = new User();
Expand All @@ -68,5 +72,4 @@ public void importUser(String name, String pass) {

}


}

0 comments on commit 469bdae

Please sign in to comment.