Skip to content

Commit

Permalink
chore(release): 2024.3.11 (#868)
Browse files Browse the repository at this point in the history
  • Loading branch information
qianmoQ authored Nov 17, 2024
2 parents 71a77e7 + caa1bbf commit fe09727
Show file tree
Hide file tree
Showing 113 changed files with 3,393 additions and 189 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/bofore_checker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
uses: actions/setup-node@v3
with:
node-version: 18.x
- run: cd core/datacap-ui && npm install yarn -g && yarn install && yarn run build
- run: cd core/datacap-ui && npm install pnpm -g && pnpm install && pnpm run build

before_checker_style:
runs-on: ubuntu-latest
Expand All @@ -40,7 +40,7 @@ jobs:
java-version: '11'
distribution: 'temurin'
- run: chmod 755 ./mvnw
- run: ./mvnw clean install checkstyle:checkstyle -Dspotbugs.skip -Dgpg.skip -Dskip.yarn -DskipTests=true
- run: ./mvnw clean install checkstyle:checkstyle -Dspotbugs.skip -Dgpg.skip -Dskip.pnpm -DskipTests=true

before_checker_bugs:
runs-on: ubuntu-latest
Expand All @@ -57,9 +57,9 @@ jobs:
- name: Run SpotBugs skip server
env:
MAVEN_OPTS: -Xmx1024m
run: ./mvnw clean install spotbugs:spotbugs -pl '!core/datacap-server' -Dcheckstyle.skip -Dgpg.skip -Dskip.yarn -DskipTests=true
run: ./mvnw clean install spotbugs:spotbugs -pl '!core/datacap-server' -Dcheckstyle.skip -Dgpg.skip -Dskip.pnpm -DskipTests=true
- name: Run SpotBugs for server
run: ./mvnw clean install spotbugs:spotbugs -Dcheckstyle.skip -Dgpg.skip -Dskip.yarn -DskipTests=true -f core/datacap-server/pom.xml
run: ./mvnw clean install spotbugs:spotbugs -Dcheckstyle.skip -Dgpg.skip -Dskip.pnpm -DskipTests=true -f core/datacap-server/pom.xml

before_checker_package:
runs-on: ubuntu-latest
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ target/
node/
node_modules
tmp/
.npm

# vscode #
.vscode
Expand All @@ -52,7 +53,6 @@ config/
docs/site/
data/
!parser/datacap-parser-trino/src/main/java/io/edurt/datacap/parser/node/
pnpm-lock.yaml
depcheck-output.json

!configure/schema/*/data/
Expand All @@ -71,3 +71,4 @@ convert/datacap-convert-xml/*.xml

# Skip ui #
core/datacap-ui/depcheck-output.json
core/datacap-ui/yarn.lock
2 changes: 1 addition & 1 deletion client/datacap-cli/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion configure/etc/bin/install-plugin.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/sh0

HOME=$(pwd)
VERSION=2024.3.11-SNAPSHOT
VERSION=2024.3.11

common_install_handler() {
TYPE=$1
Expand Down
2 changes: 1 addition & 1 deletion configure/etc/conf/application.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
################################### Banner configure #################################
app.version=2024.3.11-SNAPSHOT
app.version=2024.3.11

################################### Basic configure #################################
server.port=9096
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-csv/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-json/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-none/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-txt/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion convert/datacap-convert-xml/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-captcha/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import io.edurt.datacap.captcha.entity.CaptchaEntity;
import io.edurt.datacap.captcha.entity.ResultEntity;
import io.edurt.datacap.captcha.enums.CalculateEnum;
import io.edurt.datacap.captcha.enums.NumberEnum;

import java.awt.Color;
import java.util.Random;
Expand Down Expand Up @@ -86,34 +85,12 @@ public static ResultEntity generateCalculateImage()
{
CaptchaEntity entity = generateCalcNumber();
int calc = entity.getCalc();
int number = entity.getNumber();
int firstNumber = entity.getFirstNumber();
int lastNumber = entity.getLastNumber();
String _calc = null;
String _firstNumber = null;
String _lastNumber = null;
String equals = null;
// display 0 Arabic numerals
if (number == 0) {
_firstNumber = String.valueOf(firstNumber);
_lastNumber = String.valueOf(lastNumber);
_calc = getCalculateEn(calc, calc);
equals = CalculateEnum.EQUAL.getValueEn();
}
// Display 1 Chinese uppercase character
if (number == 1) {
for (NumberEnum numberEnum : NumberEnum.values()) {
if (numberEnum.getValueEn().equals(String.valueOf(firstNumber))) {
_firstNumber = numberEnum.getValueZh();
}
if (numberEnum.getValueEn().equals(String.valueOf(lastNumber))) {
_lastNumber = numberEnum.getValueZh();
}
}
_calc = getCalculateZh(calc, number);
equals = CalculateEnum.EQUAL.getValueZh();
}
String[] result = new String[] {_firstNumber, _calc, _lastNumber, equals, "?"};
String _firstNumber = String.valueOf(firstNumber);
String _lastNumber = String.valueOf(lastNumber);
String _calc = getCalculateEn(calc, calc);
String[] result = new String[] {_firstNumber, _calc, _lastNumber, CalculateEnum.EQUAL.getValueEn(), "?"};
ResultEntity resultEntity = new ResultEntity();
resultEntity.setExpression(result);
resultEntity.setResult(generateCalculateResult(entity));
Expand Down Expand Up @@ -160,7 +137,7 @@ private static Integer generateCalculateResult(CaptchaEntity entity)
*/
private static String getCalculateEn(int calc, int number)
{
String result = null; // Calculation method: 0 addition, 1 subtraction, 2 multiplication, 3 division, 4 equal
String result; // Calculation method: 0 addition, 1 subtraction, 2 multiplication, 3 division, 4 equal
switch (calc) {
case 0:
result = CalculateEnum.ADD.getValueEn();
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/datacap-parser/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
2 changes: 1 addition & 1 deletion core/datacap-security/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
20 changes: 10 additions & 10 deletions core/datacap-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datacap</artifactId>
<groupId>io.edurt.datacap</groupId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand All @@ -18,7 +18,7 @@
<findbugs.version>3.0.1</findbugs.version>
<frontend-maven-plugin.version>1.15.0</frontend-maven-plugin.version>
<node.version>v18.18.2</node.version>
<yarn.version>v1.22.11</yarn.version>
<pnpm.version>9.13.2</pnpm.version>
</properties>

<dependencies>
Expand Down Expand Up @@ -562,29 +562,29 @@
<installDirectory>../datacap-ui/</installDirectory>
<workingDirectory>../datacap-ui/</workingDirectory>
<nodeVersion>${node.version}</nodeVersion>
<yarnVersion>${yarn.version}</yarnVersion>
<pnpmVersion>${pnpm.version}</pnpmVersion>
</configuration>
<executions>
<execution>
<id>install node and yarn</id>
<id>install node and pnpm</id>
<goals>
<goal>install-node-and-yarn</goal>
<goal>install-node-and-pnpm</goal>
</goals>
</execution>
<execution>
<id>yarn install</id>
<id>pnpm install</id>
<goals>
<goal>yarn</goal>
<goal>pnpm</goal>
</goals>
<phase>generate-resources</phase>
<configuration>
<arguments>--legacy-peer-deps install</arguments>
<arguments>install</arguments>
</configuration>
</execution>
<execution>
<id>yarn run build</id>
<id>pnpm run build</id>
<goals>
<goal>yarn</goal>
<goal>pnpm</goal>
</goals>
<configuration>
<arguments>run build</arguments>
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-service/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
package io.edurt.datacap.service.entity;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonIncludeProperties;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import io.edurt.datacap.service.enums.ReportType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ public class TreeRecord
private Boolean checked = false;
private Boolean selected = false;
private String description;
private Long parent;

public static TreeRecord of(MenuEntity entity, boolean checked, boolean selected, List<TreeRecord> children)
{
Expand All @@ -46,6 +47,7 @@ public static TreeRecord of(MenuEntity entity, boolean checked, boolean selected
.checked(checked)
.selected(selected)
.children(children)
.parent(entity.getParent())
.build();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import io.edurt.datacap.service.repository.RoleRepository;
import io.edurt.datacap.service.repository.SourceRepository;
import io.edurt.datacap.service.repository.UserRepository;
import io.edurt.datacap.service.repository.admin.MenuRepository;
import io.edurt.datacap.service.security.UserDetailsService;
import io.edurt.datacap.service.service.JwtService;
import io.edurt.datacap.service.service.UserService;
Expand Down Expand Up @@ -72,6 +73,7 @@ public class UserServiceImpl
private final UserRepository userRepository;
private final RoleRepository roleRepository;
private final SourceRepository sourceRepository;
private final MenuRepository menuRepository;
private final PasswordEncoder encoder;
private final AuthenticationManager authenticationManager;
private final JwtService jwtService;
Expand All @@ -80,11 +82,12 @@ public class UserServiceImpl
private final InitializerConfigure initializerConfigure;
private final Injector injector;

public UserServiceImpl(UserRepository userRepository, RoleRepository roleRepository, SourceRepository sourceRepository, PasswordEncoder encoder, AuthenticationManager authenticationManager, JwtService jwtService, RedisTemplate redisTemplate, Environment environment, InitializerConfigure initializerConfigure, Injector injector)
public UserServiceImpl(UserRepository userRepository, RoleRepository roleRepository, SourceRepository sourceRepository, MenuRepository menuRepository, PasswordEncoder encoder, AuthenticationManager authenticationManager, JwtService jwtService, RedisTemplate redisTemplate, Environment environment, InitializerConfigure initializerConfigure, Injector injector)
{
this.userRepository = userRepository;
this.roleRepository = roleRepository;
this.sourceRepository = sourceRepository;
this.menuRepository = menuRepository;
this.encoder = encoder;
this.authenticationManager = authenticationManager;
this.jwtService = jwtService;
Expand Down Expand Up @@ -258,6 +261,18 @@ public CommonResponse<List<TreeRecord>> getMenus()
temp.setChildren(childrens);
treeMap.put(temp.getId(), temp);
}
else {
// Handle cases where no parent menu is selected, only child menus are selected
menuRepository.findById(menu.getParent())
.ifPresent(v -> {
TreeRecord parent = TreeRecord.of(v, true, true, Lists.newArrayList());
parent.setNew(v.isNew());
List<TreeRecord> children = Lists.newArrayList();
children.add(TreeRecord.of(menu, true, true, Lists.newArrayList()));
parent.setChildren(children);
treeMap.put(v.getId(), parent);
});
}
}
});
treeMap.keySet().forEach(v -> tree.add(treeMap.get(v)));
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-spi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<parent>
<artifactId>datacap</artifactId>
<groupId>io.edurt.datacap</groupId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
Expand Down
2 changes: 1 addition & 1 deletion core/datacap-sql/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<parent>
<groupId>io.edurt.datacap</groupId>
<artifactId>datacap</artifactId>
<version>2024.3.11-SNAPSHOT</version>
<version>2024.3.11</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
6 changes: 3 additions & 3 deletions core/datacap-ui/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "datacap-ui",
"description": "DataCap console",
"version": "2024.3.11-SNAPSHOT",
"version": "2024.3.11",
"private": true,
"scripts": {
"dev": "vite",
"build": "vue-tsc && vite build",
"build": "vue-tsc --skipLibCheck && vite build",
"preview": "vite preview"
},
"dependencies": {
Expand Down Expand Up @@ -46,7 +46,7 @@
"@types/nprogress": "^0.2.3",
"@vitejs/plugin-vue": "^5.0.4",
"tippy.js": "^6.3.7",
"typescript": "5.2.2",
"typescript": "^5.2.2",
"vite": "^5.4.8",
"vue-tsc": "^1.8.27"
}
Expand Down
Loading

0 comments on commit fe09727

Please sign in to comment.