package com.prolog.cs.biz.outbound.controller;

import com.prolog.cs.biz.outbound.model.PickUpRecord;
import com.prolog.cs.biz.outbound.service.PickUpRecordService;
import com.prolog.framework.common.message.RestMessage;
import com.prolog.framework.core.pojo.Page;
import com.prolog.framework.log.aop.annotation.UserLog;
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.RestController;

/**
 * @author zzz
 * @desc
 * @date 2021/6/17
 */
@Api(tags = "自提记录")
@RestController
@RequestMapping("/pickup-record")
public class PickUpRecordController {

    @Autowired
    private PickUpRecordService service;

    @UserLog
    @ApiOperation(value = "分页查询自提记录")
    @GetMapping("/page-record")
    public RestMessage<Page<PickUpRecord>> getPickUpRecordPage(String shipperName,String srcCode,String startDate,String endDate,String warehouseId,String bldgId,Integer pageNum,Integer pageSize){
        Page<PickUpRecord> page = service.getPickUpRecordPage(shipperName, srcCode, startDate, endDate, warehouseId, bldgId, pageNum, pageSize);
        return RestMessage.success("操作成功", page);
    }

}
