package com.zhongzheng.controller;

import com.zhongzheng.common.core.controller.BaseController;
import com.zhongzheng.common.core.domain.AjaxResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;


@Api(tags ="测试模块")
@RestController
@RequestMapping("/v1/test")
public class TestController extends BaseController
{
    private final static Map<Integer, String> users = new LinkedHashMap<Integer, String>();
    {
        users.put(1, "123456");
        users.put(2, "654321");
    }

    @ApiOperation("获取用户列表")
    @GetMapping("/list")
    public AjaxResult userList()
    {
        List<String> userList = new ArrayList<String>(users.values());
        return AjaxResult.success(userList);
    }

}
