refactor(系统设置): 新增plugin配置,认证信息返回状态字段
This commit is contained in:
parent
63dfd42ffe
commit
605addfca2
|
@ -30,6 +30,27 @@
|
||||||
|
|
||||||
<build>
|
<build>
|
||||||
<plugins>
|
<plugins>
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
|
<artifactId>maven-antrun-plugin</artifactId>
|
||||||
|
<executions>
|
||||||
|
<execution>
|
||||||
|
<id>main-class-placement</id>
|
||||||
|
<phase>generate-resources</phase>
|
||||||
|
<configuration>
|
||||||
|
<skip>${skipAntRunForJenkins}</skip>
|
||||||
|
<target>
|
||||||
|
<copy todir="target/test-classes/static">
|
||||||
|
<fileset dir="../../../frontend/dist"/>
|
||||||
|
</copy>
|
||||||
|
</target>
|
||||||
|
</configuration>
|
||||||
|
<goals>
|
||||||
|
<goal>run</goal>
|
||||||
|
</goals>
|
||||||
|
</execution>
|
||||||
|
</executions>
|
||||||
|
</plugin>
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.mybatis.generator</groupId>
|
<groupId>org.mybatis.generator</groupId>
|
||||||
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
<artifactId>mybatis-generator-maven-plugin</artifactId>
|
||||||
|
|
|
@ -17,31 +17,31 @@ import java.io.IOException;
|
||||||
public class BaseDisplayController {
|
public class BaseDisplayController {
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private BaseDisplayService displayService;
|
private BaseDisplayService baseDisplayService;
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "获取icon图片")
|
@Operation(summary = "获取icon图片")
|
||||||
@GetMapping("/get/icon")
|
@GetMapping("/get/icon")
|
||||||
public ResponseEntity<byte[]> getIcon() throws IOException {
|
public ResponseEntity<byte[]> getIcon() throws IOException {
|
||||||
return displayService.getFile("icon");
|
return baseDisplayService.getFile("icon");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@Operation(summary = "获取loginImage图片")
|
@Operation(summary = "获取loginImage图片")
|
||||||
@GetMapping("/get/login-image")
|
@GetMapping("/get/login-image")
|
||||||
public ResponseEntity<byte[]> getLoginImage() throws IOException {
|
public ResponseEntity<byte[]> getLoginImage() throws IOException {
|
||||||
return displayService.getFile("loginImage");
|
return baseDisplayService.getFile("loginImage");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取loginLogo图片")
|
@Operation(summary = "获取loginLogo图片")
|
||||||
@GetMapping("/get/login-logo")
|
@GetMapping("/get/login-logo")
|
||||||
public ResponseEntity<byte[]> getLoginLogo() throws IOException {
|
public ResponseEntity<byte[]> getLoginLogo() throws IOException {
|
||||||
return displayService.getFile("loginLogo");
|
return baseDisplayService.getFile("loginLogo");
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "获取logoPlatform图片")
|
@Operation(summary = "获取logoPlatform图片")
|
||||||
@GetMapping("/get/logo-platform")
|
@GetMapping("/get/logo-platform")
|
||||||
public ResponseEntity<byte[]> getLogoPlatform() throws IOException {
|
public ResponseEntity<byte[]> getLogoPlatform() throws IOException {
|
||||||
return displayService.getFile("logoPlatform");
|
return baseDisplayService.getFile("logoPlatform");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -27,4 +27,7 @@ public class AuthSourceDTO implements Serializable {
|
||||||
|
|
||||||
@Schema(title = "认证源配置", requiredMode = Schema.RequiredMode.REQUIRED)
|
@Schema(title = "认证源配置", requiredMode = Schema.RequiredMode.REQUIRED)
|
||||||
private String configuration;
|
private String configuration;
|
||||||
|
|
||||||
|
@Schema(title = "是否启用")
|
||||||
|
private Boolean enable;
|
||||||
}
|
}
|
||||||
|
|
|
@ -87,6 +87,7 @@ public class AuthSourceService {
|
||||||
source.setName(authSource.getName());
|
source.setName(authSource.getName());
|
||||||
source.setDescription(authSource.getDescription());
|
source.setDescription(authSource.getDescription());
|
||||||
source.setConfiguration(authSource.getConfiguration().getBytes());
|
source.setConfiguration(authSource.getConfiguration().getBytes());
|
||||||
|
source.setType(authSource.getType());
|
||||||
source.setUpdateTime(System.currentTimeMillis());
|
source.setUpdateTime(System.currentTimeMillis());
|
||||||
authSourceMapper.updateByPrimaryKeySelective(source);
|
authSourceMapper.updateByPrimaryKeySelective(source);
|
||||||
}
|
}
|
||||||
|
|
|
@ -50,14 +50,14 @@ public class BaseDisplayService {
|
||||||
bytes = IOUtils.toByteArray(resolver.getResource("/static/favicon.ico").getInputStream());
|
bytes = IOUtils.toByteArray(resolver.getResource("/static/favicon.ico").getInputStream());
|
||||||
break;
|
break;
|
||||||
case "logoPlatform":
|
case "logoPlatform":
|
||||||
bytes = IOUtils.toByteArray(resolver.getResource("/static/svg/MS-full-logo.svg").getInputStream());
|
bytes = IOUtils.toByteArray(resolver.getResource("/static/images/MS-full-logo.svg").getInputStream());
|
||||||
contentType = MediaType.valueOf("image/svg+xml");
|
contentType = MediaType.valueOf("image/svg+xml");
|
||||||
break;
|
break;
|
||||||
case "loginImage":
|
case "loginImage":
|
||||||
bytes = IOUtils.toByteArray(resolver.getResource("/static/images/login-banner.jpg").getInputStream());
|
bytes = IOUtils.toByteArray(resolver.getResource("/static/images/login-banner.jpg").getInputStream());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
bytes = IOUtils.toByteArray(resolver.getResource("/static/svg/login-logo.svg").getInputStream());
|
bytes = IOUtils.toByteArray(resolver.getResource("/static/images/login-logo.svg").getInputStream());
|
||||||
contentType = MediaType.valueOf("image/svg+xml");
|
contentType = MediaType.valueOf("image/svg+xml");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue