|
10 | 10 | <result property="subscore" column="subScore" jdbcType="INTEGER"/>
|
11 | 11 | <result property="totalscore" column="totalScore" jdbcType="INTEGER"/>
|
12 | 12 | <result property="course" column="course" jdbcType="VARCHAR"/>
|
| 13 | + <result property="answerdate" column="answerDate" jdbcType="VARCHAR"/> |
| 14 | + |
13 | 15 | </resultMap>
|
14 | 16 |
|
15 | 17 |
|
|
27 | 29 | <result property="grade" column="grade" jdbcType="VARCHAR"/>
|
28 | 30 | <result property="term" column="term" jdbcType="VARCHAR"/>
|
29 | 31 | <result property="description" column="description" jdbcType="VARCHAR"/>
|
| 32 | + <result property="answerdate" column="answerDate" jdbcType="VARCHAR"/> |
| 33 | + <result property="exname" column="exname" jdbcType="VARCHAR"/> |
| 34 | + |
30 | 35 | <association property="student" javaType="com.exam.entity.Student">
|
31 | 36 | <result property="stuid" column="stuId" jdbcType="INTEGER"/>
|
32 | 37 | <result property="stuname" column="stuName" jdbcType="VARCHAR"/>
|
|
42 | 47 | <!--查询所有-->
|
43 | 48 | <select id="findAll" resultMap="ScoreResultMap">
|
44 | 49 | select
|
45 |
| - scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,e.grade as grade,e.term as term,e.description as description, |
| 50 | + scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,answerDate,e.exname as exname,e.grade as grade,e.term as term,e.description as description, |
46 | 51 | stu.sex,stu.tel,stu.stuname,cl.calName as claname,ma.major as major,co.couName as course,i.instituName as instituname
|
47 | 52 | from score sc,exam e ,student stu,institution i,course co,major ma,clazz cl
|
48 | 53 | where e.examId=sc.examId and sc.stuId=stu.stuId and stu.clazzId=cl.clazzId and cl.majorId=ma.majorId
|
|
52 | 57 | <!--查询单个-->
|
53 | 58 | <select id="queryById" resultMap="ScoreResultMap">
|
54 | 59 | select
|
55 |
| - scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,e.grade as grade,e.term as term,e.description as description, |
| 60 | + scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,answerDate,e.exname as exname,e.grade as grade,e.term as term,e.description as description, |
56 | 61 | stu.sex,stu.tel,stu.stuname,cl.calName as claname,ma.major as major,co.couName as course,i.instituName as instituname
|
57 | 62 | from score sc,exam e ,student stu,institution i,course co,major ma,clazz cl
|
58 | 63 | where e.examId=sc.examId and sc.stuId=stu.stuId and stu.clazzId=cl.clazzId and cl.majorId=ma.majorId
|
|
63 | 68 | <!--查询单个-->
|
64 | 69 | <select id="queryByStuId" resultMap="ScoreResultMap">
|
65 | 70 | select
|
66 |
| - scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,e.grade as grade,e.term as term,e.description as description, |
| 71 | + scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,answerDate,e.exname as exname,e.grade as grade,e.term as term,e.description as description, |
67 | 72 | stu.sex,stu.tel,stu.stuname,cl.calName as claname,ma.major as major,co.couName as course,i.instituName as instituname
|
68 | 73 | from score sc,exam e ,student stu,institution i,course co,major ma,clazz cl
|
69 | 74 | where e.examId=sc.examId and sc.stuId=stu.stuId and stu.clazzId=cl.clazzId and cl.majorId=ma.majorId
|
|
74 | 79 | <!--查询单个-->
|
75 | 80 | <select id="queryByExamId" resultMap="ScoreResultMap">
|
76 | 81 | select
|
77 |
| - scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,e.grade as grade,e.term as term,e.description as description, |
| 82 | + scoreId, sc.examId, sc.stuId, objScore, subScore, totalScore,answerDate,e.exname as exname,e.grade as grade,e.term as term,e.description as description, |
78 | 83 | stu.sex,stu.tel,stu.stuname,cl.calName as claname,ma.major as major,co.couName as course,i.instituName as instituname
|
79 | 84 | from score sc,exam e ,student stu,institution i,course co,major ma,clazz cl
|
80 | 85 | where e.examId=sc.examId and sc.stuId=stu.stuId and stu.clazzId=cl.clazzId and cl.majorId=ma.majorId
|
|
85 | 90 | <!--查询指定行数据-->
|
86 | 91 | <select id="queryAllByLimit" resultMap="ScoreMap">
|
87 | 92 | select
|
88 |
| - scoreId, examId, stuId, course, objScore, subScore, totalScore |
| 93 | + scoreId, examId, stuId, course, objScore, subScore, totalScore,answerDate |
89 | 94 | from cqc_exam.score
|
90 | 95 | limit #{offset}, #{limit}
|
91 | 96 | </select>
|
92 | 97 |
|
93 | 98 | <!--通过实体作为筛选条件查询-->
|
94 | 99 | <select id="queryAll" resultMap="ScoreMap">
|
95 | 100 | select
|
96 |
| - scoreId, examId, stuId, course, objScore, subScore, totalScore |
| 101 | + scoreId, examId, stuId, course, objScore, subScore, totalScore,answerDate |
97 | 102 | from cqc_exam.score
|
98 | 103 | <where>
|
99 | 104 | <if test="scoreid != null">
|
|
117 | 122 | <if test="totalscore != null">
|
118 | 123 | and totalScore = #{totalscore}
|
119 | 124 | </if>
|
| 125 | + <if test="answerdate != null"> |
| 126 | + and answerDate = #{answerdate} |
| 127 | + </if> |
| 128 | + |
120 | 129 | </where>
|
121 | 130 | </select>
|
122 | 131 |
|
123 | 132 | <!--新增所有列-->
|
124 | 133 | <insert id="insert" keyProperty="scoreid" useGeneratedKeys="true">
|
125 |
| - insert into cqc_exam.score(examId, stuId, course, objScore, subScore, totalScore) |
126 |
| - values (#{examid}, #{stuid}, #{course}, #{objscore}, #{subscore}, #{totalscore}) |
| 134 | + insert into cqc_exam.score(examId, stuId, course, objScore, subScore, totalScore,answerDate) |
| 135 | + values (#{examid}, #{stuid}, #{course}, #{objscore}, #{subscore}, #{totalscore},#{answerdate}) |
127 | 136 | </insert>
|
128 | 137 |
|
129 | 138 | <!--通过主键修改数据-->
|
|
148 | 157 | <if test="totalscore != null">
|
149 | 158 | totalScore = #{totalscore},
|
150 | 159 | </if>
|
| 160 | + <if test="answerdate != null"> |
| 161 | + answerDate = #{answerdate}, |
| 162 | + </if> |
151 | 163 | </set>
|
152 | 164 | where scoreId = #{scoreid}
|
153 | 165 | </update>
|
|
0 commit comments