package com.ruoyi.web.controller.api;
|
|
|
import com.ruoyi.common.basic.PageInfo;
|
import com.ruoyi.common.core.domain.R;
|
import com.ruoyi.common.exception.ServiceException;
|
import com.ruoyi.common.utils.StringUtils;
|
import com.ruoyi.system.dto.TBillDto;
|
import com.ruoyi.system.query.TBillQuery;
|
import com.ruoyi.system.service.TBillService;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.PostMapping;
|
import org.springframework.web.bind.annotation.RequestBody;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RestController;
|
|
/**
|
* <p>
|
* 租金账单 前端控制器
|
* </p>
|
*
|
* @author xiaochen
|
* @since 2025-01-17
|
*/
|
@RestController
|
@RequestMapping("/t-bill")
|
public class TBillController {
|
|
@Autowired
|
TBillService tBillService;
|
|
@PostMapping("list")
|
public R<PageInfo<TBillDto>> list(@RequestBody TBillQuery query){
|
if (StringUtils.isEmpty(query.getUserId())){
|
throw new ServiceException("用户ID不能为空");
|
}
|
PageInfo<TBillDto> pageInfo = tBillService.queryPage(query);
|
return R.ok(pageInfo);
|
}
|
|
|
}
|