JPushInspectConfigure.java
1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
package com.zteits.pay.configuration;
import org.apache.commons.lang3.StringUtils;
import com.clouds.common.cache.sys.SysCodeValueCacheUtil;
import com.clouds.common.constants.CodeValKindEnum;
import com.clouds.common.constants.CodeValueEnum;
import com.zteits.clouds.api.apibase.constants.ErrorType;
import com.zteits.clouds.api.apibase.exception.BizException;
/**
* 巡查极光推送设置
* Copyright: Copyright (c) 2018 zteits
*
* @Description:
* @version: v1.0.0
* @author: xiejianpeng
* @date: 2019/7/31 09:28
* Modification History:
* Date Author Version Description
*---------------------------------------------------------*
* 2019/7/31 xiejianpeng v1.0.0 创建
*/
public class JPushInspectConfigure {
public static String getAPP_KEY() {
String key = SysCodeValueCacheUtil.queryCodeNameByCodeValue(CodeValKindEnum.JPUSH_INSPECT, CodeValueEnum.JPUSH_KEY);
if (StringUtils.isBlank(key)) {
throw new BizException(ErrorType.BIZ_ERROR, "巡查极光推送获取key为空!");
}
return key;
}
public static String getMASTER_SECRET() {
String secret = SysCodeValueCacheUtil.queryCodeNameByCodeValue(CodeValKindEnum.JPUSH_INSPECT, CodeValueEnum.JPUSH_SECRET);
if(StringUtils.isBlank(secret)){
throw new BizException(ErrorType.BIZ_ERROR,"巡查极光推送获取密钥为空!");
}
return secret;
}
}