26 lines
884 B
XML
26 lines
884 B
XML
|
|
<?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._3e.dao.PointcaseDao">
|
||
|
|
<select id= "getScorePointByCasetype" parameterType="int" resultType="com._3e.entity.PointCase" >
|
||
|
|
SELECT * FROM PointCase
|
||
|
|
WHERE status = 1 and pointcasetype = #{pointcasetype}
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id= "getScorePointByCasetypeAndScore" parameterType="map" resultType="com._3e.entity.PointCase" >
|
||
|
|
SELECT * FROM PointCase
|
||
|
|
WHERE status = 1 and pointcasetype = #{pointcasetype} and min <= #{score}
|
||
|
|
<if test="score == 100">
|
||
|
|
and #{score} <= max
|
||
|
|
</if>
|
||
|
|
<if test="score != 100">
|
||
|
|
and #{score} < max
|
||
|
|
</if>
|
||
|
|
</select>
|
||
|
|
|
||
|
|
<select id= "getAvgScore" parameterType="map" resultType="double" >
|
||
|
|
select avg(point) from pointlog where pointcasetype = #{pointcasetype} and uid = #{uid}
|
||
|
|
</select>
|
||
|
|
</mapper>
|