package com.yonge.cooleshow.admin.client;

import com.yonge.cooleshow.admin.service.OmsOrderService;
import com.yonge.cooleshow.api.feign.MallAdminFeignService;
import com.yonge.cooleshow.common.entity.HttpResponseResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import springfox.documentation.annotations.ApiIgnore;

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

/**
 * @Author: liweifan
 * @Data: 2022/5/5 10:17
 */
@ApiIgnore
@RestController
@RequestMapping("/feign-client/order")
public class MallAdminFeignClient implements MallAdminFeignService {
    @Autowired
    private OmsOrderService orderService;

    @PostMapping(value = "/userOrderInfoList")
    public HttpResponseResult<List<Map<String,Object>>> userOrderInfoList(@RequestBody Map<String,Object> param) {
        List<Map<String,Object>> orderList = orderService.userOrderInfoList(param);
        return HttpResponseResult.succeed(orderList);
    }
}
