|  |  |  | 
|---|
|  |  |  | import lombok.extern.slf4j.Slf4j; | 
|---|
|  |  |  | import org.apache.commons.lang3.StringUtils; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.data.redis.core.RedisTemplate; | 
|---|
|  |  |  | import org.springframework.stereotype.Service; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | import java.util.Date; | 
|---|
|  |  |  | 
|---|
|  |  |  | public class ZbomZhongTaiServiceImpl implements ZbomZhongTaiService { | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private InterfaceLogMapper interfaceLogMapper; | 
|---|
|  |  |  | @Autowired | 
|---|
|  |  |  | private RedisTemplate<String, Object> redisTemplate; | 
|---|
|  |  |  |  | 
|---|
|  |  |  | /** | 
|---|
|  |  |  | * 获取用户登陆token | 
|---|
|  |  |  | * @param param | 
|---|
|  |  |  | 
|---|
|  |  |  | Map<String,String> headers = new HashMap<>(); | 
|---|
|  |  |  | headers.put(ZTConstants.HEADER_TOKEN,token); | 
|---|
|  |  |  | headers.put(ZTConstants.HEADER_USERTYPE,userType); | 
|---|
|  |  |  | res = HttpsUtil.postJsonWithHeaders(url,param,headers); | 
|---|
|  |  |  | String index = (String) redisTemplate.opsForValue().get(Constants.RedisKeys.ZBOM_ZHONGTAI_API_URL); | 
|---|
|  |  |  | res = HttpsUtil.postJsonWithHeaders(index+url,param,headers); | 
|---|
|  |  |  | TypeReference typeReference = | 
|---|
|  |  |  | new TypeReference<ZTBaseResponse<T>>(){}; | 
|---|
|  |  |  | ZTBaseResponse<T>  result = JSONObject.parseObject(res, typeReference.getType()); | 
|---|