package cn.com.victorysoft.business.cyyzs.controller;

import cn.com.victorysoft.business.cyyzs.entity.StaticData;
import cn.com.victorysoft.business.cyyzs.param.StaticDataParam;
import cn.com.victorysoft.business.cyyzs.service.StaticDataService;

import com.github.pagehelper.PageInfo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.*;

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

@Api(tags = "静态数据")
@RestController
@RequestMapping("cyyzs/static")
public class StaticDataController {

    @Resource
    private StaticDataService staticDataService;

    @GetMapping("/index")
    @ApiOperation("查询静态数据")
    public PageInfo<StaticData> selectList(StaticDataParam param) {
        return staticDataService.selectList(param);
    }

    @PutMapping("/update")
    @ApiOperation("更新")
    public int update(@RequestBody StaticData param) {
        return staticDataService.update(param);
    }

}
