|
|
|
@ -514,6 +514,39 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取首页所需要的翻译资源
|
|
|
|
|
* 目前只有三个
|
|
|
|
|
*
|
|
|
|
|
* @param languageCode
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/find-indexpage-language-resource")
|
|
|
|
|
@ApiOperation(value = "获取首页所需的翻译资源")
|
|
|
|
|
public ResultBean findInexPageResourceByLanguageCode(String languageCode) {
|
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
ValidatorBean.checkNotNull(languageCode, "语言代码不能为空");
|
|
|
|
|
if (sysLocaleLanguageService.getSysLocaleLanguageByCode(languageCode) == null) {
|
|
|
|
|
throw ImppExceptionBuilder.newInstance()
|
|
|
|
|
.setSystemID(CommonEnumUtil.SOFT_TYPE.CORE.getCode())
|
|
|
|
|
.setErrorCode(ImppExceptionEnum.VARIFY_EXCEPTION.getCode())
|
|
|
|
|
.setErrorDetail("语言不存在")
|
|
|
|
|
.build();
|
|
|
|
|
}
|
|
|
|
|
Map<String, Object> indexMap = new HashMap<>();
|
|
|
|
|
indexMap.put("记住密码", redisRes.getHash(CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE_WEB + ":" + languageCode + ":1", "记住密码"));
|
|
|
|
|
indexMap.put("自动登录", redisRes.getHash(CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE_WEB + ":" + languageCode + ":1", "自动登录"));
|
|
|
|
|
indexMap.put("登录", redisRes.getHash(CommonConstWords.REDIS_PREFIX_CACHE_LANGUAGE_WEB + ":" + languageCode + ":1", "登录"));
|
|
|
|
|
return ResultBean.success("操作成功").setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode()).setResultMap(indexMap);
|
|
|
|
|
} catch (ImppBusiException busExcep) {
|
|
|
|
|
return ResultBean.fail(busExcep);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|
return ImppExceptionBuilder.newInstance().buildExceptionResult(e);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@PostMapping(value = "/sys-locale-resource/query")
|
|
|
|
|
@ApiOperation(value = "按条件查询资源")
|
|
|
|
|
public ResultBean findSysLocaleResource(@RequestBody CloudPagerModel<SysLocaleResource> pagerModel) {
|
|
|
|
@ -1077,6 +1110,7 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取fastJosn配置并测试
|
|
|
|
|
*
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/fastjson")
|
|
|
|
@ -1106,12 +1140,12 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
private static final Long ACCESS_TOKEN_EXPIRE_TIME = 7080L;
|
|
|
|
|
private static final String ACCESS_TOKEN_KEY = "ding_talk:access_token";
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 钉钉单聊机器人批量发送消息
|
|
|
|
|
*
|
|
|
|
|
* @param dingSendBatchRequestModel
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
@ -1146,8 +1180,10 @@ public class WhiteController extends CoreBaseController {
|
|
|
|
|
* 批量发送的最大值
|
|
|
|
|
*/
|
|
|
|
|
private final int MAX_DINGROBOT_SEND_NUM = 1000;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 钉钉单聊机器人批量发送消息
|
|
|
|
|
*
|
|
|
|
|
* @param dingSendBatchRequestModel
|
|
|
|
|
* @return
|
|
|
|
|
*/
|
|
|
|
|