package com.wyu.online.dao; import com.wyu.online.utils.C3poUtils; import com.wyu.online.utils.DaoConnection; import java.sql.ResultSet; import java.sql.SQLException; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; /** * Created by Administrator on 2018/7/17 */ public class ExamDao { public List<Map<String, String>> getPaperContentsById(String paperid) { List<Map<String, String>> paperContents = new ArrayList<>(); String sql = "select * from paper_content where paper_id=?"; try { ResultSet rs = C3poUtils.getPreparedStatement(sql, new Object[] { paperid }).executeQuery(); while (rs.next()) { Map<String,String> map = new HashMap<>(); map.put("id",rs.getString("id")); map.put("paper_id",rs.getString("paper_id")); map.put("title",rs.getString("title")); map.put("option1",rs.getString("option1")); map.put("option2",rs.getString("option2")); map.put("option3",rs.getString("option3")); map.put("option4",rs.getString("option4")); paperContents.add(map); } } catch (SQLException e) { e.printStackTrace(); } return paperContents; } }


docnnxxy688
3月16日
暂无贡献等级
PLVAE_514 LV2
3月7日
konpaku LV1
2024年12月24日
微信网友_7294439741132800 LV1
2024年12月13日
ma406805131 LV19
2024年12月9日
chinajy LV2
2024年12月8日
Daima000 LV4
2024年12月3日
120_wu LV4
2024年12月3日
asdxvfvfs
2024年12月3日
暂无贡献等级
微信网友_7261917164982272
2024年11月20日
暂无贡献等级