Commit e1fd3a6f authored by ms-dev's avatar ms-dev

微信插件方法支持更新

parent d50da799
......@@ -257,4 +257,27 @@ public interface IArticleBiz extends IBasicBiz {
*/
public void updateArticle(ArticleEntity article, List<BasicCategoryEntity> basicCategoryList);
/**
* 显示本网站下文章列表
*
* @param webId网站id
* @param page
* PageUtil对象,主要封装分页的方法 <br/>
* @param orderBy
* 排序字段 <br/>
* @param order
* 排序方式true:asc false:desc <br/>
* @return 返回所查询的文章集合
*/
@Deprecated
public List<ArticleEntity> queryPageListByWebsiteId(int webId, PageUtil page, String orderBy, boolean order);
/**
* 查询本网站下文章列表数目
*
* @param webId网站id
* @return 文章条数
*/
@Deprecated
public int getCountByWebsiteId(int webId);
}
......@@ -339,5 +339,35 @@ public class ArticleBizImpl extends BasicBizImpl implements IArticleBiz {
}
/**
* 显示本网站下文章列表
*
* @param webId网站id
* @param page
* PageUtil对象,主要封装分页的方法 <br/>
* @param orderBy
* 排序字段 <br/>
* @param order
* 排序方式true:asc false:desc <br/>
* @return 返回所查询的文章集合
*/
@Override
@Deprecated
public List<ArticleEntity> queryPageListByWebsiteId(int webId, PageUtil page, String orderBy, boolean order) {
// TODO Auto-generated method stub
return articleDao.queryPageListByWebsiteId(webId, page.getPageNo(), page.getPageSize(), orderBy, order);
}
/**
* 查询本网站下文章列表数目
*
* @param webId网站id
* @return 文章条数
*/
@Override
@Deprecated
public int getCountByWebsiteId(int webId) {
// TODO Auto-generated method stub
return articleDao.getCountByWebsiteId(webId);
}
}
......@@ -232,4 +232,43 @@ public interface IArticleDao extends IBaseDao {
@Param("page") PageUtil page, @Param("websiteId") int websiteId, @Param("ids") List ids,
@Param("sortMap") Map sortMap);
/**
* 根据站点获取文章列表
*
* @param webId
* 站点id
* @param pageNo
* @param pageSize
* @param orderBy
* 排序字段 <br/>
* @param order
* 排序方式true:asc false:desc <br/>
* @return 文章集合
*/
@Deprecated
public List<ArticleEntity> queryPageListByWebsiteId(@Param("webId") int webId, @Param("pageNo") int pageNo, @Param("pageSize") int pageSize,
@Param("orderBy") String orderBy, @Param("order") boolean order);
/**
* 获取站点下文章总条数
*
* @param webId
* webId 站点id<br/>
* @return 返回查询总条数
*/
@Deprecated
public int getCountByWebsiteId(@Param("webId") int webId);
/**
* 根据文章ID集合查询文章实体集合
*
* @param articleIds
* 文章ID集合
* @return 文章实体集合
*/
@Deprecated
@SuppressWarnings("rawtypes")
public List<ArticleEntity> queryListByArticleIds(@Param("articleIds") List articleIds);
}
......@@ -652,6 +652,50 @@
</where>
</delete>
<!--过期方法 查询本站点下文章条数 并进行分页 开始 -->
<select id="queryPageListByWebsiteId" resultMap="resultMap">
select
<include refid="column_list" />
,c.CATEGORY_TITLE,cl.column_path,c.CATEGORY_id,cl.COLUMN_CONTENTMODELID,cl.column_type
FROM
basic b
LEFT JOIN
category c ON b.BASIC_CATEGORYID = c.CATEGORY_ID
LEFT JOIN cms_column
cl ON c.CATEGORY_ID = cl.COLUMN_CATEGORYID
LEFT
JOIN cms_article a ON
a.ARTICLE_BASICID = b.BASIC_ID
where
a.ARTICLE_WEBID = #{webId}
<if test="orderBy != null">order by ${orderBy}</if>
<if test="order == true">asc</if>
<if test="order == false">desc</if>
limit ${pageNo*pageSize},#{pageSize};
</select>
<!-- 查询本站点下文章条数 并进行分页 结束 -->
<!-- 过期方法 查询本站点下文章条数 开始 -->
<select id="getCountByWebsiteId" resultType="int">
select count(*)
from
cms_article a left join basic b on b.basic_id=a.ARTICLE_BASICID
where
a.ARTICLE_WEBID=#{webId}
</select>
<!-- 查询本站点下文章条数 结束 -->
<!--过期方法 根据文章ID集合查询文章集合开始 -->
<select id="queryListByArticleIds" resultMap="resultMap">
select *
from v_article where ARTICLE_BASICID = 0
<foreach item="id" index="index" collection="articleIds" open=""
separator="" close="">
UNION ALL (select * from v_article where
ARTICLE_BASICID=#{id})
</foreach>
</select>
<!-- 根据文章ID集合查询文章集合 结束 -->
</mapper>
\ No newline at end of file
package net.mingsoft;
import org.junit.Assert;
import org.junit.Test;
import com.mingsoft.base.test.BaseTest;
public class CmsTest extends BaseTest{
@Test
public void test() {
Assert.assertEquals(true, true);
}
}
package net.mingsoft;
import com.mingsoft.base.test.BaseTest;
public class Test extends BaseTest{
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment