package com.microservices.dms.achievementLibrary.controller;

import com.microservices.common.core.web.controller.BaseController;
import com.microservices.common.core.web.page.TableDataInfo;
import com.microservices.dms.achievementLibrary.domain.TokenListVo;
import com.microservices.dms.achievementLibrary.service.IAchievementsService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
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;

@RestController
@RequestMapping("/blockChain")
@Api(tags = "数据产权子系统")
public class BlockChainController extends BaseController {

    @Autowired
    private IAchievementsService achievementsService;

    @GetMapping("/projectTokenList")
    @ApiOperation(value = "项目token列表")
    public TableDataInfo projectTokenList() {
        startPage();
        List<TokenListVo> list = achievementsService.projectTokenList();
        return getDataTable(list);
    }
}