|
|
|
@ -5,11 +5,9 @@ import cn.estsh.i3plus.core.api.iservice.base.ISystemInitService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.base.ISystemLoginService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.*;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.CookieTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.ServletRequestTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.TimeTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.*;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.CommonConstWords;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.annotation.AnnoIgnoreLog;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.ListPager;
|
|
|
|
@ -22,10 +20,7 @@ import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
|
import cn.estsh.impp.framework.boot.auth.AuthUtil;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ImppRedis;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.LocaleUtils;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.*;
|
|
|
|
|
import io.swagger.annotations.Api;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
@ -523,21 +518,20 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 缺失资源
|
|
|
|
|
* @param key
|
|
|
|
|
* @param menuCode
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@PostMapping(value = "/miss-resource/get")
|
|
|
|
|
@ApiOperation(value = "缺失资源", notes = "缺失资源")
|
|
|
|
|
public ResultBean getMissResourceByKey(String key,String menuCode){
|
|
|
|
|
try {
|
|
|
|
|
SysMenu sysMenu = sysMenuService.getSysMenuByCode(menuCode);
|
|
|
|
|
CommonEnumUtil.SOFT_TYPE softType = CommonEnumUtil.SOFT_TYPE.valueOf(sysMenu.getSoftType());
|
|
|
|
|
if(softType == null){
|
|
|
|
|
softType = CommonEnumUtil.SOFT_TYPE.IMPP;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
LocaleUtils.saveMissResource(key, AuthUtil.getSessionLanguage().toString(),
|
|
|
|
|
softType.getValue(),
|
|
|
|
|
CommonEnumUtil.SYS_LOCALE_RESOURCE_TYPE.MISSING.getValue(),
|
|
|
|
|
CommonEnumUtil.MiSS_RESOURCE_SOURCE.WEB.getValue());
|
|
|
|
|
Map<String,String> missResource = new HashMap<>();
|
|
|
|
|
missResource.put(key,menuCode);
|
|
|
|
|
rabbitTemplate.convertAndSend(PlatformConstWords.QUEUE_IMPP_RESOURCE, JsonUtilTool.encode(missResource));
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
@ -545,4 +539,24 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
return ResultBean.fail(e).setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 缺失资源开关
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@AnnoIgnoreLog
|
|
|
|
|
@GetMapping(value = "/miss-resource/web-listener-switch")
|
|
|
|
|
@ApiOperation(value = "缺失资源开关", notes = "缺失资源开关")
|
|
|
|
|
public ResultBean getWebMissResourceSwitch(){
|
|
|
|
|
try {
|
|
|
|
|
int webListener = RedisCacheTool.getSysConfigIntVal(PlatformConstWords.WEB_MISS_RESOURCE_LISTENER_SWITCH,
|
|
|
|
|
CommonEnumUtil.TRUE_OR_FALSE.FALSE.getValue());
|
|
|
|
|
return ResultBean.success("获取成功")
|
|
|
|
|
.setResultObject(webListener == CommonEnumUtil.TRUE_OR_FALSE.TRUE.getValue());
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return ResultBean.fail(e).setCode(ImppExceptionEnum.SYSTEM_EXCEPTION.getCode());
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|