package com.jfinal.club._admin.ques;

import com.jfinal.club.common.model.Doctype;

import java.util.List;

/**
 * @ProjectName: jfinal-club
 * @Package: com.jfinal.club._admin.ques
 * @ClassName: DocTypeService
 * @Author: Jzdsh
 * @Description:
 * @Date: 2020/3/31 14:40
 * @Version: 1.0
 */
public class DocTypeService {

    Doctype dao = new Doctype( ).dao( );

    /**
     * @param type 普通 1 精品 2  3词条 4问答
     * @return
     */
    public List< Doctype > getByType(int type) {
        try {
            return dao.find("select * from doctype where type = ?", type);
        } catch (Exception e) {
            e.printStackTrace( );
        }
        return null;
    }
}
