package com.red.circle.console.adapter.app.user;


import com.red.circle.console.app.service.app.user.UserCpService;
import com.red.circle.framework.dto.PageResult;
import com.red.circle.framework.web.controller.BaseController;
import com.red.circle.other.inner.model.cmd.user.CpApplyQryCmd;
import com.red.circle.other.inner.model.dto.user.UserCpApplyDTO;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 * CP申请记录 前端控制器.
 * </p>
 *
 * @author pengliang
 * @since 2022-09-22
 */
@RestController
@RequiredArgsConstructor
@RequestMapping("/user-cp-apply")
public class UserCpApplyRestController extends BaseController {

  private final UserCpService userCpService;

  /**
   * cp申请记录.
   */
  @GetMapping("/page")
  public PageResult<UserCpApplyDTO> page(CpApplyQryCmd query) {
    query.setPageQuery(getPage());
    return userCpService.pageCpApply(query);
  }

}
