Prechádzať zdrojové kódy

泰山配置的修改

dongxin 1 rok pred
rodič
commit
2aa0f9f00c

+ 9 - 2
src/main/java/com/ydtech/modules/order/entity/crawler/request/TsCrawlerLoginRequest.java

@@ -52,13 +52,17 @@ public class TsCrawlerLoginRequest  implements Serializable {
     @JsonProperty(value = "pointJson")
     private String pointJson;
 
+
+    /**
+     * 归属信息
+     */
     @JsonProperty(value = "other")
-    private String other;
+    private LinkedHashMap<String, String> other;
 
     public TsCrawlerLoginRequest(PtlAgreementAttributionDto attribution) {
         this.username = attribution.getUsername();
         this.pwd = attribution.getPassword();
-        this.other = "";
+
     }
 
     public TsCrawlerLoginRequest(PtlAgreementAttributionDto attribution, String sendcode,TsCrawlerLoginRequest request) {
@@ -68,5 +72,8 @@ public class TsCrawlerLoginRequest  implements Serializable {
         this.token = request.getToken();
         this.secretKey = request.getSecretKey();
         this.pointJson = request.getPointJson();
+        if(CollUtil.isNotEmpty(attribution.getFields())){
+            this.other = attribution.getFields().stream().collect(LinkedHashMap::new, (m, v) -> m.put(v.getField(), v.getValue()), LinkedHashMap::putAll);
+        }
     }
 }

+ 3 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsCrawlerOrderServiceImpl.java

@@ -836,6 +836,9 @@ public class InsCrawlerOrderServiceImpl implements InsCrawlerOrderService {
         PtlAgreementAttribution attribution = ptlAgreementAttributionService.getById(agreementId);
         PtlAgreementAttributionDto attributionDto = new PtlAgreementAttributionDto();
         BeanUtils.copyProperties(attribution, attributionDto);
+
+        List<PtlAttributionTemplateDto> attributionTemplateDtos = attribution.getFields().toJavaList(PtlAttributionTemplateDto.class);
+        attributionDto.setFields(attributionTemplateDtos);
         String apiUrl = ptlCrawlerApiService.getByTemplateId(attribution.getTemplateId(), PtlCrawlerApiType.API_1);
         String token = redisTemplate.opsForValue().get(OrderCacheConstant.TS_ACCESS_TOKEN + attributionDto.getUsername());
         if(StringUtils.isNotBlank(token)){