mirror of
https://gitee.com/likeadmin/likeadmin_java.git
synced 2026-06-02 15:11:15 +08:00
feat 同步前端代码
feat 同步PC代码 feat 增加1.9DB feat 同步逻辑
This commit is contained in:
@@ -22,19 +22,4 @@ public class IndexController {
|
||||
@Resource
|
||||
IIndexService iIndexService;
|
||||
|
||||
@GetMapping("/console")
|
||||
@ApiOperation(value="控制台")
|
||||
public AjaxResult<Map<String, Object>> console() {
|
||||
Map<String, Object> map = iIndexService.console();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
@NotLogin
|
||||
@GetMapping("/config")
|
||||
@ApiOperation(value="公共配置")
|
||||
public AjaxResult<Map<String, Object>> config() {
|
||||
Map<String, Object> map = iIndexService.config();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,32 @@
|
||||
package com.mdd.admin.controller.adminapi;
|
||||
|
||||
import com.mdd.admin.service.IIndexService;
|
||||
import com.mdd.common.aop.NotLogin;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Map;
|
||||
|
||||
@Slf4j
|
||||
@RestController
|
||||
@RequestMapping("adminapi/config")
|
||||
@Api(tags = "主页数据管理")
|
||||
public class ConfigController {
|
||||
|
||||
@Resource
|
||||
IIndexService iIndexService;
|
||||
@NotLogin
|
||||
@GetMapping("/getConfig")
|
||||
@ApiOperation(value="公共配置")
|
||||
public AjaxResult<Map<String, Object>> getConfig() {
|
||||
Map<String, Object> map = iIndexService.config();
|
||||
return AjaxResult.success(map);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,11 +1,11 @@
|
||||
package com.mdd.admin.controller.system;
|
||||
package com.mdd.admin.controller.adminapi;
|
||||
|
||||
import com.mdd.common.aop.NotLogin;
|
||||
import com.mdd.common.aop.NotPower;
|
||||
import com.mdd.admin.service.ISystemLoginService;
|
||||
import com.mdd.admin.validate.system.SystemAdminLoginsValidate;
|
||||
import com.mdd.admin.vo.system.SystemCaptchaVo;
|
||||
import com.mdd.admin.vo.system.SystemLoginVo;
|
||||
import com.mdd.common.aop.NotLogin;
|
||||
import com.mdd.common.aop.NotPower;
|
||||
import com.mdd.common.core.AjaxResult;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -16,9 +16,9 @@ import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
|
||||
@RestController
|
||||
@RequestMapping("api/system")
|
||||
@RequestMapping("adminapi/login")
|
||||
@Api(tags = "系统登录管理")
|
||||
public class SystemLoginController {
|
||||
public class LoginController {
|
||||
|
||||
@Resource
|
||||
ISystemLoginService iSystemLoginService;
|
||||
@@ -20,4 +20,6 @@ public interface IIndexService {
|
||||
*/
|
||||
Map<String, Object> config();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -66,19 +66,24 @@ public class IndexServiceImpl implements IIndexService {
|
||||
@Override
|
||||
public Map<String, Object> config() {
|
||||
Map<String, String> website = ConfigUtils.get("website");
|
||||
String copyright = ConfigUtils.get("website", "copyright", "");
|
||||
String copyright = ConfigUtils.get("copyright", "config", "");
|
||||
|
||||
String captchaStatus = YmlUtils.get("like.captcha.status");
|
||||
|
||||
Map<String, Object> map = new LinkedHashMap<>();
|
||||
map.put("loginCaptcha", StringUtils.isNotNull(captchaStatus) && captchaStatus.equals("true"));
|
||||
map.put("webName", website.getOrDefault("name", ""));
|
||||
map.put("webLogo", UrlUtils.toAbsoluteUrl(website.getOrDefault("logo", "")));
|
||||
map.put("webFavicon", UrlUtils.toAbsoluteUrl(website.getOrDefault("favicon", "")));
|
||||
map.put("webBackdrop", UrlUtils.toAbsoluteUrl(website.getOrDefault("backdrop", "")));
|
||||
map.put("ossDomain", UrlUtils.domain());
|
||||
map.put("copyright", ListUtils.stringToListAsMapStr(copyright));
|
||||
|
||||
// 文件域名
|
||||
map.put("oss_domain", UrlUtils.domain());
|
||||
//map.put("loginCaptcha", StringUtils.isNotNull(captchaStatus) && captchaStatus.equals("true"));
|
||||
// 网站名称
|
||||
map.put("web_name", website.getOrDefault("name", ""));
|
||||
// 网站图标
|
||||
map.put("web_favicon", UrlUtils.toAbsoluteUrl(website.getOrDefault("web_favicon", "")));
|
||||
// 网站logo
|
||||
map.put("web_logo", UrlUtils.toAbsoluteUrl(website.getOrDefault("web_logo", "")));
|
||||
// 登录页
|
||||
map.put("login_image", UrlUtils.toAbsoluteUrl(website.getOrDefault("login_image", "")));
|
||||
// 版权信息
|
||||
map.put("copyright_config", ListUtils.stringToListAsMapStr(copyright));
|
||||
return map;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user