package org.springblade.openapi.track.api;

import org.springblade.openapi.track.pojo.dto.Api4TrackWaybillDTO;
import org.springblade.openapi.track.pojo.vo.Api4TrackResultVO;
import org.springblade.openapi.track.pojo.vo.Api4TrackWaybillVO;
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;

/**
 * @author bfhuange
 * @since 2024/12/16
 */
public interface IApi4Track {
    String API_PREFIX = "/openApi/gj";
    String WAYBILL_LIST = API_PREFIX + "/mycode/zhcx/getZhcx";
    String WAYBILL_TRACK_UPDATE = API_PREFIX + "/mycode/zhcx/callback";

    /**
     * 轨迹查询运单信息
     *
     * @param param@return
     */
    @PostMapping(WAYBILL_LIST)
    Api4TrackResultVO<List<Api4TrackWaybillVO>> queryWaybillList(@RequestBody Api4TrackWaybillDTO param);

    /**
     *  轨迹更新运单轨迹url和状态
     * @param waybillId
     * @param trajectoryId
     * @param trajectoryStatus
     * @return
     */
    @PostMapping(WAYBILL_TRACK_UPDATE)
    Api4TrackResultVO<Void> updateWaybillTrack(@RequestParam(name = "zhcxId", required = false) String waybillId,
                                               @RequestParam(name = "diTuUrl", required = false) String trajectoryId,
                                               @RequestParam(name = "guiJiZhuangTai", required = false) String trajectoryStatus);
}
