package com.kxs.store.biz.controller.kxsapp;

import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.kxs.common.core.util.R;
import com.kxs.common.security.util.SecurityUtils;
import com.kxs.store.api.dto.kxsapp.storeCredit.StoreCreditStatusDTO;
import com.kxs.store.api.model.KxsWarehouseCreditAmount;
import com.kxs.store.api.vo.kxsapp.store.StoreAdvanceMachineVO;
import com.kxs.store.biz.constant.enums.StoreStatusEnum;
import com.kxs.store.biz.service.KxsWarehouseCreditAmountService;
import lombok.RequiredArgsConstructor;
import org.springdoc.core.annotations.ParameterObject;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 仓库担保模块控制层
 *
 * @author 系统
 * @since 2024-01-08 10:33:20
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("storeCredit")
public class StoreCreditController {

    private final KxsWarehouseCreditAmountService storeCreditService;


    /**
     * 弹窗列表
     *
     * @return {@link R}
     */
    @GetMapping("/list")
    public R list(){

        return R.ok(storeCreditService.getByList());
    }

    /**
     * 确认担保
     *
     * @param param 参数
     * @return {@link R}
     */
    @PostMapping("/changeStatus")
    public R changeStatus(@RequestBody StoreCreditStatusDTO param){

        return R.ok(storeCreditService.changeStatus(param));
    }

}
