package com.jeelowcode.service.bpm.mapper;


import com.baomidou.dynamic.datasource.annotation.DS;
import com.jeelowcode.framework.global.JeeLowCodeBaseConstant;
import com.jeelowcode.service.bpm.controller.vo.form.BpmFormPageReqVO;
import com.jeelowcode.service.bpm.entity.BpmFormDO;
import com.jeelowcode.tool.framework.common.pojo.PageResult;
import com.jeelowcode.tool.framework.mybatis.core.mapper.BaseMapperX;
import com.jeelowcode.tool.framework.mybatis.core.query.QueryWrapperX;
import org.apache.ibatis.annotations.Mapper;

/**
 * 动态表单 Mapper
 *
 * @author 风里雾里
 */
@DS(JeeLowCodeBaseConstant.DS_JEELOWCODE)
@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"));
    }

}
