|
@@ -152,6 +152,37 @@
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
|
+ <select id="knowledgeSumAndYelpSumList" resultType="com.redxun.knowledge.analysis.entity.vo.KnowledgeSumAndYelpSumListVo">
|
|
|
+ select users.USER_ID_ as userId,FULLNAME_ as userName,NVL(info.knowledgeSum, 0) knowledgeSum,NVL(info.yelpSum, 0) yelpSum
|
|
|
+ from
|
|
|
+ (select createBy,knowledge.knowledgeSum,yelp.yelpSum
|
|
|
+ from (
|
|
|
+ (select count(*) as knowledgeSum, CREATE_BY_ as createBy
|
|
|
+ from KM_KNOWLEDGE
|
|
|
+ where APPROVAL_STATUS = 5
|
|
|
+ group by CREATE_BY_) knowledge
|
|
|
+ full join
|
|
|
+ (select count(*) as yelpSum, CREATE_BY_ as createBy
|
|
|
+ from KM_ALBUM_YELP
|
|
|
+ where APPROVAL_STATE = 5
|
|
|
+ group by CREATE_BY_) yelp using (createBy))) info right join LEARNING_USER_DEV.OS_USER users on users.USER_ID_ = info.createBy
|
|
|
+ <if test="sort == null">
|
|
|
+ order by knowledgeSum desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'knowledgeSumdesc'">
|
|
|
+ order by knowledgeSum desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'knowledgeSumasc'">
|
|
|
+ order by knowledgeSum
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'yelpSumdesc'">
|
|
|
+ order by yelpSum desc
|
|
|
+ </if>
|
|
|
+ <if test="sort == 'yelpSumasc'">
|
|
|
+ order by yelpSum
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+
|
|
|
|
|
|
</mapper>
|
|
|
|