|
|
package com.yoho.search.consumer.index.common;
|
|
|
|
|
|
import com.yoho.search.consumer.common.ApiResponse;
|
|
|
import com.yoho.search.dal.*;
|
|
|
import com.yoho.search.dal.model.BigdataMonitor;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import java.util.List;
|
|
|
|
|
|
@Service
|
|
|
public class BigdataMonitorService {
|
|
|
|
|
|
@Autowired
|
|
|
private SimilarSknMapper similarSknMapper;
|
|
|
@Autowired
|
|
|
private BigdataSknPriceareaMapper bigdataSknPriceareaMapper;
|
|
|
@Autowired
|
|
|
private BigdataSortBrandVectorMapper bigdataSortBrandVectorMapper;
|
|
|
@Autowired
|
|
|
private Product15DaySalesNumMapper product15DaySalesNumMapper;
|
|
|
@Autowired
|
|
|
private ProductSalesInfoMapper productSalesInfoMapper;
|
|
|
@Autowired
|
|
|
private ProductHeatValuesMapper productHeatValuesMapper;
|
|
|
@Autowired
|
|
|
private ProductHeatValuesOneDayMapper productHeatValuesOneDayMapper;
|
|
|
@Autowired
|
|
|
private SknFlowMapper sknFlowMapper;
|
|
|
@Autowired
|
|
|
private ProductVectorFeatureMapper productVectorFeatureMapper;
|
|
|
@Autowired
|
|
|
private ProductModelValueMapper productModelValueMapper;
|
|
|
|
|
|
private static final int SIMILAR_SKN_THRESHOLD = 1;
|
|
|
private static final int SKN_PRICEAREA_THRESHOLD = 1;
|
|
|
private static final int SORTBRAND_VECTOR_THRESHOLD = 1;
|
|
|
private static final int PRODUCT15DAY_SALESUM_THRESHOLD = 1;
|
|
|
private static final int PRODUCT_SALESINFO_THRESHOLD = 1;
|
|
|
private static final int PRODUCTHEAT_VALUES_THRESHOLD = 1;
|
|
|
private static final int PRODUCTHEATVALUES_ONEDAY_THRESHOLD = 1;
|
|
|
private static final int SKN_FLOW_THRESHOLD = 1;
|
|
|
private static final int PRODUCTVECTOR_FEATURE_THRESHOLD = 1;
|
|
|
private static final int PRODUCTMODEL_VALUE_THRESHOLD = 1;
|
|
|
|
|
|
public ApiResponse similarSkn() {
|
|
|
List<BigdataMonitor> result = similarSknMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse sknPricearea() {
|
|
|
List<BigdataMonitor> result = bigdataSknPriceareaMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse sortBrandVector() {
|
|
|
List<BigdataMonitor> result = bigdataSortBrandVectorMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse product15daySalesnum() {
|
|
|
List<BigdataMonitor> result = product15DaySalesNumMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse productSalesInfo() {
|
|
|
List<BigdataMonitor> result = productSalesInfoMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse productHeatValues() {
|
|
|
List<BigdataMonitor> result = productHeatValuesMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse productHeatValuesOneday() {
|
|
|
List<BigdataMonitor> result = productHeatValuesOneDayMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse sknFlow() {
|
|
|
List<BigdataMonitor> result = sknFlowMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result);
|
|
|
}
|
|
|
|
|
|
public ApiResponse productVectorFeature() {
|
|
|
List<BigdataMonitor> result = productVectorFeatureMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
public ApiResponse productModelValue() {
|
|
|
List<BigdataMonitor> result = productModelValueMapper.selectCountGroupByDateId();
|
|
|
return ApiResponse.create(200, result.get(0));
|
|
|
}
|
|
|
|
|
|
} |
...
|
...
|
|