package com.muyu.cloud.mart.controller;

import com.muyu.cloud.mart.service.ShuJuService;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.domain.req.ShuJu;
import lombok.AllArgsConstructor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

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

/**
 * @Author：chaiyapeng
 * @Package：com.muyu.cloud.mart.controller
 * @Project：cloud-port
 * @name：ShuJuController
 * @Date：2024/9/8 9:26
 */
@RestController
@RequestMapping("shuju")
@AllArgsConstructor
public class ShuJuController extends BaseController {

    @Resource
    private ShuJuService shuJuService;

    /**
     * 测试连接数据源
     * @param shuJu
     * @return
     */
    @PostMapping("findShuJuList")
    public Result<List<ShuJu>> findShuJuList(@RequestBody ShuJu shuJu){
        return shuJuService.findShuJuList(shuJu);
    }
}
