All Downloads are FREE. Search and download functionalities are using the official Maven repository.

eleme.openapi.sdk.api.service.DataService Maven / Gradle / Ivy

There is a newer version: 1.30.71
Show newest version
package eleme.openapi.sdk.api.service;

import eleme.openapi.sdk.api.annotation.Service;
import eleme.openapi.sdk.api.base.BaseNopService;
import eleme.openapi.sdk.api.exception.ServiceException;
import eleme.openapi.sdk.oauth.response.Token;
import eleme.openapi.sdk.config.Config;
import eleme.openapi.sdk.api.entity.data.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * 商户数据服务
 */
@Service("eleme.data")
public class DataService extends BaseNopService {
    public DataService(Config config,Token token) {
        super(config, token, DataService.class);
    }

    /**
     * 查询指定时间段内单店营业数据汇总(历史数据)
     *
     * @param shopId 店铺Id
     * @param startTime 查询起始日期
     * @param endTime 查询结束日期
     * @return 店铺营业数据汇总
     * @throws ServiceException 服务异常
     */
    public ORestaurantSaleDetail getRestaurantSaleDetail(Long shopId, String startTime, String endTime) throws ServiceException {
        Map params = new HashMap();
        params.put("shopId", shopId);
        params.put("startTime", startTime);
        params.put("endTime", endTime);
        return call("eleme.data.single.getRestaurantSaleDetail", params);
    }

    /**
     * 获取单店今日实时的营业数据汇总
     *
     * @param shopId 店铺Id
     * @return 店铺营业数据汇总
     * @throws ServiceException 服务异常
     */
    public ORestaurantSaleDetail getRestaurantRealTimeSaleDetail(Long shopId) throws ServiceException {
        Map params = new HashMap();
        params.put("shopId", shopId);
        return call("eleme.data.single.getRestaurantRealTimeSaleDetail", params);
    }

    /**
     * 查询指定时间段内单店相关营业数据指标增长率
     *
     * @param shopId 店铺Id
     * @param startTime 查询起始日期
     * @param endTime 查询结束日期
     * @return 相关指标增长率汇总
     * @throws ServiceException 服务异常
     */
    public ORestaurantSaleGrowthRatio getRestaurantSaleRatio(Long shopId, String startTime, String endTime) throws ServiceException {
        Map params = new HashMap();
        params.put("shopId", shopId);
        params.put("startTime", startTime);
        params.put("endTime", endTime);
        return call("eleme.data.single.getRestaurantSaleRatio", params);
    }

    /**
     * 查询指定日期的店铺流量数据
     *
     * @param shopId 店铺ID
     * @param date 日期
     * @return 店铺流量数据
     * @throws ServiceException 服务异常
     */
    public ORestaurantFlowData getRestaurantFlowData(Long shopId, String date) throws ServiceException {
        Map params = new HashMap();
        params.put("shopId", shopId);
        params.put("date", date);
        return call("eleme.data.single.getRestaurantFlowData", params);
    }

    /**
     * 查询指定时间段内连锁店营业数据汇总(历史数据)
     *
     * @param shopIds 连锁子店Id
     * @param startTime 查询起始日期
     * @param endTime 查询结束日期
     * @return 连锁店营业数据汇总
     * @throws ServiceException 服务异常
     */
    public OChainSaleDetail getChainRestaurantSaleDetail(List shopIds, String startTime, String endTime) throws ServiceException {
        Map params = new HashMap();
        params.put("shopIds", shopIds);
        params.put("startTime", startTime);
        params.put("endTime", endTime);
        return call("eleme.data.chain.getChainRestaurantSaleDetail", params);
    }

    /**
     * 获取连锁店今日实时的营业数据汇总
     *
     * @param shopIds 连锁子店Id
     * @return 连锁店营业数据汇总
     * @throws ServiceException 服务异常
     */
    public OChainSaleDetail getChainRealTimeSaleDetail(List shopIds) throws ServiceException {
        Map params = new HashMap();
        params.put("shopIds", shopIds);
        return call("eleme.data.chain.getChainRealTimeSaleDetail", params);
    }

    /**
     * 查询指定时间段内连锁店相关营业数据指标增长率
     *
     * @param shopIds 连锁子店Id
     * @param startTime 查询起始日期
     * @param endTime 查询结束日期
     * @return 相关指标增长率汇总
     * @throws ServiceException 服务异常
     */
    public ORestaurantSaleGrowthRatio getChainRestaurantSaleRatio(List shopIds, String startTime, String endTime) throws ServiceException {
        Map params = new HashMap();
        params.put("shopIds", shopIds);
        params.put("startTime", startTime);
        params.put("endTime", endTime);
        return call("eleme.data.chain.getChainRestaurantSaleRatio", params);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy