package com.bonus.sharedstation.app.controller;


import com.bonus.common.core.web.domain.AjaxResult;
import com.bonus.sharedstation.web.domain.SharingTools;
import com.bonus.sharedstation.web.dto.SharingToolsDTO;
import com.bonus.sharedstation.web.service.ISharingToolsService;
import io.swagger.annotations.ApiOperation;
import io.swagger.v3.oas.annotations.tags.Tag;
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;

/**
 * @author 云归
 */
@Tag(name = "web-共享工具")
@RestController
@RequestMapping("/information/sharingtools/app")
public class SharingToolsAppController {

    @Resource
    private ISharingToolsService sharingToolsService;

    /**
     * 分页查询
     * @param dto 分页查询
     * @return AjaxResult
     */
    @ApiOperation("共享工具-查询全部数据")
    @PostMapping("/getListApp")
    public AjaxResult getList(@RequestBody SharingToolsDTO dto){
        return sharingToolsService.getListPageApp(dto);

    }

    /**
     * 详情
     * @param dto 详情
     * @return AjaxResult 详情
     */
    @PostMapping(value = "selectById", produces = "application/json; charset=utf-8")
    @ApiOperation("共享工具-查询详情")
    public AjaxResult selectInfoById(@RequestBody SharingTools dto){
        return sharingToolsService.selectInfoById(dto);
    }


}
