package com.cool.store.controller.webc;

import com.cool.store.response.ResponseResult;
import com.cool.store.service.LinePayService;
import com.cool.store.service.LineService;
import com.cool.store.vo.IntendProcessTotalVO;
import com.cool.store.vo.LineInfoVO;
import com.cool.store.vo.interview.AppointmentTimeVO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.format.annotation.DateTimeFormat;
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;

import javax.annotation.Resource;
import java.time.LocalDate;
import java.util.List;

/**
 * @Author suzhuhong
 * @Date 2024/3/25 13:43
 * @Version 1.0
 */
@RestController
@RequestMapping("/mini/line")
@Api(tags = "线索信息")
@Slf4j
public class LineController {

    @Resource
    LineService lineService;

    @Resource
    LinePayService linePayService;


    @ApiOperation("查询线索详情")
    @GetMapping("/getLineDetail")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "lineId", value = "线索id", required = true)
    })
    public ResponseResult<LineInfoVO> getLineInfo(@RequestParam("lineId")Long lineId) {
        return ResponseResult.success(lineService.getLineInfo(lineId));
    }

    @ApiOperation("根据线索id查询大区的支付二维码图片")
    @GetMapping("/getRegionPayPic")
    public ResponseResult<String> getRegionPayPic(@RequestParam("lineId")Long lineId) {
        return ResponseResult.success(lineService.getPayPicByLineId(lineId));
    }


    @ApiOperation("线索流程进度")
    @GetMapping("/getIntendProcess")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "lineId", value = "线索id", required = true)
    })
    public ResponseResult<IntendProcessTotalVO> getIntendProcessTotal(@RequestParam("lineId")Long lineId) {
        return ResponseResult.success(lineService.getIntendProcessTotal(lineId));
    }




}
