mirror of
https://github.com/PlayEdu/PlayEdu
synced 2025-06-20 10:25:00 +08:00
fixed: 系统private配置为空也返回*
This commit is contained in:
parent
657d418e7a
commit
46b0bb7555
@ -27,6 +27,7 @@ import xyz.playedu.common.constant.SystemConstant;
|
||||
import xyz.playedu.common.domain.AppConfig;
|
||||
import xyz.playedu.common.service.AppConfigService;
|
||||
import xyz.playedu.common.types.JsonResponse;
|
||||
import xyz.playedu.common.util.StringUtil;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
@ -45,7 +46,7 @@ public class AppConfigController {
|
||||
List<AppConfig> configs = configService.allShow();
|
||||
List<AppConfig> data = new ArrayList<>();
|
||||
for (AppConfig item : configs) {
|
||||
if (item.getIsPrivate() == 1) {
|
||||
if (item.getIsPrivate() == 1 && StringUtil.isNotEmpty(item.getKeyValue())) {
|
||||
item.setKeyValue(SystemConstant.CONFIG_MASK);
|
||||
}
|
||||
data.add(item);
|
||||
|
@ -44,7 +44,7 @@ public class SystemController {
|
||||
Map<String, String> configData = BCtx.getConfig();
|
||||
|
||||
String apiUrl = configData.get(ConfigConstant.SYSTEM_API_URL);
|
||||
if (apiUrl == null || apiUrl.trim().length() == 0) {
|
||||
if (apiUrl == null || apiUrl.trim().isEmpty()) {
|
||||
apiUrl = RequestUtil.uriWithProtocol();
|
||||
} else {
|
||||
if (apiUrl.endsWith("/")) {
|
||||
@ -62,7 +62,7 @@ public class SystemController {
|
||||
|
||||
// 学员的默认头像
|
||||
String memberDefaultAvatar = configData.get(ConfigConstant.MEMBER_DEFAULT_AVATAR);
|
||||
if (memberDefaultAvatar == null || memberDefaultAvatar.trim().length() == 0) {
|
||||
if (memberDefaultAvatar == null || memberDefaultAvatar.trim().isEmpty()) {
|
||||
data.put(ConfigConstant.MEMBER_DEFAULT_AVATAR, apiUrl + "/images/default_avatar.png");
|
||||
} else {
|
||||
data.put(ConfigConstant.MEMBER_DEFAULT_AVATAR, memberDefaultAvatar);
|
||||
|
Loading…
x
Reference in New Issue
Block a user