Commit 3304f86e by 徐高华

加好友数限制

parent 61fcd493
package com.gic.haoban.manage.service.util;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.alibaba.fastjson.JSONObject;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.enterprise.service.CustomSettingApiService;
@Component
public class QwFriendLimitCountUtil {
private static CustomSettingApiService customSettingApiService;
@Autowired
public void setCustomSettingApiService(CustomSettingApiService customSettingApiService) {
QwFriendLimitCountUtil.customSettingApiService = customSettingApiService;
}
// 是否认证
public static int getLimit(boolean regFlag) {
String tableName = "tab_gic_map";
JSONObject searchParamMap = new JSONObject();
int defaultCount = 200;
String key = "hm_add_limit_count_1";
if (regFlag) {
key = "hm_add_limit_count_2";
defaultCount = 500;
}
searchParamMap.put("key", key);
ServiceResponse<Map<String, Object>> resp = customSettingApiService.getDetail(tableName,
searchParamMap.toJSONString());
if (resp.isSuccess() && null != resp.getResult()) {
int count = Integer.valueOf(resp.getResult().get("value").toString());
return count;
}
return defaultCount;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment