You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
516 lines
20 KiB
XML
516 lines
20 KiB
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.sztzjy.linkCommerce.mapper.StuRankMapper">
|
|
<resultMap id="BaseResultMap" type="com.sztzjy.linkCommerce.entity.StuRank">
|
|
<id column="id" jdbcType="VARCHAR" property="id" />
|
|
<result column="school_id" jdbcType="VARCHAR" property="schoolId" />
|
|
<result column="user_id" jdbcType="VARCHAR" property="userId" />
|
|
<result column="username" jdbcType="VARCHAR" property="username" />
|
|
<result column="name" jdbcType="VARCHAR" property="name" />
|
|
<result column="school_class_id" jdbcType="VARCHAR" property="schoolClassId" />
|
|
<result column="class_name" jdbcType="VARCHAR" property="className" />
|
|
<result column="update_time" jdbcType="VARCHAR" property="updateTime" />
|
|
<result column="stu_rank" jdbcType="INTEGER" property="stuRank" />
|
|
<result column="score" jdbcType="DECIMAL" property="score" />
|
|
<result column="scqxwj_score" jdbcType="DECIMAL" property="scqxwjScore" />
|
|
<result column="scqxwj_weight" jdbcType="DECIMAL" property="scqxwjWeight" />
|
|
<result column="cpgh_score" jdbcType="DECIMAL" property="cpghScore" />
|
|
<result column="cpgh_weight" jdbcType="DECIMAL" property="cpghWeight" />
|
|
<result column="cptfcs_score" jdbcType="DECIMAL" property="cptfcsScore" />
|
|
<result column="cptfcs_weight" jdbcType="DECIMAL" property="cptfcsWeight" />
|
|
<result column="qdgygl_score" jdbcType="DECIMAL" property="qdgyglScore" />
|
|
<result column="qdgygl_weight" jdbcType="DECIMAL" property="qdgyglWeight" />
|
|
<result column="cppgkh_score" jdbcType="DECIMAL" property="cppgkhScore" />
|
|
<result column="cppgkh_weight" jdbcType="DECIMAL" property="cppgkhWeight" />
|
|
<result column="visit_count_rank" jdbcType="INTEGER" property="visitCountRank" />
|
|
<result column="study_time_rank" jdbcType="INTEGER" property="studyTimeRank" />
|
|
</resultMap>
|
|
<sql id="Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Update_By_Example_Where_Clause">
|
|
<where>
|
|
<foreach collection="example.oredCriteria" item="criteria" separator="or">
|
|
<if test="criteria.valid">
|
|
<trim prefix="(" prefixOverrides="and" suffix=")">
|
|
<foreach collection="criteria.criteria" item="criterion">
|
|
<choose>
|
|
<when test="criterion.noValue">
|
|
and ${criterion.condition}
|
|
</when>
|
|
<when test="criterion.singleValue">
|
|
and ${criterion.condition} #{criterion.value}
|
|
</when>
|
|
<when test="criterion.betweenValue">
|
|
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
|
|
</when>
|
|
<when test="criterion.listValue">
|
|
and ${criterion.condition}
|
|
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
|
|
#{listItem}
|
|
</foreach>
|
|
</when>
|
|
</choose>
|
|
</foreach>
|
|
</trim>
|
|
</if>
|
|
</foreach>
|
|
</where>
|
|
</sql>
|
|
<sql id="Base_Column_List">
|
|
id, school_id, user_id, username, name, school_class_id, class_name, update_time,
|
|
stu_rank, score, scqxwj_score, scqxwj_weight, cpgh_score, cpgh_weight, cptfcs_score,
|
|
cptfcs_weight, qdgygl_score, qdgygl_weight, cppgkh_score, cppgkh_weight, visit_count_rank,
|
|
study_time_rank
|
|
</sql>
|
|
<select id="selectByExample" parameterType="com.sztzjy.linkCommerce.entity.StuRankExample" resultMap="BaseResultMap">
|
|
select
|
|
<if test="distinct">
|
|
distinct
|
|
</if>
|
|
<include refid="Base_Column_List" />
|
|
from stu_rank
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
<if test="orderByClause != null">
|
|
order by ${orderByClause}
|
|
</if>
|
|
</select>
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from stu_rank
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
</select>
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
|
|
delete from stu_rank
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
</delete>
|
|
<delete id="deleteByExample" parameterType="com.sztzjy.linkCommerce.entity.StuRankExample">
|
|
delete from stu_rank
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</delete>
|
|
<insert id="insert" parameterType="com.sztzjy.linkCommerce.entity.StuRank">
|
|
insert into stu_rank (id, school_id, user_id,
|
|
username, name, school_class_id,
|
|
class_name, update_time, stu_rank,
|
|
score, scqxwj_score, scqxwj_weight,
|
|
cpgh_score, cpgh_weight, cptfcs_score,
|
|
cptfcs_weight, qdgygl_score, qdgygl_weight,
|
|
cppgkh_score, cppgkh_weight, visit_count_rank,
|
|
study_time_rank)
|
|
values (#{id,jdbcType=VARCHAR}, #{schoolId,jdbcType=VARCHAR}, #{userId,jdbcType=VARCHAR},
|
|
#{username,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{schoolClassId,jdbcType=VARCHAR},
|
|
#{className,jdbcType=VARCHAR}, #{updateTime,jdbcType=VARCHAR}, #{stuRank,jdbcType=INTEGER},
|
|
#{score,jdbcType=DECIMAL}, #{scqxwjScore,jdbcType=DECIMAL}, #{scqxwjWeight,jdbcType=DECIMAL},
|
|
#{cpghScore,jdbcType=DECIMAL}, #{cpghWeight,jdbcType=DECIMAL}, #{cptfcsScore,jdbcType=DECIMAL},
|
|
#{cptfcsWeight,jdbcType=DECIMAL}, #{qdgyglScore,jdbcType=DECIMAL}, #{qdgyglWeight,jdbcType=DECIMAL},
|
|
#{cppgkhScore,jdbcType=DECIMAL}, #{cppgkhWeight,jdbcType=DECIMAL}, #{visitCountRank,jdbcType=INTEGER},
|
|
#{studyTimeRank,jdbcType=INTEGER})
|
|
</insert>
|
|
<insert id="insertSelective" parameterType="com.sztzjy.linkCommerce.entity.StuRank">
|
|
insert into stu_rank
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
id,
|
|
</if>
|
|
<if test="schoolId != null">
|
|
school_id,
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id,
|
|
</if>
|
|
<if test="username != null">
|
|
username,
|
|
</if>
|
|
<if test="name != null">
|
|
name,
|
|
</if>
|
|
<if test="schoolClassId != null">
|
|
school_class_id,
|
|
</if>
|
|
<if test="className != null">
|
|
class_name,
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time,
|
|
</if>
|
|
<if test="stuRank != null">
|
|
stu_rank,
|
|
</if>
|
|
<if test="score != null">
|
|
score,
|
|
</if>
|
|
<if test="scqxwjScore != null">
|
|
scqxwj_score,
|
|
</if>
|
|
<if test="scqxwjWeight != null">
|
|
scqxwj_weight,
|
|
</if>
|
|
<if test="cpghScore != null">
|
|
cpgh_score,
|
|
</if>
|
|
<if test="cpghWeight != null">
|
|
cpgh_weight,
|
|
</if>
|
|
<if test="cptfcsScore != null">
|
|
cptfcs_score,
|
|
</if>
|
|
<if test="cptfcsWeight != null">
|
|
cptfcs_weight,
|
|
</if>
|
|
<if test="qdgyglScore != null">
|
|
qdgygl_score,
|
|
</if>
|
|
<if test="qdgyglWeight != null">
|
|
qdgygl_weight,
|
|
</if>
|
|
<if test="cppgkhScore != null">
|
|
cppgkh_score,
|
|
</if>
|
|
<if test="cppgkhWeight != null">
|
|
cppgkh_weight,
|
|
</if>
|
|
<if test="visitCountRank != null">
|
|
visit_count_rank,
|
|
</if>
|
|
<if test="studyTimeRank != null">
|
|
study_time_rank,
|
|
</if>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null">
|
|
#{id,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="schoolId != null">
|
|
#{schoolId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userId != null">
|
|
#{userId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="username != null">
|
|
#{username,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
#{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="schoolClassId != null">
|
|
#{schoolClassId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="className != null">
|
|
#{className,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
#{updateTime,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="stuRank != null">
|
|
#{stuRank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="score != null">
|
|
#{score,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="scqxwjScore != null">
|
|
#{scqxwjScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="scqxwjWeight != null">
|
|
#{scqxwjWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cpghScore != null">
|
|
#{cpghScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cpghWeight != null">
|
|
#{cpghWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cptfcsScore != null">
|
|
#{cptfcsScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cptfcsWeight != null">
|
|
#{cptfcsWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="qdgyglScore != null">
|
|
#{qdgyglScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="qdgyglWeight != null">
|
|
#{qdgyglWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cppgkhScore != null">
|
|
#{cppgkhScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cppgkhWeight != null">
|
|
#{cppgkhWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="visitCountRank != null">
|
|
#{visitCountRank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="studyTimeRank != null">
|
|
#{studyTimeRank,jdbcType=INTEGER},
|
|
</if>
|
|
</trim>
|
|
</insert>
|
|
<select id="countByExample" parameterType="com.sztzjy.linkCommerce.entity.StuRankExample" resultType="java.lang.Long">
|
|
select count(*) from stu_rank
|
|
<if test="_parameter != null">
|
|
<include refid="Example_Where_Clause" />
|
|
</if>
|
|
</select>
|
|
<update id="updateByExampleSelective" parameterType="map">
|
|
update stu_rank
|
|
<set>
|
|
<if test="record.id != null">
|
|
id = #{record.id,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.schoolId != null">
|
|
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.userId != null">
|
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.username != null">
|
|
username = #{record.username,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.name != null">
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.schoolClassId != null">
|
|
school_class_id = #{record.schoolClassId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.className != null">
|
|
class_name = #{record.className,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.updateTime != null">
|
|
update_time = #{record.updateTime,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="record.stuRank != null">
|
|
stu_rank = #{record.stuRank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.score != null">
|
|
score = #{record.score,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.scqxwjScore != null">
|
|
scqxwj_score = #{record.scqxwjScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.scqxwjWeight != null">
|
|
scqxwj_weight = #{record.scqxwjWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.cpghScore != null">
|
|
cpgh_score = #{record.cpghScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.cpghWeight != null">
|
|
cpgh_weight = #{record.cpghWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.cptfcsScore != null">
|
|
cptfcs_score = #{record.cptfcsScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.cptfcsWeight != null">
|
|
cptfcs_weight = #{record.cptfcsWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.qdgyglScore != null">
|
|
qdgygl_score = #{record.qdgyglScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.qdgyglWeight != null">
|
|
qdgygl_weight = #{record.qdgyglWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.cppgkhScore != null">
|
|
cppgkh_score = #{record.cppgkhScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.cppgkhWeight != null">
|
|
cppgkh_weight = #{record.cppgkhWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="record.visitCountRank != null">
|
|
visit_count_rank = #{record.visitCountRank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="record.studyTimeRank != null">
|
|
study_time_rank = #{record.studyTimeRank,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByExample" parameterType="map">
|
|
update stu_rank
|
|
set id = #{record.id,jdbcType=VARCHAR},
|
|
school_id = #{record.schoolId,jdbcType=VARCHAR},
|
|
user_id = #{record.userId,jdbcType=VARCHAR},
|
|
username = #{record.username,jdbcType=VARCHAR},
|
|
name = #{record.name,jdbcType=VARCHAR},
|
|
school_class_id = #{record.schoolClassId,jdbcType=VARCHAR},
|
|
class_name = #{record.className,jdbcType=VARCHAR},
|
|
update_time = #{record.updateTime,jdbcType=VARCHAR},
|
|
stu_rank = #{record.stuRank,jdbcType=INTEGER},
|
|
score = #{record.score,jdbcType=DECIMAL},
|
|
scqxwj_score = #{record.scqxwjScore,jdbcType=DECIMAL},
|
|
scqxwj_weight = #{record.scqxwjWeight,jdbcType=DECIMAL},
|
|
cpgh_score = #{record.cpghScore,jdbcType=DECIMAL},
|
|
cpgh_weight = #{record.cpghWeight,jdbcType=DECIMAL},
|
|
cptfcs_score = #{record.cptfcsScore,jdbcType=DECIMAL},
|
|
cptfcs_weight = #{record.cptfcsWeight,jdbcType=DECIMAL},
|
|
qdgygl_score = #{record.qdgyglScore,jdbcType=DECIMAL},
|
|
qdgygl_weight = #{record.qdgyglWeight,jdbcType=DECIMAL},
|
|
cppgkh_score = #{record.cppgkhScore,jdbcType=DECIMAL},
|
|
cppgkh_weight = #{record.cppgkhWeight,jdbcType=DECIMAL},
|
|
visit_count_rank = #{record.visitCountRank,jdbcType=INTEGER},
|
|
study_time_rank = #{record.studyTimeRank,jdbcType=INTEGER}
|
|
<if test="_parameter != null">
|
|
<include refid="Update_By_Example_Where_Clause" />
|
|
</if>
|
|
</update>
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.linkCommerce.entity.StuRank">
|
|
update stu_rank
|
|
<set>
|
|
<if test="schoolId != null">
|
|
school_id = #{schoolId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="userId != null">
|
|
user_id = #{userId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="username != null">
|
|
username = #{username,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="name != null">
|
|
name = #{name,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="schoolClassId != null">
|
|
school_class_id = #{schoolClassId,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="className != null">
|
|
class_name = #{className,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="updateTime != null">
|
|
update_time = #{updateTime,jdbcType=VARCHAR},
|
|
</if>
|
|
<if test="stuRank != null">
|
|
stu_rank = #{stuRank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="score != null">
|
|
score = #{score,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="scqxwjScore != null">
|
|
scqxwj_score = #{scqxwjScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="scqxwjWeight != null">
|
|
scqxwj_weight = #{scqxwjWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cpghScore != null">
|
|
cpgh_score = #{cpghScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cpghWeight != null">
|
|
cpgh_weight = #{cpghWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cptfcsScore != null">
|
|
cptfcs_score = #{cptfcsScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cptfcsWeight != null">
|
|
cptfcs_weight = #{cptfcsWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="qdgyglScore != null">
|
|
qdgygl_score = #{qdgyglScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="qdgyglWeight != null">
|
|
qdgygl_weight = #{qdgyglWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cppgkhScore != null">
|
|
cppgkh_score = #{cppgkhScore,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="cppgkhWeight != null">
|
|
cppgkh_weight = #{cppgkhWeight,jdbcType=DECIMAL},
|
|
</if>
|
|
<if test="visitCountRank != null">
|
|
visit_count_rank = #{visitCountRank,jdbcType=INTEGER},
|
|
</if>
|
|
<if test="studyTimeRank != null">
|
|
study_time_rank = #{studyTimeRank,jdbcType=INTEGER},
|
|
</if>
|
|
</set>
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
</update>
|
|
<update id="updateByPrimaryKey" parameterType="com.sztzjy.linkCommerce.entity.StuRank">
|
|
update stu_rank
|
|
set school_id = #{schoolId,jdbcType=VARCHAR},
|
|
user_id = #{userId,jdbcType=VARCHAR},
|
|
username = #{username,jdbcType=VARCHAR},
|
|
name = #{name,jdbcType=VARCHAR},
|
|
school_class_id = #{schoolClassId,jdbcType=VARCHAR},
|
|
class_name = #{className,jdbcType=VARCHAR},
|
|
update_time = #{updateTime,jdbcType=VARCHAR},
|
|
stu_rank = #{stuRank,jdbcType=INTEGER},
|
|
score = #{score,jdbcType=DECIMAL},
|
|
scqxwj_score = #{scqxwjScore,jdbcType=DECIMAL},
|
|
scqxwj_weight = #{scqxwjWeight,jdbcType=DECIMAL},
|
|
cpgh_score = #{cpghScore,jdbcType=DECIMAL},
|
|
cpgh_weight = #{cpghWeight,jdbcType=DECIMAL},
|
|
cptfcs_score = #{cptfcsScore,jdbcType=DECIMAL},
|
|
cptfcs_weight = #{cptfcsWeight,jdbcType=DECIMAL},
|
|
qdgygl_score = #{qdgyglScore,jdbcType=DECIMAL},
|
|
qdgygl_weight = #{qdgyglWeight,jdbcType=DECIMAL},
|
|
cppgkh_score = #{cppgkhScore,jdbcType=DECIMAL},
|
|
cppgkh_weight = #{cppgkhWeight,jdbcType=DECIMAL},
|
|
visit_count_rank = #{visitCountRank,jdbcType=INTEGER},
|
|
study_time_rank = #{studyTimeRank,jdbcType=INTEGER}
|
|
where id = #{id,jdbcType=VARCHAR}
|
|
</update>
|
|
|
|
<select id="selectFiveScoreByUserId" parameterType="java.lang.String" resultMap="BaseResultMap">
|
|
select
|
|
<include refid="Base_Column_List" />
|
|
from stu_rank
|
|
where user_id = #{userId,jdbcType=VARCHAR}
|
|
ORDER BY update_time
|
|
DESC LIMIT 5
|
|
</select>
|
|
|
|
<resultMap id="teaTrendResultMap" type="com.sztzjy.linkCommerce.entity.vo.TeaTrendVo">
|
|
<result column="update_date" jdbcType="VARCHAR" property="updateDate" />
|
|
<result column="avg_total_score" jdbcType="DOUBLE" property="avgScore" /> <!-- 注意这里列名可能需要调整 -->
|
|
</resultMap>
|
|
|
|
<select id="selectFiveAvgTotalScoreBySchoolIdAndClassName" parameterType="com.sztzjy.linkCommerce.entity.StuRank" resultMap="teaTrendResultMap">
|
|
select
|
|
s.update_time update_date,avg(score) avg_total_score
|
|
from stu_rank s
|
|
where school_id = #{schoolId,jdbcType=VARCHAR} and class_name=#{className,jdbcType=VARCHAR}
|
|
group BY update_time
|
|
order by update_time desc
|
|
LIMIT 5
|
|
</select>
|
|
|
|
<select id="selectFiveAvgTotalScoreBySchoolClassId" parameterType="com.sztzjy.linkCommerce.entity.StuRank" resultMap="teaTrendResultMap">
|
|
select s.update_time update_date, avg(score) avg_total_score
|
|
from stu_rank s
|
|
where school_id = #{schoolId,jdbcType=VARCHAR}
|
|
and school_class_id = #{schoolClassId,jdbcType=VARCHAR}
|
|
group by s.update_time
|
|
order by s.update_time desc
|
|
limit 5
|
|
</select>
|
|
</mapper>
|