fix(core):自动登录后语言代码正确

yun-zuoyi
汪云昊 5 years ago
parent bbd53c4c2e
commit fe018a28bb

@ -44,6 +44,8 @@ import javax.servlet.http.HttpServletRequest;
import java.util.*; import java.util.*;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import static cn.estsh.i3plus.platform.common.util.CommonConstWords.DEFAULT_LANGUAGE;
/** /**
* @Description : * @Description :
* @Reference : * @Reference :
@ -139,7 +141,6 @@ public class WhiteController extends CoreBaseController {
} }
/** /**
*
* @return * @return
*/ */
@GetMapping(value = "/auth/logout") @GetMapping(value = "/auth/logout")
@ -169,6 +170,11 @@ public class WhiteController extends CoreBaseController {
try { try {
ValidatorBean.checkNotNull(languageCode, "语言不能为空"); ValidatorBean.checkNotNull(languageCode, "语言不能为空");
// TODO 后期移除,暂时用于避免自动登录后前台没有正确的传输组织代码信息
if ("null".equals(languageCode)) {
languageCode = DEFAULT_LANGUAGE;
}
// 设置语言代码 // 设置语言代码
BaseThreadLocal.setData(BaseThreadLocal.LANGUAGE_CODE, languageCode); BaseThreadLocal.setData(BaseThreadLocal.LANGUAGE_CODE, languageCode);
@ -322,7 +328,6 @@ public class WhiteController extends CoreBaseController {
} }
@GetMapping(value = "/find-language-code-soft-type") @GetMapping(value = "/find-language-code-soft-type")
@ApiOperation(value = "根据语言代码查询资源") @ApiOperation(value = "根据语言代码查询资源")
public ResultBean findSysLocaleResourceByLanguageCode(String languageCode, Integer softType, public ResultBean findSysLocaleResourceByLanguageCode(String languageCode, Integer softType,
@ -350,7 +355,8 @@ public class WhiteController extends CoreBaseController {
if (needPlatformRes.intValue() == CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) { if (needPlatformRes.intValue() == CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue()) {
Map<Object, Object> platformResMap = Map<Object, Object> platformResMap =
redisRes.getHashMap(CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE_WEB + ":" + languageCode + ":" + CommonEnumUtil.SOFT_TYPE.IMPP.getValue());; redisRes.getHashMap(CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE_WEB + ":" + languageCode + ":" + CommonEnumUtil.SOFT_TYPE.IMPP.getValue());
;
resourceMap.putAll(platformResMap); resourceMap.putAll(platformResMap);
} }
@ -405,6 +411,7 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @param fileCode * @param fileCode
* @return * @return
*/ */
@ -526,13 +533,15 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @return * @return
*/ */
@PostMapping(value = "/sys-label-template/list") @PostMapping(value = "/sys-label-template/list")
@ApiOperation(value = "查询全部打印模板", notes = "查询全部打印模板") @ApiOperation(value = "查询全部打印模板", notes = "查询全部打印模板")
public ResultBean<SysLabelTemplate> findSysConfigAll(@RequestBody SysLabelTemplate template) { public ResultBean<SysLabelTemplate> findSysConfigAll(@RequestBody SysLabelTemplate template) {
try { try {
List<SysLabelTemplate> sysLabelTemplateList = sysLabelTemplateService.listSysLabelTemplateDetail(template);; List<SysLabelTemplate> sysLabelTemplateList = sysLabelTemplateService.listSysLabelTemplateDetail(template);
;
return ResultBean.success("操作成功") return ResultBean.success("操作成功")
.setResultList(sysLabelTemplateList) .setResultList(sysLabelTemplateList)
.setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()); .setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
@ -545,6 +554,7 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @return * @return
*/ */
@PostMapping(value = "/locale-resource/no-resource") @PostMapping(value = "/locale-resource/no-resource")
@ -587,6 +597,7 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @param key * @param key
* @param menuCode * @param menuCode
* @return * @return
@ -670,6 +681,7 @@ public class WhiteController extends CoreBaseController {
/********************************************SWEB所需接口*******************************************/ /********************************************SWEB所需接口*******************************************/
/** /**
* *
*
* @param model * @param model
* @return * @return
*/ */
@ -681,6 +693,7 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @param model * @param model
* @return * @return
*/ */
@ -692,6 +705,7 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @param id id * @param id id
* @return * @return
*/ */
@ -703,6 +717,7 @@ public class WhiteController extends CoreBaseController {
/** /**
* *
*
* @param cloudPagerModel * @param cloudPagerModel
* @return * @return
*/ */

Loading…
Cancel
Save