package com.clx.performance.controller.pc.driver;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.clx.performance.model.OwnerTransferInfo;
import com.clx.performance.param.pc.*;
import com.clx.performance.param.pc.owner.CreteAccountParam;
import com.clx.performance.service.*;
import com.clx.performance.service.settle.NetworkDriverAccountService;
import com.clx.performance.vo.pc.*;
import com.clx.user.vo.pc.owner.OwnerBindCardVO;
import com.msl.common.base.PageData;
import com.msl.common.convertor.aspect.UnitCovert;
import com.msl.common.result.Result;
import com.msl.user.data.UserSessionData;
import com.msl.user.utils.TokenUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.xssf.streaming.SXSSFWorkbook;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import javax.validation.constraints.NotNull;

@Slf4j
@RestController
@RequestMapping("/pc/driver")
@Validated
@AllArgsConstructor
@Api(tags = "PC-车主网络货运")
public class NetworkDriverAccountController {

    private final NetworkDriverAccountService networkDriverAccountService;



    @ApiOperation(value = "网络货运账户列表", notes = "<br>By:胡宇帆")
    @PostMapping("/networkAccountList")
    @UnitCovert(param = false)
    public Result<PageData<NetworkDriverAccountVO>> networkAccountList(@RequestBody PageNetworkAccountListParam param) {
        IPage<NetworkDriverAccountVO> page = networkDriverAccountService.networkAccountList(param);
        return Result.page(page.getRecords(), page.getTotal(), page.getPages());
    }


    @ApiOperation(value = "创建账户", notes = "<br>By:胡宇帆")
    @PostMapping("/createAccount")
    public Result<Object> createAccount(CreteAccountParam param) {
        //ownerAccountService.createAccount(param);
        return Result.ok();
    }
}
