You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.5 KiB
Java
38 lines
1.5 KiB
Java
package com.glxp.api.controller.system;
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
import com.github.pagehelper.PageInfo;
|
|
import com.glxp.api.common.res.BaseResponse;
|
|
import com.glxp.api.common.util.ResultVOUtils;
|
|
import com.glxp.api.entity.system.SysMsgTodoEntity;
|
|
import com.glxp.api.req.system.SysMsgTodoQuery;
|
|
import com.glxp.api.res.PageSimpleResponse;
|
|
import com.glxp.api.service.system.SysMsgTodoService;
|
|
import com.glxp.api.vo.system.SysMsgTodoVo;
|
|
import lombok.RequiredArgsConstructor;
|
|
import org.springframework.web.bind.annotation.PostMapping;
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
import org.springframework.web.bind.annotation.RestController;
|
|
|
|
import java.util.List;
|
|
|
|
@RestController
|
|
@RequiredArgsConstructor
|
|
public class SysMsgTodoController {
|
|
|
|
private final SysMsgTodoService sysMsgTodoService;
|
|
|
|
@PostMapping("/spms/sysMsgTodo/page")
|
|
public BaseResponse page(@RequestBody SysMsgTodoQuery query) {
|
|
List<SysMsgTodoVo> msgTodoVos = sysMsgTodoService.pageOfVo(query);
|
|
PageInfo<SysMsgTodoVo> page = new PageInfo<>(msgTodoVos);
|
|
PageSimpleResponse<SysMsgTodoVo> simpleResponse = new PageSimpleResponse<>();
|
|
simpleResponse.setTotal(page.getTotal());
|
|
simpleResponse.setList(BeanUtil.copyToList(msgTodoVos, SysMsgTodoVo.class));
|
|
return ResultVOUtils.success(simpleResponse);
|
|
}
|
|
|
|
}
|