init
This commit is contained in:
@@ -7,16 +7,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<resultMap type="com.ruoyi.cai.domain.CaiUserCount" id="CaiUserCountResult">
|
||||
<result property="userId" column="user_id"/>
|
||||
<result property="fansCount" column="fans_count"/>
|
||||
<result property="newFansCount" column="new_fans_count"/>
|
||||
<result property="followCount" column="follow_count"/>
|
||||
<result property="visitorCount" column="visitor_count"/>
|
||||
<result property="newVisitorCount" column="new_visitor_count"/>
|
||||
<result property="photoCount" column="photo_count"/>
|
||||
<result property="dynamicCount" column="dynamic_count"/>
|
||||
<result property="receiveGiftCount" column="receive_gift_count"/>
|
||||
<result property="giveGiftCount" column="give_gift_count"/>
|
||||
<result property="createTime" column="create_time"/>
|
||||
</resultMap>
|
||||
<update id="visitorIncs">
|
||||
update cai_user_count
|
||||
set
|
||||
foot_count = foot_count + #{footIncs},
|
||||
visitor_count = visitor_count + #{visitorIncs}
|
||||
where user_id = #{userId}
|
||||
</update>
|
||||
<select id="starIncs">
|
||||
update cai_user_count
|
||||
set
|
||||
fans_count = fans_count + #{fansIncs},
|
||||
follow_count = follow_count + #{followIncs}
|
||||
where user_id = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -20,6 +20,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
where to_uid = #{userId}
|
||||
group by gift_id
|
||||
</select>
|
||||
<select id="countGiftNum" resultType="java.lang.Long">
|
||||
select ifnull(sum(gift_count),0)
|
||||
from cai_user_gift
|
||||
<where>
|
||||
<if test="fromUid != null">
|
||||
and from_uid = #{fromUid}
|
||||
</if>
|
||||
<if test="toUid != null">
|
||||
and to_uid = #{toUid}
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
|
||||
Reference in New Issue
Block a user