diff --git a/pom.xml b/pom.xml index 2ddf99a..f201f8f 100644 --- a/pom.xml +++ b/pom.xml @@ -94,6 +94,13 @@ log4j 1.2.14 + + + + com.cm + cloud-common-article + ${cm-cloud.version} + diff --git a/src/main/java/com/cm/partybuilding/service/articlecontent/IPartyRulesService.java b/src/main/java/com/cm/partybuilding/service/articlecontent/IPartyRulesService.java new file mode 100644 index 0000000..0721412 --- /dev/null +++ b/src/main/java/com/cm/partybuilding/service/articlecontent/IPartyRulesService.java @@ -0,0 +1,22 @@ +package com.cm.partybuilding.service.articlecontent; + +import com.cm.common.article.pojo.dtos.articlecontent.ArticleContentDTO; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; + +import java.util.List; + +/** + * @author xwangs + * @create 2020-10-16 16:15 + * @description + */ +public interface IPartyRulesService { + + /** + * 党规党纪内容开放条件查询列表 + * @param page + * @return + */ + SuccessResultList> listPagePartyRules(ListPage page); +} diff --git a/src/main/java/com/cm/partybuilding/service/articlecontent/impl/PartyRulesServiceImpl.java b/src/main/java/com/cm/partybuilding/service/articlecontent/impl/PartyRulesServiceImpl.java new file mode 100644 index 0000000..a7142e1 --- /dev/null +++ b/src/main/java/com/cm/partybuilding/service/articlecontent/impl/PartyRulesServiceImpl.java @@ -0,0 +1,34 @@ +package com.cm.partybuilding.service.articlecontent.impl; + +import com.cm.common.article.pojo.dtos.articlecontent.ArticleContentDTO; +import com.cm.common.pojo.ListPage; +import com.cm.common.result.SuccessResultList; +import com.cm.partybuilding.dao.partyrules.IPartyRulesDao; +import com.cm.partybuilding.service.BaseService; +import com.cm.partybuilding.service.articlecontent.IPartyRulesService; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @author xwangs + * @create 2020-10-16 16:17 + * @description + */ +@Service +public class PartyRulesServiceImpl extends BaseService implements IPartyRulesService { + + @Autowired + private IPartyRulesDao partyRulesDao; + + @Override + public SuccessResultList> listPagePartyRules(ListPage page) { + PageHelper.startPage(page.getPage(), page.getRows()); + List articleContentDTOs = partyRulesDao.listPagePartyRules(page.getParams()); + PageInfo pageInfo = new PageInfo<>(articleContentDTOs); + return new SuccessResultList<>(articleContentDTOs, pageInfo.getPageNum(), pageInfo.getTotal()); + } +} diff --git a/src/main/resources/mybatis/mapper/partyrules/partyrules-mapper.xml b/src/main/resources/mybatis/mapper/partyrules/partyrules-mapper.xml new file mode 100644 index 0000000..3722087 --- /dev/null +++ b/src/main/resources/mybatis/mapper/partyrules/partyrules-mapper.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/system-partybuilding.iml b/system-partybuilding.iml deleted file mode 100644 index b929a81..0000000 --- a/system-partybuilding.iml +++ /dev/null @@ -1,191 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file