Commit 7abd89d0 authored by 赵啸非's avatar 赵啸非

修改新闻相关

parent f1772225
This source diff could not be displayed because it is too large. You can view the blob instead.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"mybatis-3-mapper.dtd">
<mapper namespace="com.mortals.xhx.module.dept.dao.ibatis.DeptPerformStatDaoImpl">
<!-- 按天top10 -->
<select id="getDaySummaryList" parameterType="com.mortals.xhx.module.dept.model.vo.DeptSummaryTopQuery" resultType="com.mortals.xhx.module.dept.model.DeptPerformStatEntity">
SELECT * FROM (
SELECT
`year`,
`month`,
`day`,
deptId,
deptName,
SUM(totalScore) AS totalScore
FROM
mortals_xhx_dept_perform_stat
WHERE 1=1
<if test="year != null">
AND `year` = #{year}
</if>
<if test="month != null">
AND `month` = #{month}
</if>
<if test="day != null">
AND `day` = #{day}
</if>
GROUP BY
deptId,
deptName,
`year`,
`month`,
`day`
) AS a ORDER BY totalScore DESC LIMIT 10
</select>
<!-- 按月top10 -->
<select id="getMonthSummaryList" parameterType="com.mortals.xhx.module.dept.model.vo.DeptSummaryTopQuery" resultType="com.mortals.xhx.module.dept.model.DeptPerformStatEntity">
SELECT * FROM (
SELECT
`year`,
`month`,
deptId,
deptName,
SUM(totalScore) AS totalScore
FROM
mortals_xhx_dept_perform_stat
WHERE 1=1
<if test="year != null">
AND `year` = #{year}
</if>
<if test="month != null">
AND `month` = #{month}
</if>
GROUP BY
deptId,
deptName,
`year`,
`month`
) AS a ORDER BY totalScore DESC LIMIT 10
</select>
<!-- 按年top10 -->
<select id="getYearSummaryList" parameterType="com.mortals.xhx.module.dept.model.vo.DeptSummaryTopQuery" resultType="com.mortals.xhx.module.dept.model.DeptPerformStatEntity">
SELECT * FROM (
SELECT
`year`,
deptId,
deptName,
SUM(totalScore) AS totalScore
FROM
mortals_xhx_dept_perform_stat
WHERE 1=1
<if test="year != null">
AND `year` = #{year}
</if>
<if test="month != null">
AND `month` = #{month}
</if>
<if test="day != null">
AND `day` = #{day}
</if>
GROUP BY
deptId,
deptName,
`year`
) AS a ORDER BY totalScore DESC LIMIT 10
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment