Commit fa7f2734 authored by 纪泽龙's avatar 纪泽龙
parents 1efb38d1 cee87591
......@@ -6,6 +6,9 @@ import java.util.concurrent.TimeUnit;
import javax.annotation.Resource;
import javax.imageio.ImageIO;
import javax.servlet.http.HttpServletResponse;
import com.zehong.system.domain.SysSetting;
import com.zehong.system.service.ISysSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.util.FastByteArrayOutputStream;
......@@ -39,6 +42,8 @@ public class CaptchaController
@Value("${zehong.captchaType}")
private String captchaType;
@Resource
private ISysSettingService iSysSettingService;
/**
* 生成验证码
*/
......@@ -77,10 +82,12 @@ public class CaptchaController
{
return AjaxResult.error(e.getMessage());
}
SysSetting largeScreenHeaderCityName = iSysSettingService.selectSysSettingBySystemKey("large_screen_header_city_name");
AjaxResult ajax = AjaxResult.success();
ajax.put("uuid", uuid);
ajax.put("img", Base64.encode(os.toByteArray()));
ajax.put("cityName",largeScreenHeaderCityName.getSystemValue());
return ajax;
}
}
......@@ -5,7 +5,9 @@ import java.util.Map;
import java.util.Set;
import com.zehong.framework.systemsetting.SystemSetting;
import com.zehong.system.domain.SysSetting;
import com.zehong.system.service.ISysPostService;
import com.zehong.system.service.ISysSettingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
......@@ -23,6 +25,8 @@ import com.zehong.framework.web.service.SysPermissionService;
import com.zehong.framework.web.service.TokenService;
import com.zehong.system.service.ISysMenuService;
import javax.annotation.Resource;
/**
* 登录验证
*
......@@ -49,6 +53,9 @@ public class SysLoginController
@Autowired
private ISysPostService iSysPostService;
@Resource
private ISysSettingService iSysSettingService;
/**
* 登录方法
*
......@@ -82,6 +89,9 @@ public class SysLoginController
Set<String> permissions = permissionService.getMenuPermission(user);
//参数集合
Map<String, String> systemWebSetting = systemSetting.getSystemWebSetting();
//这个数据实时拿 20240802 wh 调整
SysSetting largeScreenHeaderCityName = iSysSettingService.selectSysSettingBySystemKey("large_screen_header_city_name");
systemWebSetting.put(largeScreenHeaderCityName.getSystemKey(), largeScreenHeaderCityName.getSystemValue());
/* HashMap hashMap=new HashMap();
hashMap.put("map_center","[114.684979,38.038292]");//经开区
......
......@@ -19,6 +19,13 @@ public interface ISysSettingService
*/
public SysSetting selectSysSettingById(Integer systemId);
/**
* 查询系统参数配置
*
* @param systemKey 系统参数配置systemKey
* @return 系统参数配置
*/
public SysSetting selectSysSettingBySystemKey(String systemKey);
/**
* 查询系统参数配置列表
*
......
......@@ -32,6 +32,11 @@ public class SysSettingServiceImpl implements ISysSettingService
return sysSettingMapper.selectSysSettingById(systemId);
}
@Override
public SysSetting selectSysSettingBySystemKey(String systemKey) {
return sysSettingMapper.getSystemValueByKey(systemKey);
}
/**
* 查询系统参数配置列表
*
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment