package com.ruoyi.applet.contoller;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.model.domain.UserBindingConfig;
import com.ruoyi.model.service.IAppInviteService;
import com.ruoyi.model.service.IUserBindingConfigService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@Api(description = "用户绑定配置")
@RestController
@RequestMapping("/applet/userBing")
public class AppletUserBingController extends BaseController {

    @Autowired
    private IUserBindingConfigService userBindingConfigService;

    @Autowired
    private IAppInviteService iAppInviteService;

    @ApiOperation("查询用户绑定配置列表")
    @GetMapping("/list")
    public TableDataInfo list(@RequestBody UserBindingConfig userBindingConfig){
        return getDataTable(userBindingConfigService.selectUserBindingConfigList(userBindingConfig));
    }

    @ApiOperation("查询用户绑定配置列表")
    @GetMapping("/selectAppInviteById/{id}")
    public AjaxResult selectAppInviteById(@PathVariable Long id){
        return AjaxResult.success(iAppInviteService.selectAppInviteById(id));
    }
}
