Java服务_数据服务通过反射快速路由实现类并进行AOP增强

Java服务_数据服务通过反射快速路由实现类并进行AOP增强

话不多说,直接开始实战!

1.创建数据服务service层的抽象类

在抽象方法中新建一个getAllMethods()方法,因为后续透出给使用方的接口名或者说服务名就是该service类中的一个个实现方法。

1
2
3
4
5
6
7
8
9
10
11
public abstract class BrandService {
public Map<String, Method> getAllMethods() {
Map<String, Method> methodMap = new HashMap<>();
Method[] methods = this.getClass().getDeclaredMethods();
for (Method method : methods) {
String methodName = method.getName();
methodMap.put(methodName, method);
}
return methodMap;
}
}

2.创建一个spring环境工具类

在该工具类中新建两个spring框架天然提供的动态获取bean的两个方法,这也是spring依赖注入(ioc)的核心功能之一。

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
@Component
public class SpringConfigTool implements ApplicationContextAware {
private static ApplicationContext ac = null;

public void setApplicationContext(ApplicationContext applicationContext)throws BeansException {
ac = applicationContext;
}

public synchronized static Object getBean(String beanName) {
return ac.getBean(beanName);
}

public synchronized static Map<String,BrandService> getBrandServices() {
return ac.getBeansOfType(BrandService.class);
}
}

3.创建一个容器管理类

使用该容器管理类对service层的具体实现实例和方法进行收集管理,并对外提供统一的接口服务,只需要根据接口名就可以找到对应的接口实现方法。

其中return (R) methodMap.get(methodName).invoke(instanceMap.get(methodName), request)这一句就是真实调用实际接口方法,前后都是一些统一添加的监控和限流操作。从这也可以看出,这种架构非常有利于通过AOP增强的方式实现统一的监控和限流逻辑。

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
@Component
public class SpringContentManager {
//方法容器<methodName, method>
public static Map<String, Method> methodMap = new HashMap<>();
//实例容器<methodName, instance>
public static Map<String, Object> instanceMap = new HashMap<>();


static {
BrandLog.logInfo("SpringContentManager init start...");

for (Map.Entry<String, BrandService> e : SpringConfigTool.getBrandServices().entrySet()) {
for (Map.Entry<String, Method> entry : e.getValue().getAllMethods().entrySet()) {
methodMap.put(entry.getKey(), entry.getValue());//方法
instanceMap.put(entry.getKey(), e.getValue());//实例
}
}

for (Map.Entry<String, Method> entry : methodMap.entrySet()) {
BrandLog.logInfo("serviceName:" + entry.getKey() + ",methodName:" + entry.getValue().getName() + ",className:" + instanceMap.get(entry.getKey()).getClass().getName());
}
BrandLog.logInfo("SpringContentManager init finished...");
}

/**
* 离线业务处理
*/
@CacheEnabled(expiredTimeStr = "0 0 8 * * ?", validator = JudgeBlankValidator.class)
public <R> R invokeMethod(String methodName, String cacheSuffix, JSONObject requestBody, @ParamExcluded JSONObject requestHeader, @ParamExcluded String appSuffix) {
return invokeMethodImpl(methodName, requestBody, requestHeader, appSuffix, CK, OFFLINE);
}

/**
* 业务处理
*/
public <R> R invokeMethodImpl(String methodName, JSONObject requestBody, JSONObject requestHeader,
String appSuffix, String dataBaseType, String bizType) {
// ump监控
CallerInfo eachInfo = null; // 各个系统每一个请求监控
CallerInfo eachSysEachTypeInfo = null;// 各个系统的离线,实时,实时对比请求监控
CallerInfo eachSysInfo = null;// 各个系统的总请求
CallerInfo allSysEachDBInfo = null;// 全部系统的CK,HBASE请求监控
CallerInfo allSysEachTypeInfo = null;// 全部系统的离线,实时,实时对比请求监控
CallerInfo allSysDbInfo = null;// 全部系统的所有数据库请求监控
CallerInfo moduleInfo = null;// 模块请求

try {
JSONObject request = new JSONObject();
request.put(P_BODY, requestBody);
request.put(P_HEADER, requestHeader);

if (null != methodMap.get(methodName)) {
Boolean donotallSysDbInfoLimit = ServiceLimiterUtils.doLimit(UMP_ALL_SYS_DB_STATUS);// 全部系统的所有数据库请求限流
Boolean donotallSysEachTypeInfoLimit = ServiceLimiterUtils.doLimit(UMP_SYS + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS);// 全部系统的离线,实时,实时对比请求限流
Boolean donotallSysEachDBInfoLimit = ServiceLimiterUtils.doLimit(UMP_SYS + SEPERATOR + dataBaseType + SEPERATOR + UMP_DB_STATUS);// 全部系统的CK,HBASE请求限流
Boolean donotAllAppLimit = ServiceLimiterUtils.doLimit(appSuffix + SEPERATOR + ALL + SEPERATOR + UMP_DB_STATUS);// 各个系统的总请求限流
Boolean donoteachSysEachTypeInfoLimit = ServiceLimiterUtils.doLimit(appSuffix + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS);// 各个系统的离线,实时,实时对比请求限流
Boolean donoteachInfoLimit = ServiceLimiterUtils.doLimit(appSuffix + SEPERATOR + methodName + SEPERATOR + UMP_DB);// 各个系统每一个请求限流
Boolean donotServiceNameLimit = ServiceLimiterUtils.doLimit(methodName);//服务请求限流

// 品牌版实时访客限流专用
if (RTConstants.BRAND_RT_VISITOR_DETAIL.equals(methodName) || RTConstants.BRAND_RT_VISITOR_RANK.equals(methodName)) {
Boolean donotBrandRTVisitorLimit = ServiceLimiterUtils.doLimit(RTConstants.BRAND_RT_VISITOR_METHODS);
if (!donotBrandRTVisitorLimit) {
BrandLog.logError("service " + RTConstants.BRAND_RT_VISITOR_METHODS + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + RTConstants.BRAND_RT_VISITOR_METHODS + " is limit visit!");
}
}

if (!donotallSysDbInfoLimit) {
BrandLog.logError("service " + UMP_ALL_SYS_DB_STATUS + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + UMP_ALL_SYS_DB_STATUS + " is limit visit!");
}
if (!donotallSysEachTypeInfoLimit) {
BrandLog.logError("service " + UMP_SYS + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + UMP_SYS + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS + " is limit visit!");
}
if (!donotallSysEachDBInfoLimit) {
BrandLog.logError("service " + UMP_SYS + SEPERATOR + dataBaseType + SEPERATOR + UMP_DB_STATUS + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + UMP_SYS + SEPERATOR + dataBaseType + SEPERATOR + UMP_DB_STATUS + " is limit visit!");
}
if (!donotAllAppLimit) {
BrandLog.logError("service " + appSuffix + SEPERATOR + ALL + SEPERATOR + UMP_DB_STATUS + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + appSuffix + SEPERATOR + ALL + SEPERATOR + UMP_DB_STATUS + " is limit visit!");
}
if (!donoteachSysEachTypeInfoLimit) {
BrandLog.logError("service " + appSuffix + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + appSuffix + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS + " is limit visit!");
}
if (!donoteachInfoLimit) {
BrandLog.logError("service " + appSuffix + SEPERATOR + methodName + SEPERATOR + UMP_DB + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + appSuffix + SEPERATOR + methodName + SEPERATOR + UMP_DB + " is limit visit!");
}
if (!donotServiceNameLimit) {
BrandLog.logError("service " + methodName + " is limit!");
throw new DispatchException(ErrorEnum.ERR_SERVICE_LIMITER.code, "service " + methodName + " is limit visit!");
}
eachInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + methodName + SEPERATOR + UMP_DB, UMP_APP_NAME, true, true);
eachSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS, UMP_APP_NAME, true, true);
eachSysInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + ALL + SEPERATOR + UMP_DB_STATUS, UMP_APP_NAME, true, true);
allSysEachDBInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_SYS + SEPERATOR + dataBaseType + SEPERATOR + UMP_DB_STATUS, UMP_APP_NAME, true, true);
allSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_SYS + SEPERATOR + bizType + SEPERATOR + UMP_DB_STATUS, UMP_APP_NAME, true, true);
allSysDbInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_ALL_SYS_DB_STATUS, UMP_APP_NAME, true, true);
moduleInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + ReqUtils.getModule(methodName) + SEPERATOR + UMP_DB, UMP_APP_NAME, true, true);
return (R) methodMap.get(methodName).invoke(instanceMap.get(methodName), request);
} else {
throw new DispatchException(ErrorEnum.SERVICE_NOT_EXIST.code, "No Such Service!");
}
} catch (IllegalAccessException e) {
BrandLog.logError("Invoke error", e);
//监控异常(可用率)
Profiler.functionError(eachInfo);
Profiler.functionError(eachSysEachTypeInfo);
Profiler.functionError(eachSysInfo);
Profiler.functionError(allSysEachDBInfo);
Profiler.functionError(allSysEachTypeInfo);
Profiler.functionError(allSysDbInfo);
Profiler.functionError(moduleInfo);

//这里不做统一的异常处理,直接抛出去
throw new DispatchException(ErrorEnum.EXCP_OCCURRED.code, "Invoke error");
} catch (InvocationTargetException e) {
BrandLog.logError("Invoke error", e);

//监控异常(可用率)
Profiler.functionError(eachInfo);
Profiler.functionError(eachSysEachTypeInfo);
Profiler.functionError(eachSysInfo);
Profiler.functionError(allSysEachDBInfo);
Profiler.functionError(allSysEachTypeInfo);
Profiler.functionError(allSysDbInfo);
Profiler.functionError(moduleInfo);
throw new DispatchException(ErrorEnum.EXCP_OCCURRED.code, "Invoke error");
} finally {
//监控结束标志
Profiler.registerInfoEnd(eachInfo);
Profiler.registerInfoEnd(eachSysEachTypeInfo);
Profiler.registerInfoEnd(eachSysInfo);
Profiler.registerInfoEnd(allSysEachDBInfo);
Profiler.registerInfoEnd(allSysEachTypeInfo);
Profiler.registerInfoEnd(allSysDbInfo);
Profiler.registerInfoEnd(moduleInfo);
}
}

/**
* 查询服务的缓存前缀
*
* @param serviceName
* @return
*/
public String getCacheSuffix(String serviceName) {
String cacheSuffix = "";
try {
cacheSuffix = (String) CacheUtils.get(serviceName);
} catch (Exception e) {
BrandLog.logError("query cacheSuffix fail ,serviceName=" + serviceName, e);
}
return cacheSuffix;
}
}

4.在外层再包一层AOP增强

对于一些统一的监控和限流,可以在外层再包一层调度器通过AOP增强来实现,同时也可以根据输入参数多建几个上层方法,实现不同目的的监控和限流。

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
@Component
public class Dispatcher {

@Resource
SpringContentManager scm;

public <R> R dispatch(JSONObject json) {
JSONObject header = json.getJSONObject(P_HEADER);
String appKey = header.getString(P_APPKEY);
JSONObject body = json.getJSONObject(P_BODY);
String serviceName = header.getString(P_SERVICENAME);

String appSuffix = appKey;
CallerInfo eachInfo = null; // 各个系统每一个请求监控
CallerInfo eachSysEachTypeInfo = null;// 各个系统的离线,实时,实时对比请求监控
CallerInfo eachSysInfo = null;// 各个系统的总请求监控
CallerInfo allSysEachTypeInfo = null;//全部系统的离线,实时,实时对比请求监控
CallerInfo allSysInfo = null;// 全部系统的所有请求监控
CallerInfo moduleInfo = null;// 模块请求

if (StringUtils.isEmpty(serviceName)) {
BrandLog.logError("serviceName is not exits!");
throw new DispatchException(ErrorEnum.SERVICE_NOT_EXIST.code, "serviceName is not exits!");
} else {
try {
//ServiceName监控注册
eachInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + serviceName, UMP_APP_NAME, true, true);
eachSysInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + ALL + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
allSysInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_ALL_SYSREQ_SERVICE_STATS, UMP_APP_NAME, true, true);
moduleInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + ReqUtils.getModule(serviceName), UMP_APP_NAME, true, true);
//调用相应的Service Method
if (serviceName.contains("RT")) {
if (serviceName.contains("Compare")) {
eachSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + RT_OFFLINE + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
allSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_SYS + SEPERATOR + RT_OFFLINE + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
String cacheSuffix = scm.getCacheSuffix(serviceName);
return scm.invokeRTHistoryMethod(serviceName, cacheSuffix, body, header, appSuffix);
} else if (serviceName.contains("Report")) {
eachSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + RT + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
allSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_SYS + SEPERATOR + RT + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
return scm.invokeRTReportDownload(serviceName, body, header, appSuffix);
} else {
eachSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + RT + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
allSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_SYS + SEPERATOR + RT + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
return scm.invokeRTMethod(serviceName, body, header, appSuffix);
}
} else {
eachSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + appSuffix + SEPERATOR + OFFLINE + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
allSysEachTypeInfo = Profiler.registerInfo(GlobalConstant.UMP_ENV_KEY + UMP_SYS + SEPERATOR + OFFLINE + SEPERATOR + UMP_SERVICE_STATS, UMP_APP_NAME, true, true);
String cacheSuffix = scm.getCacheSuffix(serviceName);
return scm.invokeMethod(serviceName, cacheSuffix, body, header, appSuffix);
}
} catch (Throwable t) {
//监控异常(可用率)
Profiler.functionError(eachInfo);
Profiler.functionError(eachSysEachTypeInfo);
Profiler.functionError(eachSysInfo);
Profiler.functionError(allSysEachTypeInfo);
Profiler.functionError(allSysInfo);
Profiler.functionError(moduleInfo);
//这里不做统一的异常处理,直接抛出去
throw t;
} finally {
//监控结束标志
Profiler.registerInfoEnd(eachInfo);
Profiler.registerInfoEnd(eachSysEachTypeInfo);
Profiler.registerInfoEnd(eachSysInfo);
Profiler.registerInfoEnd(allSysEachTypeInfo);
Profiler.registerInfoEnd(allSysInfo);
Profiler.registerInfoEnd(moduleInfo);

}
}
}
}

5.最后就可以愉快地建service层实现类

随便举一个例子,这就建了24个接口,用户只需要传入methodName,就可以快速定位到具体实现接口。

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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
@Service
public class IndustryRankService extends BrandService {

@Resource
IndustryRankMapper industryRankMapper;

private JSONObject query(JSONObject jsonObject, String methodName) {
List<LinkedHashMap<String, Object>> result = new ArrayList<>();
JSONObject obj;
try {
// 校验时间参数,已修改到serviceList.ini中校验
// CheckUtils.checkDimensionsTime(jsonObject);
IndustryRankParam param = (IndustryRankParam) ReqUtils.generateParam(jsonObject, IndustryRankParam.class);

Set<String> cols = ReqUtils.generateCols(jsonObject);
if (cols == null || cols.size() == 0) {
BrandLog.logError("no query any message:" + jsonObject.toJSONString());
throw new ValidateException(ErrorEnum.DATA_QUERY_ERROR.code, "no query any message");
}
// 设置查询列信息
IndustryRankUtil.setQueryCols(cols, param);
Method m = industryRankMapper.getClass().getMethod(methodName, IndustryRankParam.class);
List<LinkedHashMap<String, Object>> ckData = (List<LinkedHashMap<String, Object>>) m.invoke(industryRankMapper, param);

// 用于存放过滤品牌后的数据集
List<LinkedHashMap<String, Object>> filterData = new ArrayList<>();
// 判断是否传了品牌ID,如果传了品牌ID则从全量品牌返回结果中过滤
if((methodName.equals("getBrandIndBrandRank") || methodName.equals("getBrandIndBrandRankDown")) && !StringUtils.isEmpty(param.getBrandId())){
String [] brandArr =param.getBrandId().replace("'","").split(",");
for (int i = 0; i <ckData.size() ; i++) {
String resultBrandId =ckData.get(i).get("BrandId").toString();
for (int j = 0; j <brandArr.length ; j++){
String brandId =brandArr[j];
if(resultBrandId.equals(brandId)){
filterData.add(ckData.get(i));
}
}
}
}
// 判断是否传了品牌名称,如果传了品牌ID则从全量品牌返回结果中过滤
if((methodName.equals("getBrandIndBrandRank") || methodName.equals("getBrandIndBrandRankDown")) && !StringUtils.isEmpty(param.getBrandName())){
String [] brandArr =param.getBrandName().replace("'","").split(",");
for (int i = 0; i <ckData.size() ; i++) {
String resultBrandName =ckData.get(i).get("BrandName").toString();
for (int j = 0; j <brandArr.length ; j++){
String brandName =brandArr[j];
if(resultBrandName.contains(brandName)){
filterData.add(ckData.get(i));
}
}
}
}
if((methodName.equals("getBrandIndBrandRank") || methodName.equals("getBrandIndBrandRankDown")) && (!StringUtils.isEmpty(param.getBrandId()) || !StringUtils.isEmpty(param.getBrandName()))){
if (filterData != null && filterData.size() > 0) {
result.addAll(filterData);
}
}else{
if (ckData != null && ckData.size() > 0) {
result.addAll(ckData);
}
}

obj = new TransformForClickHouse().transform(result);

} catch (Exception e) {
BrandLog.logError(e.getMessage(), e);
throw new ValidateException(ErrorEnum.DATA_QUERY_ERROR.code, e.getMessage());
}
return obj;
}

//行业-品牌榜单
public JSONObject getBrandIndBrandRank(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandRank");
}

//行业-品牌榜单-汇总
public JSONObject getBrandIndBrandSum(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandSum");
}

//行业-品牌榜单-下载
public JSONObject getBrandIndBrandRankDown(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandRankDown");
}

//行业-品牌榜单-汇总下载
public JSONObject getBrandIndBrandSumDown(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandSumDown");
}

//行业-品牌榜单-价格区间
public JSONObject getBrandIndBrandPrice(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandPrice");
}

//行业-品牌榜单-价格区间(全部品牌)
public JSONObject getBrandIndBrandPriceSum(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandPriceSum");
}

//行业-店铺榜单
public JSONObject getBrandIndShopRank(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndShopRank");
}

// 行业-店铺榜单-详情
public JSONObject getBrandIndShopRankDet(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndShopRankDet");
}

//行业-店铺榜单-下载
public JSONObject getBrandIndShopRankDown(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndShopRankDown");
}

//行业-商品榜单
public JSONObject getBrandIndProRank(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndProRank");
}

//行业-商品榜单-下载
public JSONObject getBrandIndProRankDown(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndProRankDown");
}

//行业-店铺榜单-二级类目
public JSONObject getBrandScndIndShopRank(JSONObject jsonObject) {
return query(jsonObject, "getBrandScndIndShopRank");
}

// 行业-店铺榜单-详情-二级类目
public JSONObject getBrandScndIndShopRankDet(JSONObject jsonObject) {
return query(jsonObject, "getBrandScndIndShopRankDet");
}

//行业-店铺榜单-二级类目-下载
public JSONObject getBrandScndIndShopRankDown(JSONObject jsonObject) {
return query(jsonObject, "getBrandScndIndShopRankDown");
}

//行业-商品榜单-二级类目
public JSONObject getBrandScndIndProRank(JSONObject jsonObject) {
return query(jsonObject, "getBrandScndIndProRank");
}

//行业-商品榜单-二级类目-下载
public JSONObject getBrandScndIndProRankDown(JSONObject jsonObject) {
return query(jsonObject, "getBrandScndIndProRankDown");
}

//行业-店铺榜单-趋势
public JSONObject getBrandIndShopRankTrend(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndShopRankTrend");
}

//行业-店铺榜单-二级类目-趋势
public JSONObject getBrandScndIndShopRankTrend(JSONObject jsonObject) {
return query(jsonObject, "getBrandScndIndShopRankTrend");
}

//行业-商品榜单-趋势
public JSONObject getBrandIndProRankTrend(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndProRankTrend");
}

//行业-品牌榜单-趋势
public JSONObject getBrandIndBrandRankTrend(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandRankTrend");
}

//行业-品牌榜单-品牌详情-商品榜单
public JSONObject getBrandIndBrandRankProRank(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandRankProRank");
}

//行业-品牌榜单-品牌详情-趋势图-汇总
public JSONObject getBrandIndBrandSumTrend(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndBrandSumTrend");
}

//行业分析-行业概况-大盘概况
public JSONObject getBrandIndCateSummary(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndCateSummary");
}

//行业分析-行业概况-大盘走势-趋势图
public JSONObject getBrandIndCateTrend(JSONObject jsonObject) {
return query(jsonObject, "getBrandIndCateTrend");
}
}