| | |
| | | @GetMapping("/page") |
| | | @ApiOperationSupport(order = 3) |
| | | @ApiOperation(value = "分页", notes = "传入attach") |
| | | public R<IPage<AttachVO>> page(AttachVO attach, Query query) { |
| | | IPage<AttachVO> pages = attachService.selectAttachPage(Condition.getPage(query), attach); |
| | | public R<IPage<AttachVO>> page(AttachVO attach, Query query,String deptid, String type,String cardid) { |
| | | IPage<AttachVO> pages = attachService.selectAttachPage(Condition.getPage(query), attach,type,cardid); |
| | | return R.data(pages); |
| | | } |
| | | |
| | |
| | | * @param attach |
| | | * @return |
| | | */ |
| | | List<AttachVO> selectAttachPage(IPage page, AttachVO attach); |
| | | List<AttachVO> selectAttachPage(IPage page, AttachVO attach,String type,String cardid); |
| | | |
| | | } |
| | |
| | | |
| | | |
| | | <select id="selectAttachPage" resultMap="attachResultMap"> |
| | | select * from blade_attach where is_deleted = 0 |
| | | select * from blade_attach where is_deleted = 0 and cardid=#{cardid} and type=#{type} |
| | | <if test="attach.originalName!='' and attach.originalName!=null"> |
| | | and original_name like concat('%', #{attach.originalName},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | * @param attach |
| | | * @return |
| | | */ |
| | | IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach); |
| | | IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach,String type,String cardid); |
| | | |
| | | } |
| | |
| | | public class AttachServiceImpl extends BaseServiceImpl<AttachMapper, Attach> implements IAttachService { |
| | | |
| | | @Override |
| | | public IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach) { |
| | | return page.setRecords(baseMapper.selectAttachPage(page, attach)); |
| | | public IPage<AttachVO> selectAttachPage(IPage<AttachVO> page, AttachVO attach,String type,String cardid) { |
| | | return page.setRecords(baseMapper.selectAttachPage(page, attach,type,cardid)); |
| | | } |
| | | |
| | | } |