package com.mx.cneeds.server.datashow.client;

import com.mx.cneeds.common.dto.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @ClassName LogFileCleint
 * @Author zzrdark
 * @Date 2020-04-01 14:53
 * @Description TODO
 **/
@FeignClient(name = "CNEEDS-SERVER-LOGUPLOAD")
public interface LogFileClient {

    @PostMapping("/log/upload/list")
    PageDto logFileList(@RequestParam Integer page,
                     @RequestParam("limit") Integer pageSize,
                     @RequestParam("sidx") String orderField,
                     @RequestParam("order") String order);

    @PostMapping("/log/upload/delete")
    void deleteLogFile(@RequestBody List<Long> ids);

    @PostMapping("/log/upload/finishLog")
    void finishLog(@RequestBody Long logId);

    @PostMapping(value = "/log/upload/wechatUploadLog")
    void wechatUploadLog(@RequestBody WechatDeviceLogDto dto);

    @PostMapping(value = "/log/upload/uploadLogFile")
    void uploadLogFile(@RequestBody DeviceLogFileDto dto);

    @PostMapping(value = "/log/upload/queryLogFileByLogid")
    DeviceLogDto queryLogFileByLogid(@RequestBody Long logId);

    @PostMapping(value = "/log/upload/queryLogFileByLogAcceptId")
    DeviceLogDto queryLogFileByLogAcceptId(@RequestBody String logAcceptId);

    @PostMapping(value = "/log/upload/wechatUploadAloneFile")
    void wechatUploadAloneFile(@RequestBody WechatFileDto wechatFileDto);



}
