fix: 修改代码生成器问题
This commit is contained in:
parent
a8c2684fcc
commit
fb1edaddb3
|
@ -5,7 +5,6 @@
|
||||||
<groupId>cn.bunny</groupId>
|
<groupId>cn.bunny</groupId>
|
||||||
<artifactId>auth-server-java</artifactId>
|
<artifactId>auth-server-java</artifactId>
|
||||||
<version>0.0.1-SNAPSHOT</version>
|
<version>0.0.1-SNAPSHOT</version>
|
||||||
<relativePath>../../pom.xml</relativePath>
|
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>generator-code</artifactId>
|
<artifactId>generator-code</artifactId>
|
||||||
|
|
|
@ -17,7 +17,6 @@ import jakarta.validation.Valid;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.http.ResponseEntity;
|
import org.springframework.http.ResponseEntity;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import reactor.core.publisher.Mono;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
@ -40,9 +39,9 @@ public class I18nController {
|
||||||
|
|
||||||
@Operation(summary = "获取多语言内容", description = "获取多语言内容")
|
@Operation(summary = "获取多语言内容", description = "获取多语言内容")
|
||||||
@GetMapping("getI18n")
|
@GetMapping("getI18n")
|
||||||
public Mono<Result<Map<String, Object>>> getI18n() {
|
public Result<Map<String, Object>> getI18n() {
|
||||||
Map<String, Object> vo = i18nService.getI18n();
|
Map<String, Object> vo = i18nService.getI18n();
|
||||||
return Mono.just(Result.success(vo));
|
return Result.success(vo);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取管理多语言列", description = "获取管理多语言列")
|
@Operation(summary = "获取管理多语言列", description = "获取管理多语言列")
|
||||||
|
|
|
@ -155,7 +155,7 @@ public class I18nServiceImpl extends ServiceImpl<I18nMapper, I18n> implements I1
|
||||||
@Override
|
@Override
|
||||||
public ResponseEntity<byte[]> downloadI18n() {
|
public ResponseEntity<byte[]> downloadI18n() {
|
||||||
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
|
||||||
ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream);
|
try (ZipOutputStream zipOutputStream = new ZipOutputStream(byteArrayOutputStream)) {
|
||||||
|
|
||||||
// 查找默认语言内容
|
// 查找默认语言内容
|
||||||
List<I18n> i18nList = list();
|
List<I18n> i18nList = list();
|
||||||
|
@ -172,9 +172,6 @@ public class I18nServiceImpl extends ServiceImpl<I18nMapper, I18n> implements I1
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
try {
|
|
||||||
zipOutputStream.close();
|
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue