package com.prolog.cs.biz.inbound.controller.taobao;

import com.prolog.cs.biz.inbound.utils.TaobaoUtil;
import com.prolog.framework.common.message.RestMessage;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@Api(tags = "淘宝")
@RestController
@RequestMapping("/taobao")
public class TaobaoController {

    @Autowired
    private TaobaoUtil taobaoUtil;

    @ApiOperation("拉取ERP中间库订单")
    @GetMapping("/getentinfo")
    public RestMessage<String> getentinfo(@RequestParam(name = "ent_name") String ent_name,@RequestParam(name = "enterpriseid") String enterpriseid) {
        return RestMessage.newInstance(true, "成功", taobaoUtil.getentinfo(ent_name,enterpriseid));
    }
}
