package cn.aagro.pp.module.bpm.dal.mysql.definition;


import cn.aagro.pp.module.bpm.controller.admin.definition.vo.form.BpmFormPageReqVO;
import cn.aagro.pp.module.bpm.dal.dataobject.definition.BpmFormDO;
import cn.aagro.pp.framework.common.pojo.PageResult;
import cn.aagro.pp.framework.mybatis.core.mapper.BaseMapperX;
import cn.aagro.pp.framework.mybatis.core.query.QueryWrapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 动态表单 Mapper
 *
 * @author 风里雾里
 */
@Mapper
public interface BpmFormMapper extends BaseMapperX<BpmFormDO> {

    default PageResult<BpmFormDO> selectPage(BpmFormPageReqVO reqVO) {
        return selectPage(reqVO, new QueryWrapperX<BpmFormDO>()
                .likeIfPresent("name", reqVO.getName())
                .orderByDesc("id"));
    }

}
