|
@ -6,9 +6,11 @@ import com.coreframework.remoting.standard.DateOper;
|
|
|
import com.coreframework.util.AppConfig;
|
|
|
import com.yihu.jk.dao.ArticleDao;
|
|
|
import com.yihu.jk.dao.ArticlePcDao;
|
|
|
import com.yihu.jk.dao.BehaviorDao;
|
|
|
import com.yihu.jk.utils.ApiUtil;
|
|
|
import com.yihu.jk.utils.StringUtil;
|
|
|
import com.yihu.jk.vo.Article;
|
|
|
import com.yihu.jk.vo.ArticleCollection;
|
|
|
import com.yihu.jk.vo.ArticleStatistic;
|
|
|
import com.yihu.jk.vo.OrgArticleVo;
|
|
|
import com.yihu.wsgw.api.InterfaceMessage;
|
|
@ -24,6 +26,7 @@ import java.util.List;
|
|
|
public class ArticleApi {
|
|
|
private static ArticleDao dao = new ArticleDao();
|
|
|
private static ArticlePcDao articlePcDao = new ArticlePcDao();
|
|
|
public static BehaviorDao subDao = new BehaviorDao();
|
|
|
static Logger log = Logger.getLogger(ArticleApi.class.getName());
|
|
|
|
|
|
/**
|
|
@ -244,6 +247,18 @@ public class ArticleApi {
|
|
|
int collectionNumberCount = dao.collectionNumberCount(vo);
|
|
|
jsonObj.put("pointNumberCount", pointNumberCount);
|
|
|
jsonObj.put("collectionNumberCount", collectionNumberCount);
|
|
|
|
|
|
//判断该用户是否有收藏过该文章
|
|
|
ArticleCollection vo1 = new ArticleCollection();
|
|
|
vo1.setArticleId(articleId);
|
|
|
vo1.setUserType(userType);
|
|
|
vo1.setUserId(userId);
|
|
|
int size = subDao.getArticleCollection(vo1);
|
|
|
if(size>0){
|
|
|
jsonObj.put("isCollection", 1);
|
|
|
}else{
|
|
|
jsonObj.put("isCollection", 0);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
array.add(jsonObj);
|