Commit e2f73935 authored by m1991's avatar m1991

Merge remote-tracking branch 'origin/master'

# Conflicts:
#	wisenergy-common/src/main/java/cn/wisenergy/common/utils/FrameGrabberKit.java
#	wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UploadServiceImpl.java
parents ec5536c3 12a3e52f
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
</sql> </sql>
<sql id="cols_exclude_id"> <sql id="cols_exclude_id">
user_id,year_month,growth_rate,award_money,create_time,update_time user_id,`year_month`,`growth_rate`,award_money,create_time,update_time
</sql> </sql>
<sql id="vals"> <sql id="vals">
...@@ -30,8 +30,8 @@ ...@@ -30,8 +30,8 @@
<sql id="updateCondition"> <sql id="updateCondition">
<if test="userId != null">user_id = #{userId},</if> <if test="userId != null">user_id = #{userId},</if>
<if test="yearMonth != null">year_month = #{yearMonth},</if> <if test="yearMonth != null">`year_month` = #{yearMonth},</if>
<if test="growthRate != null">growth_rate =#{growthRate},</if> <if test="growthRate != null">`growth_rate` =#{growthRate},</if>
<if test="awardMoney != null">award_money =#{awardMoney},</if> <if test="awardMoney != null">award_money =#{awardMoney},</if>
update_time =now() update_time =now()
</sql> </sql>
...@@ -39,8 +39,8 @@ ...@@ -39,8 +39,8 @@
<sql id="criteria"> <sql id="criteria">
<if test="id != null">id = #{id}</if> <if test="id != null">id = #{id}</if>
<if test="userId != null">and user_id = #{userId}</if> <if test="userId != null">and user_id = #{userId}</if>
<if test="yearMonth != null">and year_month = #{yearMonth}</if> <if test="yearMonth != null">and `year_month` = #{yearMonth}</if>
<if test="growthRate != null">and growth_rate =#{growthRate}</if> <if test="growthRate != null">and `growth_rate` =#{growthRate}</if>
<if test="awardMoney != null">and award_money =#{awardMoney}</if> <if test="awardMoney != null">and award_money =#{awardMoney}</if>
<if test="createTime != null">and create_time &gt;= #{createTime}</if> <if test="createTime != null">and create_time &gt;= #{createTime}</if>
<if test="updateTime != null">and #{updateTime} &gt;= update_time</if> <if test="updateTime != null">and #{updateTime} &gt;= update_time</if>
...@@ -80,24 +80,20 @@ ...@@ -80,24 +80,20 @@
<where> <where>
<if test="yearMonth != null"> <if test="yearMonth != null">
AND( AND(
YEAR(year_month) = YEAR(#{yearMonth}) YEAR(`year_month`) = YEAR(#{yearMonth})
AND MONTH(year_month) = MONTH(#{yearMonth})) AND MONTH(`year_month`) = MONTH(#{yearMonth}))
</if> </if>
</where> </where>
</select> </select>
<select id="getByTime" resultType="cn.wisenergy.model.vo.ProgressPrizeVo"> <select id="getByTime" resultType="cn.wisenergy.model.vo.ProgressPrizeVo">
select p.user_id as userId,p.growth_rate as growthRate, p.award_money as awardMoney select p.user_id as userId,p.`growth_rate` as growthRate, p.award_money as awardMoney
from progress_prize p,user_info u from
<where> progress_prize p ,user_info u
p.user_id=u.user_id where
<if test="yearMonth != null"> p.user_id=u.user_id
AND( and p.`year_month` = #{yearMonth}
YEAR(p.year_month) = YEAR(#{yearMonth}) order by p.`growth_rate` desc,u.create_time desc
AND MONTH(p.year_month) = MONTH(#{yearMonth}))
</if>
order by p.growth_rate desc,u.create_time desc
</where>
</select> </select>
</mapper> </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