Authored by hugufei

fix bug

package com.yoho.search.consumer.service.bo;
import java.util.List;
public class BigdataBrandVectorBO {
private Long id;
private Integer brandId;
private List<Double> vector;
private String vector;
private Integer updateTime;
public Long getId() {
... ... @@ -24,11 +23,11 @@ public class BigdataBrandVectorBO {
this.brandId = brandId;
}
public List<Double> getVector() {
public String getVector() {
return vector;
}
public void setVector(List<Double> vector) {
public void setVector(String vector) {
this.vector = vector;
}
... ...
package com.yoho.search.consumer.service.bo;
import java.util.List;
public class BigdataSortBrandVectorBO {
private String id;
private Integer brandId;
private Integer middleSortId;
private List<Double> vector;
private String vector;
private Integer updateTime;
public String getId() {
... ... @@ -34,11 +32,11 @@ public class BigdataSortBrandVectorBO {
this.middleSortId = middleSortId;
}
public List<Double> getVector() {
public String getVector() {
return vector;
}
public void setVector(List<Double> vector) {
public void setVector(String vector) {
this.vector = vector;
}
... ...
package com.yoho.search.consumer.service.logicService;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.squareup.moshi.Json;
import com.yoho.search.consumer.service.bo.BigdataBrandVectorBO;
import com.yoho.search.consumer.service.bo.BigdataSortBrandVectorBO;
import com.yoho.search.dal.model.BigdataBrandVector;
... ... @@ -49,7 +51,7 @@ public class BrandVectorBOLogicService {
BigdataBrandVectorBO vectorBO = new BigdataBrandVectorBO();
vectorBO.setId(vector.getBrandId().longValue());
vectorBO.setBrandId(vector.getBrandId());
vectorBO.setVector(this.getDoubleList(vector.getVector()));
vectorBO.setVector(JSON.toJSONString(this.getDoubleList(vector.getVector())));
vectorBO.setUpdateTime(vector.getUpdateTime());
return vectorBO;
} catch (Exception e) {
... ... @@ -64,7 +66,7 @@ public class BrandVectorBOLogicService {
vectorBO.setId(vector.getBrandId() + "_" + vector.getMiddleSortId());
vectorBO.setBrandId(vector.getBrandId());
vectorBO.setMiddleSortId(vector.getMiddleSortId());
vectorBO.setVector(this.getDoubleList(vector.getVector()));
vectorBO.setVector(JSON.toJSONString(this.getDoubleList(vector.getVector())));
vectorBO.setUpdateTime(vector.getUpdateTime());
return vectorBO;
} catch (Exception e) {
... ...