|  | @ -4,21 +4,21 @@
 | 
	
		
			
				|  |  | 		<Sql name='getArticleList'>
 | 
	
		
			
				|  |  | 			<![CDATA[
 | 
	
		
			
				|  |  | 		select m.*,IFNULL(n.BrowseNumber,0) as BrowseNumber,IFNULL(n.PointNumber,0) as PointNumber,IFNULL(n.CollectionNumber,0) as CollectionNumber,IFNULL(n.CommentNumber,0) as CommentNumber, IFNULL(n.PushNumber,0) as PushNumber
 | 
	
		
			
				|  |  | 		from Org_Article m JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
 | 
	
		
			
				|  |  | 		from Org_Article m JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 and  m.ArticleState =1  @Condition
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 			]]>
 | 
	
		
			
				|  |  | 		</Sql>
 | 
	
		
			
				|  |  | 		<!--<Sql name='getArticleList'>
 | 
	
		
			
				|  |  | 		<Sql name='getArticleListCount'>
 | 
	
		
			
				|  |  | 			<![CDATA[
 | 
	
		
			
				|  |  | 		select m.*,IFNULL(n.BrowseNumber,0) as BrowseNumber,IFNULL(n.PointNumber,0) as PointNumber,IFNULL(n.CollectionNumber,0) as CollectionNumber,IFNULL(n.PushNumber,0) as CommentNumber, IFNULL(n.PushNumber,0) as PushNumber
 | 
	
		
			
				|  |  | 		from Org_Article m JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
 | 
	
		
			
				|  |  | 	select count(*) from Org_Article m 
 | 
	
		
			
				|  |  | LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 and  m.ArticleState =1  @Condition
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 			]]>
 | 
	
		
			
				|  |  | 		</Sql>-->
 | 
	
		
			
				|  |  | 		<Sql name='getArticleListCount'>
 | 
	
		
			
				|  |  | 		</Sql>
 | 
	
		
			
				|  |  | 		<Sql name='getArticleById'>
 | 
	
		
			
				|  |  | 			<![CDATA[
 | 
	
		
			
				|  |  | 	select count(*) from Org_Article m 
 | 
	
		
			
				|  |  | LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1 @Condition
 | 
	
		
			
				|  |  | 		select m.*,IFNULL(n.BrowseNumber,0) as BrowseNumber,IFNULL(n.PointNumber,0) as PointNumber,IFNULL(n.CollectionNumber,0) as CollectionNumber,IFNULL(n.CommentNumber,0) as CommentNumber, IFNULL(n.PushNumber,0) as PushNumber
 | 
	
		
			
				|  |  | 		from Org_Article m JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where 1=1   @Condition
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 			]]>
 | 
	
		
			
				|  |  | 		</Sql>
 | 
	
	
		
			
				|  | @ -32,14 +32,14 @@ User_ArticleStatistics n on aa.ArticleId=n.ArticleId where 1=1 @Condition
 | 
	
		
			
				|  |  | 		<Sql name='getCollectionArticleList'>
 | 
	
		
			
				|  |  | 			<![CDATA[
 | 
	
		
			
				|  |  | select aa.* ,n.BrowseNumber,n.PointNumber,n.CollectionNumber,IFNULL(n.CommentNumber,0) as CommentNumber, IFNULL(n.PushNumber,0) as PushNumber 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
 | 
	
		
			
				|  |  | select m.* from Org_Article m  INNER JOIN User_ArticleCollection n on  m.articleid=n.ArticleId and  1=1 and  m.ArticleState =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 
 | 
	
		
			
				|  |  | select m.* from Org_Article m  INNER JOIN User_ArticleCollection n on  m.articleid=n.ArticleId and 1=1 and  m.ArticleState =1  @UserParam) as aa LEFT JOIN
 | 
	
		
			
				|  |  | User_ArticleStatistics n on aa.ArticleId=n.ArticleId where 1=1 @Condition
 | 
	
		
			
				|  |  | 			]]>
 | 
	
		
			
				|  |  | 		</Sql>
 | 
	
	
		
			
				|  | @ -119,10 +119,10 @@ FROM dual   where not exists( select ArticleId from User_ArticleStatistics where
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 				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
 | 
	
		
			
				|  |  | LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where   m.isauthentication=1 and 1=1 and  m.ArticleState =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  
 | 
	
		
			
				|  |  | LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where   m.isauthentication=2 and  1=1 and  m.ArticleState =1  @Condition @Operatorid
 | 
	
		
			
				|  |  | 	) as aa  @PageParam
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 			]]>
 | 
	
	
		
			
				|  | @ -130,9 +130,9 @@ LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where   m.isauthen
 | 
	
		
			
				|  |  | 		<Sql name='getDoctorArticleListCount'>
 | 
	
		
			
				|  |  | 			<![CDATA[
 | 
	
		
			
				|  |  | 		select articleid from (
 | 
	
		
			
				|  |  | 		select articleid from Org_Article where isauthentication=1  and 1=1  @Condition
 | 
	
		
			
				|  |  | 		select articleid from Org_Article where isauthentication=1  and 1=1 and  m.ArticleState =1   @Condition
 | 
	
		
			
				|  |  | 		union
 | 
	
		
			
				|  |  | 		select articleid from Org_Article where  isauthentication=2 and  1=1 @Condition @Operatorid  
 | 
	
		
			
				|  |  | 		select articleid from Org_Article where  isauthentication=2 and  1=1 and  m.ArticleState =1  @Condition @Operatorid
 | 
	
		
			
				|  |  | 		) as aa 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 			]]>
 | 
	
	
		
			
				|  | @ -142,14 +142,14 @@ LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where   m.isauthen
 | 
	
		
			
				|  |  | 			<![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
 | 
	
		
			
				|  |  | LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where   1=1 and  m.ArticleState =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 		 
 | 
	
		
			
				|  |  | LEFT JOIN User_ArticleStatistics n on m.ArticleId=n.ArticleId where   1=1 and  m.ArticleState =1  @Condition
 | 
	
		
			
				|  |  | 		
 | 
	
		
			
				|  |  | 			]]>
 | 
	
		
			
				|  |  | 		</Sql>
 |