Skip to content

Commit

Permalink
4.1.8
Browse files Browse the repository at this point in the history
  • Loading branch information
cym1102 committed Jun 21, 2024
1 parent 7ca0ac5 commit 4720c65
Show file tree
Hide file tree
Showing 6 changed files with 22 additions and 17 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ Path : JDK安装目录\bin

```
Linux: mkdir /home/nginxWebUI/
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.6/nginxWebUI-4.1.6.jar
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.8/nginxWebUI-4.1.8.jar
Windows: 直接使用浏览器下载 https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.6/nginxWebUI-4.1.6.jar 到 D:/home/nginxWebUI/nginxWebUI.jar
Windows: 直接使用浏览器下载 https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.8/nginxWebUI-4.1.8.jar 到 D:/home/nginxWebUI/nginxWebUI.jar
```

有新版本只需要修改路径中的版本即可
Expand Down Expand Up @@ -188,8 +188,8 @@ services:
target: "/home/nginxWebUI"
environment:
BOOT_OPTIONS: "--server.port=8080"
privileged: true
network_mode: "host"
restart: always
或者
Expand All @@ -203,8 +203,8 @@ services:
target: "/home/nginxWebUI"
environment:
BOOT_OPTIONS: "--server.port=8080"
privileged: true
network_mode: "host"
restart: always
```


Expand Down
8 changes: 4 additions & 4 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,9 +80,9 @@ reboot

```
Linux: mkdir /home/nginxWebUI/
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.6/nginxWebUI-4.1.6.jar
wget -O /home/nginxWebUI/nginxWebUI.jar https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.8/nginxWebUI-4.1.8.jar
Windows: Download directly from your browser https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.6/nginxWebUI-4.1.6.jar into D:/home/nginxWebUI/
Windows: Download directly from your browser https://gitee.com/cym1102/nginxWebUI/releases/download/4.1.8/nginxWebUI-4.1.8.jar into D:/home/nginxWebUI/
```

With a new version, you just need to change the version in the path
Expand Down Expand Up @@ -184,8 +184,8 @@ services:
target: "/home/nginxWebUI"
environment:
BOOT_OPTIONS: "--server.port=8080"
privileged: true
network_mode: "host"
restart: always
or
Expand All @@ -199,8 +199,8 @@ services:
target: "/home/nginxWebUI"
environment:
BOOT_OPTIONS: "--server.port=8080"
privileged: true
network_mode: "host"
restart: always
```


Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>com.cym</groupId>
<artifactId>nginxWebUI</artifactId>
<version>4.1.6</version>
<version>4.1.8</version>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
Expand Down
7 changes: 6 additions & 1 deletion src/main/java/com/cym/config/InitConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
import com.cym.sqlhelper.config.DataSourceEmbed;
import com.cym.sqlhelper.config.Table;
import com.cym.sqlhelper.utils.ConditionAndWrapper;
import com.cym.sqlhelper.utils.JdbcTemplate;
import com.cym.sqlhelper.utils.SqlHelper;
import com.cym.utils.EncodePassUtils;
import com.cym.utils.MessageUtils;
Expand Down Expand Up @@ -61,6 +62,8 @@ public class InitConfig {
@Inject
SqlHelper sqlHelper;
@Inject
JdbcTemplate jdbcTemplate;
@Inject
ConfService confService;
@Inject
DataSourceEmbed dataSourceEmbed;
Expand Down Expand Up @@ -237,7 +240,9 @@ private Map<String, List<?>> readAll() {
Table table = clazz.getAnnotation(Table.class);
if (table != null) {
try {
map.put(clazz.getName(), sqlHelper.findAll(clazz));
List<Map<String, Object>> list = jdbcTemplate.queryForList("SELECT * FROM `" + StrUtil.toUnderlineCase(clazz.getSimpleName()) + "`");

map.put(clazz.getName(), sqlHelper.buildObjects(list, clazz));
} catch (Exception e) {
logger.info(e.getMessage(), e);
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/cym/sqlhelper/bean/Sort.java
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public String toString() {

String sql = StrUtil.toUnderlineCase(order.getColumn());
if (order.getColumn().equalsIgnoreCase("seq") || order.getColumn().equalsIgnoreCase("id")) {
sql = "CAST(" + StrUtil.toUnderlineCase(order.getColumn()) + " as UNSIGNED)";
sql = "CAST(" + StrUtil.toUnderlineCase(order.getColumn()) + " as SIGNED)";
}

if (order.getDirection() == Direction.ASC) {
Expand Down
12 changes: 6 additions & 6 deletions src/main/java/com/cym/sqlhelper/utils/SqlHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -423,7 +423,7 @@ public Page findPage(ConditionWrapper conditionWrapper, Sort sort, Page page, Cl
if (sort != null) {
sql += " " + sort.toString();
} else {
sql += " ORDER BY CAST(id AS UNSIGNED) DESC";
sql += " ORDER BY CAST(id AS SIGNED) DESC";
}
sql += " LIMIT " + (page.getCurr() - 1) * page.getLimit() + "," + page.getLimit();

Expand Down Expand Up @@ -502,9 +502,9 @@ public <T> T findOneByQuery(ConditionWrapper conditionWrapper, Sort sort, Class<
sql += " WHERE " + conditionWrapper.build(values);
}
if (sort != null) {
sql += " " + sort;
sql += " " + sort.toString();
} else {
sql += " ORDER BY CAST(id AS UNSIGNED) DESC";
sql += " ORDER BY CAST(id AS SIGNED) DESC";
}
sql += " limit 1";

Expand Down Expand Up @@ -553,9 +553,9 @@ public <T> List<T> findListByQuery(ConditionWrapper conditionWrapper, Sort sort,
sql += " WHERE " + conditionWrapper.build(values);
}
if (sort != null) {
sql += " " + sort;
sql += " " + sort.toString();
} else {
sql += " ORDER BY CAST(id AS UNSIGNED) DESC";
sql += " ORDER BY CAST(id AS SIGNED) DESC";
}

logQuery(formatSql(sql), values.toArray());
Expand Down Expand Up @@ -853,7 +853,7 @@ private <T> List<T> extractProperty(List<?> list, String property, Class<T> claz
* @param clazz
* @return
*/
private <T> List<T> buildObjects(List<Map<String, Object>> queryForList, Class<T> clazz) {
public <T> List<T> buildObjects(List<Map<String, Object>> queryForList, Class<T> clazz) {
List<T> list = new ArrayList<T>();
try {

Expand Down

0 comments on commit 4720c65

Please sign in to comment.