package com.muyu.many.datasource.controller;

import com.muyu.common.core.constant.Constants;
import com.muyu.common.core.domain.Result;
import com.muyu.common.core.web.controller.BaseController;
import com.muyu.many.datasource.domain.TestUser;
import com.muyu.many.datasource.service.TestUserService;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.List;

/**
 * @Author: zi run
 * @Date 2024/9/21 0:12
 * @Description 测试用户控制层
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/testUser")
public class TestUserController extends BaseController {

    /**
     * 测试用户业务层
     */
    private final TestUserService testUserService;

    /**
     * 查询测试用户列表
     * @return
     */
    @GetMapping("/selectList")
    public Result<List<TestUser>> selectList() {
        return Result.success(testUserService.list(), Constants.SUCCESS_MESSAGE);
    }
}
