|
@ -1,143 +0,0 @@
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<das-client>
|
|
|
|
<Sqls>
|
|
|
|
<Sql name='getArticleList'>
|
|
|
|
<![CDATA[
|
|
|
|
select m.*,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
|
|
|
|
LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='getArticleListCount'>
|
|
|
|
<![CDATA[
|
|
|
|
select count(*) from Org_Article m
|
|
|
|
LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='getCollectionArticleList'>
|
|
|
|
<![CDATA[
|
|
|
|
select aa.* ,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from (
|
|
|
|
select m.* from Org_Article m INNER JOIN User_ArticleCollection n on m.articleid=n.ArticleId and 1=1 @UserParam) as aa LEFT JOIN
|
|
|
|
User_ArticleStatistics n on aa.ArticleId=n.ArticleId where 1=1 @Condition
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='getCollectionArticleListCount'>
|
|
|
|
<![CDATA[
|
|
|
|
select count(*) from (
|
|
|
|
select m.* from Org_Article m INNER JOIN User_ArticleCollection n on m.articleid=n.ArticleId and 1=1 @UserParam) as aa LEFT JOIN
|
|
|
|
User_ArticleStatistics n on aa.ArticleId=n.ArticleId where 1=1 @Condition
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='pointNumberCount'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
select * from User_Behavior where BehaviorAction=1 and 1=1 @Condition
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='collectionNumberCount'>
|
|
|
|
<![CDATA[
|
|
|
|
select * from User_ArticleCollection where 1=1 @Condition
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='updateArticleStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
update User_ArticleStatistics set @behaviorParam where @ArticleId
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
|
|
|
|
<Sql name='updateCollectionStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
update User_ArticleStatistics set @behaviorParam= (
|
|
|
|
select count(*) from User_ArticleCollection where 1=1 @Condition) where @ArticleId
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='updateCommentStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
update User_ArticleStatistics set @behaviorParam= (
|
|
|
|
select count(*) from User_ArticleComment where 1=1 @Condition) where @ArticleId
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='insertArticleStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
INSERT INTO User_ArticleStatistics (
|
|
|
|
ArticleId
|
|
|
|
)
|
|
|
|
SELECT ?
|
|
|
|
FROM dual where not exists( select ArticleId from User_ArticleStatistics where 1=1 and ArticleId=? );
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='deleteArticleStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
delete from User_ArticleStatistics
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='queryArticleStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
select * from (
|
|
|
|
select count(case behavioraction when '1' then 'PointNumber' end) as PointNumber,
|
|
|
|
count(case behavioraction when '3' then 'ShareNumber' end) as ShareNumber,
|
|
|
|
count(case behavioraction when '4' then 'BrowseNumber' end) as BrowseNumber,ArticleId
|
|
|
|
from User_Behavior where 1=1 @Condition) as aa LEFT JOIN
|
|
|
|
(select count(*) as CommentNumber,ArticleId from User_ArticleComment where 1=1 @Condition) as bb ON aa.articleid=bb.articleid
|
|
|
|
LEFT JOIN
|
|
|
|
(select count(*) as CollectionNumber,ArticleId from User_ArticleCollection where 1=1 @Condition and usertype=2)as cc
|
|
|
|
ON aa.articleid=bb.articleid
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
|
|
|
</Sql>
|
|
|
|
<Sql name='insertArticleInitStatistic'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
INSERT INTO User_ArticleStatistics (ArticleId, BrowseNumber, PointNumber, CommentNumber, ShareNumber, CollectionNumber) VALUES (?,?,?,?,?,?);
|
|
|
|
|
|
|
|
]]>
|
|
|
|
|
|
|
|
</Sql>
|
|
|
|
|
|
|
|
<Sql name='getDoctorArticleList'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
select * from (
|
|
|
|
select m.*,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
|
|
|
|
LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where m.isauthentication=1 and 1=1 @Condition
|
|
|
|
union
|
|
|
|
select m.* ,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
|
|
|
|
LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where m.isauthentication=2 and 1=1 @Condition @Operatorid
|
|
|
|
) as aa @PageParam
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='getDoctorArticleListCount'>
|
|
|
|
<![CDATA[
|
|
|
|
select articleid from (
|
|
|
|
select articleid from Org_Article where isauthentication=1 and 1=1 @Condition
|
|
|
|
union
|
|
|
|
select articleid from Org_Article where isauthentication=2 and 1=1 @Condition @Operatorid
|
|
|
|
) as aa
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
|
|
|
|
<Sql name='getDoctorArticalByUserId'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
select m.*,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
|
|
|
|
LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
<Sql name='getDoctorArticalByUserIdCount'>
|
|
|
|
<![CDATA[
|
|
|
|
|
|
|
|
select m.*,n.BrowseNumber,n.PointNumber,n.CollectionNumber,n.CommentNumber from Org_Article m
|
|
|
|
LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
|
|
|
|
|
|
|
|
]]>
|
|
|
|
</Sql>
|
|
|
|
</Sqls>
|
|
|
|
</das-client>
|
|
|