package com.yonge.cooleshow.api.feign;

import com.yonge.cooleshow.api.feign.fallback.MallAdminFeignServiceFallback;
import com.yonge.cooleshow.common.constant.AppConstant;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import com.yonge.toolset.feign.config.FeignConfiguration;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

@FeignClient(name = AppConstant.APPLICATION_MALL_ADMIN + AppConstant.SERVER, configuration = FeignConfiguration.class,
        fallback = MallAdminFeignServiceFallback.class)
public interface MallAdminFeignService {


    @PostMapping(value = "/feign-client/order/userOrderInfoList")
    /***
     * 远程查询订单成功的用户和时间信息
     * @author liweifan
     * @param: param {
     *              startTime="yyyy-MM-dd HH:mm:ss",    --订单开始时间
     *              endTime="yyyy-MM-dd HH:mm:ss",      --订单结束时间
     *              userIdList=[1,2]                    --用户id集合
     * }
     * @updateTime 2022/5/5 10:57
     * @return: com.yonge.cooleshow.common.entity.HttpResponseResult<java.util.List < java.util.Map < java.lang.String, java.lang.Object>>>
     *      {
     *          userId:1,                               --用户id
     *          receiveTime:毫秒值        --订单完成时间
     *      }
     */
    HttpResponseResult<List<Map<String, Object>>> userOrderInfoList(@RequestBody Map<String, Object> param);
}
