<?xml version="1.0" encoding="UTF-8" ?>
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<mapper namespace="com.gk.hotwork.Mapper.ExamScoreInfoMapper" >
|
<resultMap id="BaseResultMap" type="com.gk.hotwork.Domain.ExamScoreInfo" >
|
<!-- -->
|
<id column="id" property="id" jdbcType="BIGINT" />
|
<result column="realname" property="realname" jdbcType="VARCHAR" />
|
<result column="mobile" property="mobile" jdbcType="VARCHAR" />
|
<result column="idcard" property="idcard" jdbcType="VARCHAR" />
|
<result column="examtype" property="examtype" jdbcType="VARCHAR" />
|
<result column="score" property="score" jdbcType="INTEGER" />
|
<result column="starttime" property="starttime" jdbcType="TIMESTAMP" />
|
<result column="endtime" property="endtime" jdbcType="TIMESTAMP" />
|
<result column="createtime" property="createtime" jdbcType="TIMESTAMP" />
|
</resultMap>
|
<sql id="Base_Column_List" >
|
<!-- -->
|
id, realname, mobile, idcard, examtype, score, starttime, endtime, createtime
|
</sql>
|
<select id="selectByMobile" resultType="com.gk.hotwork.Domain.ExamScoreInfo">
|
select *
|
from examscore
|
where mobile = #{mobile}
|
and examtype = #{examtype}
|
</select>
|
<select id="selectByAll" resultType="com.gk.hotwork.Domain.Vo.ExamScoreVo">
|
select
|
CASE WHEN (examscore.endtime > NOW()) THEN 1 ELSE 0 END AS ispass,
|
examtype
|
from examscore
|
where mobile = #{username}
|
</select>
|
</mapper>
|