Merge remote-tracking branch 'origin/dev' into dev
| | |
| | | []() |
| | | []() |
| | | []() |
| | | []() |
| | | |
| | | > RuoYi-Vue-Plus æ¯åºäº RuoYi-Vue é对 `åå¸å¼é群` åºæ¯å级(ä¸å
¼å®¹åæ¡æ¶) |
| | | |
| | |
| | | <redisson.version>3.16.6</redisson.version> |
| | | <lock4j.version>2.2.1</lock4j.version> |
| | | <dynamic-ds.version>3.5.0</dynamic-ds.version> |
| | | <tlog.version>1.3.5</tlog.version> |
| | | <tlog.version>1.3.6</tlog.version> |
| | | <xxl-job.version>2.3.0</xxl-job.version> |
| | | |
| | | <!-- jdk11 缺失ä¾èµ jaxb--> |
| | |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <artifactId>hutool-core</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-http</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-captcha</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-extra</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-jwt</artifactId> |
| | | <version>${hutool.version}</version> |
| | | </dependency> |
| | | |
| | |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <artifactId>hutool-core</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-http</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-captcha</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-jwt</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-extra</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | |
| | | package com.ruoyi.common.core.domain; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.sql.SqlUtil; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.experimental.Accessors; |
| | |
| | | @ApiModelProperty(value = "æåºçæ¹å", example = "asc,desc") |
| | | private String isAsc; |
| | | |
| | | /** |
| | | * å½åè®°å½èµ·å§ç´¢å¼ é»è®¤å¼ |
| | | */ |
| | | public static final int DEFAULT_PAGE_NUM = 1; |
| | | |
| | | /** |
| | | * æ¯é¡µæ¾ç¤ºè®°å½æ° é»è®¤å¼ é»è®¤æ¥å
¨é¨ |
| | | */ |
| | | public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE; |
| | | |
| | | public <T> Page<T> build() { |
| | | Integer pageNum = ObjectUtil.defaultIfNull(getPageNum(), DEFAULT_PAGE_NUM); |
| | | Integer pageSize = ObjectUtil.defaultIfNull(getPageSize(), DEFAULT_PAGE_SIZE); |
| | | if (pageNum <= 0) { |
| | | pageNum = DEFAULT_PAGE_NUM; |
| | | } |
| | | Page<T> page = new Page<>(pageNum, pageSize); |
| | | OrderItem orderItem = buildOrderItem(); |
| | | if (ObjectUtil.isNotNull(orderItem)) { |
| | | page.addOrder(orderItem); |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | private OrderItem buildOrderItem() { |
| | | // å
¼å®¹å端æåºç±»å |
| | | if ("ascending".equals(isAsc)) { |
| | | isAsc = "asc"; |
| | | } else if ("descending".equals(isAsc)) { |
| | | isAsc = "desc"; |
| | | } |
| | | if (StringUtils.isNotBlank(orderByColumn)) { |
| | | String orderBy = SqlUtil.escapeOrderBySql(orderByColumn); |
| | | orderBy = StringUtils.toUnderScoreCase(orderBy); |
| | | if ("asc".equals(isAsc)) { |
| | | return OrderItem.asc(orderBy); |
| | | } else if ("desc".equals(isAsc)) { |
| | | return OrderItem.desc(orderBy); |
| | | } |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | } |
| | |
| | | import com.fasterxml.jackson.annotation.JsonIgnore; |
| | | import com.fasterxml.jackson.annotation.JsonProperty; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.xss.Xss; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * ç¨æ·è´¦å· |
| | | */ |
| | | @ApiModelProperty(value = "ç¨æ·è´¦å·") |
| | | @Xss(message = "ç¨æ·è´¦å·ä¸è½å
å«èæ¬å符") |
| | | @NotBlank(message = "ç¨æ·è´¦å·ä¸è½ä¸ºç©º") |
| | | @Size(min = 0, max = 30, message = "ç¨æ·è´¦å·é¿åº¦ä¸è½è¶
è¿30个å符") |
| | | private String userName; |
| | |
| | | * ç¨æ·æµç§° |
| | | */ |
| | | @ApiModelProperty(value = "ç¨æ·æµç§°") |
| | | @Xss(message = "ç¨æ·æµç§°ä¸è½å
å«èæ¬å符") |
| | | @Size(min = 0, max = 30, message = "ç¨æ·æµç§°é¿åº¦ä¸è½è¶
è¿30个å符") |
| | | private String nickName; |
| | | |
| | |
| | | package com.ruoyi.common.core.mybatisplus.core; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.utils.BeanCopyUtils; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * èªå®ä¹ Mapper æ¥å£, å®ç° èªå®ä¹æ©å± |
| | |
| | | */ |
| | | int insertAll(@Param("list") Collection<T> batchList); |
| | | |
| | | /** |
| | | * æ ¹æ® ID æ¥è¯¢ |
| | | */ |
| | | default <V> V selectVoById(Serializable id, Class<V> voClass){ |
| | | T obj = this.selectById(id); |
| | | return BeanCopyUtils.copy(obj, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ï¼æ ¹æ®ID æ¹éæ¥è¯¢ï¼ |
| | | */ |
| | | default <V> List<V> selectVoBatchIds(Collection<? extends Serializable> idList, Class<V> voClass){ |
| | | List<T> list = this.selectBatchIds(idList); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return BeanCopyUtils.copyList(list, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ï¼æ ¹æ® columnMap æ¡ä»¶ï¼ |
| | | */ |
| | | default <V> List<V> selectVoByMap(Map<String, Object> map, Class<V> voClass){ |
| | | List<T> list = this.selectByMap(map); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return BeanCopyUtils.copyList(list, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® entity æ¡ä»¶ï¼æ¥è¯¢ä¸æ¡è®°å½ |
| | | */ |
| | | default <V> V selectVoOne(Wrapper<T> wrapper, Class<V> voClass) { |
| | | T obj = this.selectOne(wrapper); |
| | | return BeanCopyUtils.copy(obj, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® entity æ¡ä»¶ï¼æ¥è¯¢å
¨é¨è®°å½ |
| | | */ |
| | | default <V> List<V> selectVoList(Wrapper<T> wrapper, Class<V> voClass) { |
| | | List<T> list = this.selectList(wrapper); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return BeanCopyUtils.copyList(list, voClass); |
| | | } |
| | | |
| | | /** |
| | | * å页æ¥è¯¢VO |
| | | */ |
| | | default <V, P extends IPage<V>> P selectVoPage(IPage<T> page, Wrapper<T> wrapper, Class<V> voClass) { |
| | | IPage<T> pageData = this.selectPage(page, wrapper); |
| | | IPage<V> voPage = new Page<>(pageData.getCurrent(), pageData.getSize(), pageData.getTotal()); |
| | | voPage.setRecords(BeanCopyUtils.copyList(pageData.getRecords(), voClass)); |
| | | return (P) voPage; |
| | | } |
| | | |
| | | } |
| | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfo; |
| | | import com.baomidou.mybatisplus.core.metadata.TableInfoHelper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Assert; |
| | |
| | | |
| | | /** |
| | | * æ ¹æ® ID æ¥è¯¢ |
| | | * |
| | | * @param id 主é®ID |
| | | */ |
| | | @Override |
| | | public V getVoById(Serializable id) { |
| | | T t = getBaseMapper().selectById(id); |
| | | return BeanCopyUtils.copy(t, voClass); |
| | | return getBaseMapper().selectVoById(id, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ï¼æ ¹æ®ID æ¹éæ¥è¯¢ï¼ |
| | | * |
| | | * @param idList 主é®IDå表 |
| | | */ |
| | | @Override |
| | | public List<V> listVoByIds(Collection<? extends Serializable> idList) { |
| | | List<T> list = getBaseMapper().selectBatchIds(idList); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return BeanCopyUtils.copyList(list, voClass); |
| | | return getBaseMapper().selectVoBatchIds(idList, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢ï¼æ ¹æ® columnMap æ¡ä»¶ï¼ |
| | | * |
| | | * @param columnMap è¡¨åæ®µ map 对象 |
| | | */ |
| | | @Override |
| | | public List<V> listVoByMap(Map<String, Object> columnMap) { |
| | | List<T> list = getBaseMapper().selectByMap(columnMap); |
| | | if (list == null) { |
| | | return null; |
| | | } |
| | | return BeanCopyUtils.copyList(list, voClass); |
| | | return getBaseMapper().selectVoByMap(columnMap, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ ¹æ® Wrapperï¼æ¥è¯¢ä¸æ¡è®°å½ <br/> |
| | | * <p>ç»æéï¼å¦ææ¯å¤ä¸ªä¼æåºå¼å¸¸ï¼éæºå䏿¡å ä¸éå¶æ¡ä»¶ wrapper.last("LIMIT 1")</p> |
| | | * |
| | | * @param queryWrapper å®ä½å¯¹è±¡å°è£
æä½ç±» {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper} |
| | | */ |
| | | @Override |
| | | public V getVoOne(Wrapper<T> queryWrapper) { |
| | | T t = getOne(queryWrapper, true); |
| | | return BeanCopyUtils.copy(t, voClass); |
| | | return getBaseMapper().selectVoOne(queryWrapper, voClass); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢å表 |
| | | * |
| | | * @param queryWrapper å®ä½å¯¹è±¡å°è£
æä½ç±» {@link com.baomidou.mybatisplus.core.conditions.query.QueryWrapper} |
| | | */ |
| | | @Override |
| | | public List<V> listVo(Wrapper<T> queryWrapper) { |
| | | List<T> list = getBaseMapper().selectList(queryWrapper); |
| | | if (list == null) { |
| | | return null; |
| | | return getBaseMapper().selectVoList(queryWrapper, voClass); |
| | | } |
| | | return BeanCopyUtils.copyList(list, voClass); |
| | | |
| | | /** |
| | | * 翻页æ¥è¯¢ |
| | | * @deprecated 3.6.0 ç§»é¤ è¯·ä½¿ç¨ {@link #pageVo(IPage, Wrapper)} |
| | | */ |
| | | @Override |
| | | @Deprecated |
| | | public PagePlus<T, V> pageVo(PagePlus<T, V> page, Wrapper<T> queryWrapper) { |
| | | PagePlus<T, V> result = getBaseMapper().selectPage(page, queryWrapper); |
| | | List<V> volist = BeanCopyUtils.copyList(result.getRecords(), voClass); |
| | | result.setRecordsVo(volist); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | |
| | | * @param page 翻页对象 |
| | | * @param queryWrapper å®ä½å¯¹è±¡å°è£
æä½ç±» |
| | | */ |
| | | @Override |
| | | public PagePlus<T, V> pageVo(PagePlus<T, V> page, Wrapper<T> queryWrapper) { |
| | | PagePlus<T, V> result = getBaseMapper().selectPage(page, queryWrapper); |
| | | List<V> volist = BeanCopyUtils.copyList(result.getRecords(), voClass); |
| | | result.setRecordsVo(volist); |
| | | return result; |
| | | public <P extends IPage<V>> P pageVo(IPage<T> page, Wrapper<T> queryWrapper) { |
| | | return getBaseMapper().selectVoPage(page, queryWrapper, voClass); |
| | | } |
| | | |
| | | } |
| | |
| | | * @param <T> æ°æ®åºå®ä½ |
| | | * @param <K> voå®ä½ |
| | | * @author Lion Li |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link com.ruoyi.common.core.domain.PageQuery#build()} |
| | | */ |
| | | @Data |
| | | @Accessors(chain = true) |
| | | @Deprecated |
| | | public class PagePlus<T,K> implements IPage<T> { |
| | | |
| | | /** |
| | |
| | | package com.ruoyi.common.core.page; |
| | | |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | this.total = total; |
| | | } |
| | | |
| | | public static <T> TableDataInfo<T> build(IPage<T> page) { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | rspData.setRows(page.getRecords()); |
| | | rspData.setTotal(page.getTotal()); |
| | | return rspData; |
| | | } |
| | | |
| | | public static <T> TableDataInfo<T> build(List<T> list) { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | rspData.setRows(list); |
| | | rspData.setTotal(list.size()); |
| | | return rspData; |
| | | } |
| | | |
| | | public static <T> TableDataInfo<T> build() { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | | rspData.setMsg("æ¥è¯¢æå"); |
| | | return rspData; |
| | | } |
| | | |
| | | } |
| | |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.http.HttpStatus; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.metadata.OrderItem; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | |
| | | * å页工å
· |
| | | * |
| | | * @author Lion Li |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link PageQuery} ä¸ {@link TableDataInfo} |
| | | */ |
| | | @Deprecated |
| | | @NoArgsConstructor(access = AccessLevel.PRIVATE) |
| | | public class PageUtils { |
| | | |
| | |
| | | /** |
| | | * å½åè®°å½èµ·å§ç´¢å¼ é»è®¤å¼ |
| | | */ |
| | | @Deprecated |
| | | public static final int DEFAULT_PAGE_NUM = 1; |
| | | |
| | | /** |
| | | * æ¯é¡µæ¾ç¤ºè®°å½æ° é»è®¤å¼ é»è®¤æ¥å
¨é¨ |
| | | */ |
| | | @Deprecated |
| | | public static final int DEFAULT_PAGE_SIZE = Integer.MAX_VALUE; |
| | | |
| | | /** |
| | |
| | | * @param <T> domain å®ä½ |
| | | * @param <K> vo å®ä½ |
| | | * @return å页对象 |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link PageUtils#buildPagePlus(PageQuery)} |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link PageQuery#build()} |
| | | * ç±äºä½¿ç¨ Servlet è·ååªè½ä» param è·å çµæ´»æ§éä½ æ
å°ä¼ åæä½äº¤ç»ç¨æ· |
| | | */ |
| | | @Deprecated |
| | |
| | | Integer pageSize = ServletUtils.getParameterToInt(PAGE_SIZE, DEFAULT_PAGE_SIZE); |
| | | String orderByColumn = ServletUtils.getParameter(ORDER_BY_COLUMN); |
| | | String isAsc = ServletUtils.getParameter(IS_ASC); |
| | | if (pageNum <= 0) { |
| | | pageNum = DEFAULT_PAGE_NUM; |
| | | } |
| | | PagePlus<T, K> page = new PagePlus<>(pageNum, pageSize); |
| | | OrderItem orderItem = buildOrderItem(orderByColumn, isAsc); |
| | | if (ObjectUtil.isNotNull(orderItem)) { |
| | | page.addOrder(orderItem); |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | public static <T, K> PagePlus<T, K> buildPagePlus(PageQuery pageQuery) { |
| | | Integer pageNum = ObjectUtil.defaultIfNull(pageQuery.getPageNum(), DEFAULT_PAGE_NUM); |
| | | Integer pageSize = ObjectUtil.defaultIfNull(pageQuery.getPageSize(), DEFAULT_PAGE_SIZE); |
| | | String orderByColumn = pageQuery.getOrderByColumn(); |
| | | String isAsc = pageQuery.getIsAsc(); |
| | | if (pageNum <= 0) { |
| | | pageNum = DEFAULT_PAGE_NUM; |
| | | } |
| | |
| | | * |
| | | * @param <T> domain å®ä½ |
| | | * @return å页对象 |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link PageUtils#buildPage(PageQuery)} |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link PageQuery#build()} |
| | | * ç±äºä½¿ç¨ Servlet è·ååªè½ä» param è·å çµæ´»æ§éä½ æ
å°ä¼ åæä½äº¤ç»ç¨æ· |
| | | */ |
| | | @Deprecated |
| | |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | public static <T> Page<T> buildPage(PageQuery pageQuery) { |
| | | Integer pageNum = ObjectUtil.defaultIfNull(pageQuery.getPageNum(), DEFAULT_PAGE_NUM); |
| | | Integer pageSize = ObjectUtil.defaultIfNull(pageQuery.getPageSize(), DEFAULT_PAGE_SIZE); |
| | | String orderByColumn = pageQuery.getOrderByColumn(); |
| | | String isAsc = pageQuery.getIsAsc(); |
| | | if (pageNum <= 0) { |
| | | pageNum = DEFAULT_PAGE_NUM; |
| | | } |
| | | Page<T> page = new Page<>(pageNum, pageSize); |
| | | OrderItem orderItem = buildOrderItem(orderByColumn, isAsc); |
| | | if (ObjectUtil.isNotNull(orderItem)) { |
| | | page.addOrder(orderItem); |
| | | } |
| | | return page; |
| | | } |
| | | |
| | | |
| | | private static OrderItem buildOrderItem(String orderByColumn, String isAsc) { |
| | | // å
¼å®¹å端æåºç±»å |
| | |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * æå»º MP æ®éå页对象 |
| | | * |
| | | * @param <T> domain å®ä½ |
| | | * @return å页对象 |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link PageQuery#build()} |
| | | * ç±äºä½¿ç¨ Servlet è·ååªè½ä» param è·å çµæ´»æ§éä½ æ
å°ä¼ åæä½äº¤ç»ç¨æ· |
| | | */ |
| | | @Deprecated |
| | | public static <T, K> TableDataInfo<K> buildDataInfo(PagePlus<T, K> page) { |
| | | TableDataInfo<K> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | |
| | | return rspData; |
| | | } |
| | | |
| | | /** |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link TableDataInfo#build(IPage)} |
| | | */ |
| | | @Deprecated |
| | | public static <T> TableDataInfo<T> buildDataInfo(Page<T> page) { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | |
| | | return rspData; |
| | | } |
| | | |
| | | /** |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link TableDataInfo#build(List)} |
| | | */ |
| | | @Deprecated |
| | | public static <T> TableDataInfo<T> buildDataInfo(List<T> list) { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | |
| | | return rspData; |
| | | } |
| | | |
| | | /** |
| | | * @deprecated 3.6.0 å é¤ è¯·ä½¿ç¨ {@link TableDataInfo#build()} |
| | | */ |
| | | @Deprecated |
| | | public static <T> TableDataInfo<T> buildDataInfo() { |
| | | TableDataInfo<T> rspData = new TableDataInfo<>(); |
| | | rspData.setCode(HttpStatus.HTTP_OK); |
| | |
| | | package com.ruoyi.common.utils; |
| | | |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import lombok.AccessLevel; |
| | | import lombok.NoArgsConstructor; |
| | | |
| | | import javax.validation.ConstraintViolation; |
| | | import javax.validation.ConstraintViolationException; |
| | | import javax.validation.Validation; |
| | | import javax.validation.Validator; |
| | | import java.util.Set; |
| | | |
| | |
| | | @NoArgsConstructor(access = AccessLevel.PRIVATE) |
| | | public class ValidatorUtils { |
| | | |
| | | private static final Validator VALID = Validation.buildDefaultValidatorFactory().getValidator(); |
| | | private static final Validator VALID = SpringUtils.getBean(Validator.class); |
| | | |
| | | public static <T> void validate(T object, Class<?>... groups) { |
| | | Set<ConstraintViolation<T>> validate = VALID.validate(object, groups); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.xss; |
| | | |
| | | import javax.validation.Constraint; |
| | | import javax.validation.Payload; |
| | | import java.lang.annotation.ElementType; |
| | | import java.lang.annotation.Retention; |
| | | import java.lang.annotation.RetentionPolicy; |
| | | import java.lang.annotation.Target; |
| | | |
| | | /** |
| | | * èªå®ä¹xssæ ¡éªæ³¨è§£ |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @Retention(RetentionPolicy.RUNTIME) |
| | | @Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.CONSTRUCTOR, ElementType.PARAMETER}) |
| | | @Constraint(validatedBy = {XssValidator.class}) |
| | | public @interface Xss { |
| | | |
| | | String message() default "ä¸å
许任ä½èæ¬è¿è¡"; |
| | | |
| | | Class<?>[] groups() default {}; |
| | | |
| | | Class<? extends Payload>[] payload() default {}; |
| | | |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.common.xss; |
| | | |
| | | import cn.hutool.core.util.ReUtil; |
| | | import cn.hutool.http.HtmlUtil; |
| | | |
| | | import javax.validation.ConstraintValidator; |
| | | import javax.validation.ConstraintValidatorContext; |
| | | |
| | | /** |
| | | * èªå®ä¹xssæ ¡éªæ³¨è§£å®ç° |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | public class XssValidator implements ConstraintValidator<Xss, String> { |
| | | |
| | | @Override |
| | | public boolean isValid(String value, ConstraintValidatorContext constraintValidatorContext) { |
| | | return !ReUtil.contains(HtmlUtil.RE_HTML_MARK, value); |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "æ°å¢æ¹éæ¹æ³") |
| | | @PostMapping("/add") |
| | | // @DataSource(DataSourceType.SLAVE) |
| | | // @DS("slave") |
| | | public AjaxResult<Void> add() { |
| | | List<TestDemo> list = new ArrayList<>(); |
| | | for (int i = 0; i < 1000; i++) { |
| | |
| | | */ |
| | | @ApiOperation(value = "æ°å¢ææ´æ°æ¹éæ¹æ³") |
| | | @PostMapping("/addOrUpdate") |
| | | // @DataSource(DataSourceType.SLAVE) |
| | | // @DS("slave") |
| | | public AjaxResult<Void> addOrUpdate() { |
| | | List<TestDemo> list = new ArrayList<>(); |
| | | for (int i = 0; i < 1000; i++) { |
| | |
| | | */ |
| | | @ApiOperation(value = "å 餿¹éæ¹æ³") |
| | | @DeleteMapping() |
| | | // @DataSource(DataSourceType.SLAVE) |
| | | // @DS("slave") |
| | | public AjaxResult<Void> remove() { |
| | | return toAjax(iTestDemoService.remove(new LambdaQueryWrapper<TestDemo>() |
| | | .eq(TestDemo::getOrderNum, -1L)) ? 1 : 0); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.demo.domain.TestDemo; |
| | | import com.ruoyi.demo.domain.bo.TestDemoBo; |
| | |
| | | @Override |
| | | public TableDataInfo<TestDemoVo> queryPageList(TestDemoBo bo, PageQuery pageQuery) { |
| | | LambdaQueryWrapper<TestDemo> lqw = buildQueryWrapper(bo); |
| | | PagePlus<TestDemo, TestDemoVo> result = pageVo(PageUtils.buildPagePlus(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(result); |
| | | Page<TestDemoVo> result = pageVo(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(result); |
| | | } |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public TableDataInfo<TestDemoVo> customPageList(TestDemoBo bo, PageQuery pageQuery) { |
| | | LambdaQueryWrapper<TestDemo> lqw = buildQueryWrapper(bo); |
| | | Page<TestDemoVo> result = baseMapper.customPageList(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(result); |
| | | Page<TestDemoVo> result = baseMapper.customPageList(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(result); |
| | | } |
| | | |
| | | @Override |
| | |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-resources-plugin</artifactId> |
| | | <version>2.6</version> |
| | | <configuration> |
| | | <nonFilteredFileExtensions> |
| | | <nonFilteredFileExtension>ttf</nonFilteredFileExtension> |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.JsonUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.file.FileUtils; |
| | |
| | | |
| | | @Override |
| | | public TableDataInfo<GenTable> selectPageGenTableList(GenTable genTable, PageQuery pageQuery) { |
| | | Page<GenTable> page = baseMapper.selectPageGenTableList(PageUtils.buildPage(pageQuery), genTable); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<GenTable> page = baseMapper.selectPageGenTableList(pageQuery.build(), genTable); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | @Override |
| | | public TableDataInfo<GenTable> selectPageDbTableList(GenTable genTable, PageQuery pageQuery) { |
| | | Page<GenTable> page = baseMapper.selectPageDbTableList(PageUtils.buildPage(pageQuery), genTable); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<GenTable> page = baseMapper.selectPageDbTableList(pageQuery.build(), genTable); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | #if($table.crud || $table.sub) |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | #end |
| | |
| | | @Override |
| | | public TableDataInfo<${ClassName}Vo> queryPageList(${ClassName}Bo bo, PageQuery pageQuery) { |
| | | LambdaQueryWrapper<${ClassName}> lqw = buildQueryWrapper(bo); |
| | | PagePlus<${ClassName}, ${ClassName}Vo> result = pageVo(PageUtils.buildPagePlus(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(result); |
| | | Page<${ClassName}Vo> result = pageVo(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(result); |
| | | } |
| | | #end |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.domain.BaseEntity; |
| | | import com.ruoyi.common.xss.Xss; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.Size; |
| | | |
| | | |
| | | /** |
| | | * éç¥å
¬å表 sys_notice |
| | |
| | | /** |
| | | * å
¬åæ é¢ |
| | | */ |
| | | @Xss(message = "å
¬åæ é¢ä¸è½å
å«èæ¬å符") |
| | | @ApiModelProperty(value = "å
¬åæ é¢") |
| | | @NotBlank(message = "å
¬åæ é¢ä¸è½ä¸ºç©º") |
| | | @Size(min = 0, max = 50, message = "å
¬åæ é¢ä¸è½è¶
è¿50个å符") |
| | |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.ValidatorUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | | import com.ruoyi.system.domain.vo.SysUserImportVo; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | |
| | | // éªè¯æ¯å¦åå¨è¿ä¸ªç¨æ· |
| | | if (StringUtils.isNull(user)) { |
| | | user = BeanUtil.toBean(userVo, SysUser.class); |
| | | ValidatorUtils.validate(user); |
| | | user.setPassword(password); |
| | | user.setCreateBy(operName); |
| | | userService.insertUser(user); |
| | | successNum++; |
| | | successMsg.append("<br/>").append(successNum).append("ãè´¦å· ").append(user.getUserName()).append(" 导å
¥æå"); |
| | | } else if (isUpdateSupport) { |
| | | ValidatorUtils.validate(user); |
| | | user.setUpdateBy(operName); |
| | | userService.updateUser(user); |
| | | successNum++; |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.service.ConfigService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RedisUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.SysConfig; |
| | |
| | | .like(StringUtils.isNotBlank(config.getConfigKey()), SysConfig::getConfigKey, config.getConfigKey()) |
| | | .between(params.get("beginTime") != null && params.get("endTime") != null, |
| | | SysConfig::getCreateTime, params.get("beginTime"), params.get("endTime")); |
| | | Page<SysConfig> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysConfig> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.domain.entity.SysDictData; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RedisUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | |
| | | .like(StringUtils.isNotBlank(dictData.getDictLabel()), SysDictData::getDictLabel, dictData.getDictLabel()) |
| | | .eq(StringUtils.isNotBlank(dictData.getStatus()), SysDictData::getStatus, dictData.getStatus()) |
| | | .orderByAsc(SysDictData::getDictSort); |
| | | Page<SysDictData> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysDictData> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.service.DictService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RedisUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.mapper.SysDictDataMapper; |
| | |
| | | .like(StringUtils.isNotBlank(dictType.getDictType()), SysDictType::getDictType, dictType.getDictType()) |
| | | .between(params.get("beginTime") != null && params.get("endTime") != null, |
| | | SysDictType::getCreateTime, params.get("beginTime"), params.get("endTime")); |
| | | Page<SysDictType> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysDictType> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.service.LogininforService; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.ServletUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.ip.AddressUtils; |
| | |
| | | if(StringUtils.isBlank(pageQuery.getOrderByColumn())) { |
| | | pageQuery.setOrderByColumn("info_id").setIsAsc("desc"); |
| | | } |
| | | Page<SysLogininfor> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysLogininfor> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.SysNotice; |
| | | import com.ruoyi.system.mapper.SysNoticeMapper; |
| | |
| | | .like(StringUtils.isNotBlank(notice.getNoticeTitle()), SysNotice::getNoticeTitle, notice.getNoticeTitle()) |
| | | .eq(StringUtils.isNotBlank(notice.getNoticeType()), SysNotice::getNoticeType, notice.getNoticeType()) |
| | | .like(StringUtils.isNotBlank(notice.getCreateBy()), SysNotice::getCreateBy, notice.getCreateBy()); |
| | | Page<SysNotice> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysNotice> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.service.OperLogService; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.ip.AddressUtils; |
| | | import com.ruoyi.system.domain.SysOperLog; |
| | |
| | | if(StringUtils.isBlank(pageQuery.getOrderByColumn())) { |
| | | pageQuery.setOrderByColumn("oper_id").setIsAsc("desc"); |
| | | } |
| | | Page<SysOperLog> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysOperLog> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.google.common.collect.Lists; |
| | | import com.ruoyi.common.constant.UserConstants; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.JsonUtils; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.RedisUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.oss.constant.OssConstant; |
| | |
| | | @Override |
| | | public TableDataInfo<SysOssConfigVo> queryPageList(SysOssConfigBo bo, PageQuery pageQuery) { |
| | | LambdaQueryWrapper<SysOssConfig> lqw = buildQueryWrapper(bo); |
| | | PagePlus<SysOssConfig, SysOssConfigVo> result = pageVo(PageUtils.buildPagePlus(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(result); |
| | | Page<SysOssConfigVo> result = pageVo(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(result); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.common.core.domain.PageQuery; |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.PagePlus; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.oss.entity.UploadResult; |
| | | import com.ruoyi.oss.factory.OssFactory; |
| | |
| | | @Override |
| | | public TableDataInfo<SysOssVo> queryPageList(SysOssBo bo, PageQuery pageQuery) { |
| | | LambdaQueryWrapper<SysOss> lqw = buildQueryWrapper(bo); |
| | | PagePlus<SysOss, SysOssVo> result = pageVo(PageUtils.buildPagePlus(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(result); |
| | | Page<SysOssVo> result = pageVo(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(result); |
| | | } |
| | | |
| | | private LambdaQueryWrapper<SysOss> buildQueryWrapper(SysOssBo bo) { |
| | |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.system.domain.SysPost; |
| | | import com.ruoyi.system.domain.SysUserPost; |
| | |
| | | .like(StringUtils.isNotBlank(post.getPostCode()), SysPost::getPostCode, post.getPostCode()) |
| | | .eq(StringUtils.isNotBlank(post.getStatus()), SysPost::getStatus, post.getStatus()) |
| | | .like(StringUtils.isNotBlank(post.getPostName()), SysPost::getPostName, post.getPostName()); |
| | | Page<SysPost> page = page(PageUtils.buildPage(pageQuery), lqw); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysPost> page = page(pageQuery.build(), lqw); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.mybatisplus.core.ServicePlusImpl; |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | |
| | | |
| | | @Override |
| | | public TableDataInfo<SysRole> selectPageRoleList(SysRole role, PageQuery pageQuery) { |
| | | Page<SysRole> page = baseMapper.selectPageRoleList(PageUtils.buildPage(pageQuery), role); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysRole> page = baseMapper.selectPageRoleList(pageQuery.build(), role); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.common.core.page.TableDataInfo; |
| | | import com.ruoyi.common.core.service.UserService; |
| | | import com.ruoyi.common.exception.ServiceException; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.common.utils.SecurityUtils; |
| | | import com.ruoyi.common.utils.StringUtils; |
| | | import com.ruoyi.common.utils.spring.SpringUtils; |
| | |
| | | |
| | | @Override |
| | | public TableDataInfo<SysUser> selectPageUserList(SysUser user, PageQuery pageQuery) { |
| | | Page<SysUser> page = baseMapper.selectPageUserList(PageUtils.buildPage(pageQuery), user); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysUser> page = baseMapper.selectPageUserList(pageQuery.build(), user); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public TableDataInfo<SysUser> selectAllocatedList(SysUser user, PageQuery pageQuery) { |
| | | Page<SysUser> page = baseMapper.selectAllocatedList(PageUtils.buildPage(pageQuery), user); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysUser> page = baseMapper.selectAllocatedList(pageQuery.build(), user); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public TableDataInfo<SysUser> selectUnallocatedList(SysUser user, PageQuery pageQuery) { |
| | | Page<SysUser> page = baseMapper.selectUnallocatedList(PageUtils.buildPage(pageQuery), user); |
| | | return PageUtils.buildDataInfo(page); |
| | | Page<SysUser> page = baseMapper.selectUnallocatedList(pageQuery.build(), user); |
| | | return TableDataInfo.build(page); |
| | | } |
| | | |
| | | /** |