package org.jeecg.modules.system.app.controller;


import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.apache.poi.ss.formula.functions.T;
import org.apache.shiro.SecurityUtils;
import org.apache.shiro.subject.Subject;
import org.jeecg.common.api.vo.Result;
import org.jeecg.common.system.vo.LoginUser;
import org.jeecg.modules.system.app.dto.FindPageCUserInfoRequestDTO;
import org.jeecg.modules.system.app.dto.FindPageCUserInfoResponseDTO;
import org.jeecg.modules.system.service.ISysUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import javax.servlet.http.HttpServletRequest;

/**
 * @Description: 家庭成员信息表
 * @Author: zx
 * @Date:   2025-07-07
 * @Version: V1.0
 */
@Tag(name="c端用户信息表")
@RestController
@RequestMapping("/cUserInfo")
@Slf4j
@AllArgsConstructor
public class CUserInfoController {

    private final ISysUserService sysUserService;

    @Operation(summary="家庭成员信息表-分页列表查询")
    @GetMapping(value = "/list")
    public Result<IPage<FindPageCUserInfoResponseDTO>> queryPageList(FindPageCUserInfoRequestDTO findPageCUserInfoRequestDTO,
                                                                     @RequestParam(name="pageNo", defaultValue="1") Integer pageNo,
                                                                     @RequestParam(name="pageSize", defaultValue="10") Integer pageSize,
                                                                     HttpServletRequest req) {
        return Result.OK(sysUserService.findByCUserInfo(pageNo,pageSize,findPageCUserInfoRequestDTO));
    }
}
