package com.zcloud.basic.info.web;


import com.zcloud.basic.info.api.UserChangeRecordServiceI;
import com.zcloud.basic.info.dto.*;
import com.alibaba.cola.dto.MultiResponse;
import com.alibaba.cola.dto.PageResponse;
import com.alibaba.cola.dto.Response;
import com.alibaba.cola.dto.SingleResponse;
import com.jjb.saas.framework.auth.model.SSOUser;
import com.jjb.saas.framework.auth.utils.AuthContext;
import com.zcloud.basic.info.dto.clientobject.UserChangeRecordCO;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.AllArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;

/**
 * web-adapter
 *
 * @Author SondonYong
 * @Date 2025-12-02 14:08:18
 */
@Api(tags = "用户变更记录")
@RequestMapping("/${application.gateway}/userChangeRecord")
@RestController
@AllArgsConstructor
public class UserChangeRecordController {
    private final UserChangeRecordServiceI userChangeRecordService;


    @ApiOperation(value = "分页",hidden = true)
    @PostMapping("/list")
    public PageResponse<UserChangeRecordCO> page(@RequestBody UserChangeRecordPageQry qry) {
        return userChangeRecordService.listPage(qry);
    }


    @ApiOperation("变更记录详情详情")
    @PostMapping("/getChangerRecordInfoById")
    public SingleResponse<UserChangeRecordCO> getChangerRecordInfoById(@RequestBody UserChangeRecordInfoQry userChangeRecordInfoQry) {
        return SingleResponse.of(userChangeRecordService.getChangerRecordInfoById(userChangeRecordInfoQry));
    }

}

