package com.cm.common.plugin.dao.dynamic;

import com.cm.common.exception.SaveException;
import com.cm.common.exception.SearchException;
import com.cm.common.exception.UpdateException;
import com.cm.common.plugin.pojo.dtos.dynamic.DynamicFormDTO;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * When you feel like quitting. Think about why you started
 * 当你想要放弃的时候，想想当初你为何开始
 *
 * @ClassName: IDynamicFormDao
 * @Description: 动态表单
 * @Author: WangGeng
 * @Date: 2019/12/2 4:05 下午
 * @Version: 1.0
 **/
@Repository
public interface IDynamicFormDao {

    /**
     * 保存动态表单
     *
     * @param params
     * @throws SaveException
     */
    void saveDynamicForm(Map<String, Object> params) throws SaveException;

    /**
     * 更新动态表单
     *
     * @param params
     * @throws UpdateException
     */
    void updateDynamicForm(Map<String, Object> params) throws UpdateException;

    /**
     * 动态表单详情
     *
     * @param params
     * @return
     * @throws SearchException
     */
    List<DynamicFormDTO> listDynamicForm(Map<String, Object> params) throws SearchException;
}
