package com.limap.controller.manager;

import com.limap.common.core.controller.BaseController;
import com.limap.common.core.domain.AjaxResult;
import com.limap.common.core.page.TableDataInfo;
import com.limap.common.enums.BusinessType;
import com.limap.common.log.annotation.Log;
import com.limap.common.utils.poi.ExcelUtil;
import com.limap.core.basic.domain.BasicProfitSharing;
import com.limap.core.basic.service.IBasicProfitSharingService;
import com.limap.system.AppUserVO;
import com.limap.system.service.ISysUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletResponse;
import java.util.Arrays;
import java.util.List;

/**
 * 基础分润信息Controller
 *
 * @author jjb
 * @date 2025-04-11
 */
@Api(tags = "大屏用户信息管理")
@RestController
@RequestMapping("/basic/user")
public class ScreenUserController extends BaseController {
    @Autowired
    private ISysUserService appUserService;

    /**
     * 查询基础分润信息列表
     */
    @ApiOperation("app用户列表")
    @GetMapping("/list")
    public TableDataInfo list(AppUserVO appUserVO) {
        startPage();
        List<AppUserVO> list = appUserService.selectAppUserList(appUserVO);
        return getDataTable(list);
    }



    /**
     * 修改基础分润信息
     */
    @ApiOperation("修改app用户信息")
    @Log(title = "修改app用户信息", businessType = BusinessType.UPDATE)
    @PutMapping
    public AjaxResult edit(@RequestBody AppUserVO appUserVO) {
        return toAjax(appUserService.updateAppUser(appUserVO));
    }

}
