| File was renamed from ard-work/src/main/java/com/ard/tianyu/config/TianyuConfiguration.java |
| | |
| | | package com.ard.tianyu.config; |
| | | |
| | | import com.ard.tianyu.http.TYClient; |
| | | import com.ard.tianyu.http.TyClient; |
| | | import com.ard.tianyu.model.dto.TokenDTO; |
| | | import com.ard.tianyu.model.receiver.AccessTokenReceiver; |
| | | import com.ard.tianyu.model.receiver.BoxReceiver; |
| | |
| | | @Slf4j |
| | | @Data |
| | | @ConfigurationProperties(prefix = "tianyu") |
| | | public class TianyuConfiguration { |
| | | public class TyConfiguration { |
| | | |
| | | private String endpoint; |
| | | |
| | |
| | | encryptstr = DigestUtils.md5DigestAsHex(sb.getBytes()); |
| | | return encryptstr; |
| | | } |
| | | |
| | | @Resource |
| | | private TYClient tyClient; |
| | | private TyClient tyClient; |
| | | |
| | | private AccessTokenReceiver accessToken; |
| | | |
| | |
| | | return accessToken; |
| | | } |
| | | |
| | | private List<BoxReceiver> boxList; |
| | | |
| | | public List<BoxReceiver> getBoxList(){ |
| | | //请求云盒列表 |
| | | TyHttpCommonReceiver<List<BoxReceiver>> getBoxList = tyClient.getBoxList(getAccessToken().convertFromDTO()); |
| | | boxList = getBoxList.getContent(); |
| | | return boxList; |
| | | } |
| | | } |