商品模块代码提交
This commit is contained in:
@@ -1,12 +0,0 @@
|
||||
package com.czg.core.service;
|
||||
|
||||
import com.mybatisflex.core.service.IService;
|
||||
|
||||
/**
|
||||
* 自定义的服务基类接口
|
||||
*
|
||||
* @author Cashier
|
||||
*/
|
||||
public interface IBaseService<T> extends IService<T> {
|
||||
|
||||
}
|
||||
@@ -1,27 +1,24 @@
|
||||
package com.czg.core.service.impl;
|
||||
package com.czg.utils;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.czg.core.page.PageDomain;
|
||||
import com.czg.core.page.TableSupport;
|
||||
import com.czg.core.service.IBaseService;
|
||||
import com.czg.utils.SqlUtil;
|
||||
import com.mybatisflex.core.BaseMapper;
|
||||
import com.mybatisflex.core.query.QueryWrapper;
|
||||
import com.mybatisflex.spring.service.impl.ServiceImpl;
|
||||
import lombok.experimental.UtilityClass;
|
||||
|
||||
/**
|
||||
* 自定义的服务基类接口实现
|
||||
*
|
||||
* @author Cashier
|
||||
* 分页工具类
|
||||
* @author tankaikai
|
||||
* @since 2025-02-11 16:56
|
||||
*/
|
||||
public class BaseServiceImpl<M extends BaseMapper<T>, T> extends ServiceImpl<M , T> implements IBaseService<T> {
|
||||
|
||||
@UtilityClass
|
||||
public class PageUtil {
|
||||
/**
|
||||
* 构造基本查询条件
|
||||
* 构造分页排序条件
|
||||
* @return QueryWrapper
|
||||
*/
|
||||
protected QueryWrapper buildPageQueryWrapper(){
|
||||
QueryWrapper queryWrapper = query();
|
||||
public QueryWrapper buildPageQueryWrapper(){
|
||||
QueryWrapper queryWrapper = QueryWrapper.create();
|
||||
PageDomain pageDomain = TableSupport.buildPageRequest();
|
||||
if (StrUtil.isNotEmpty(pageDomain.getOrderBy())) {
|
||||
String orderBy = SqlUtil.escapeOrderBySql(pageDomain.getOrderBy());
|
||||
Reference in New Issue
Block a user