+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+package com.elink.esua.epdc.controller;
+
+import com.elink.esua.epdc.commons.tools.constant.Constant;
+import com.elink.esua.epdc.commons.tools.utils.Result;
+import com.elink.esua.epdc.dto.epdc.result.NewsCategoryResultDTO;
+import com.elink.esua.epdc.service.NewsCategoryService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.*;
+
+import java.util.List;
+
+
+/**
+ * 新闻类别表
+ *
+ * @author qu qu@elink-cn.com
+ * @since v1.0.0 2019-09-04
+ */
+@RestController
+@RequestMapping(Constant.EPDC_APP + "newscategory")
+public class EpdcAppNewsCategoryController {
+
+ @Autowired
+ private NewsCategoryService newsCategoryService;
+
+ /**
+ * 居民端 - 根据版块编码,查询下属子类别
+ *
+ * @param sectionCode
+ * @return com.elink.esua.epdc.commons.tools.utils.Result>
+ * @author work@yujt.net.cn
+ * @date 2020/6/23 17:56
+ */
+ @GetMapping("listCategoryBySection/{sectionCode}")
+ public Result> listCategoryCodeBySection(@PathVariable("sectionCode") String sectionCode) {
+ List result = newsCategoryService.listCategoryCodeBySection(sectionCode);
+ return new Result().ok(result);
+ }
+
+}
\ No newline at end of file
diff --git a/epdc-cloud-news/src/main/java/com/elink/esua/epdc/controller/EpdcAppNewsController.java b/epdc-cloud-news/src/main/java/com/elink/esua/epdc/controller/EpdcAppNewsController.java
index 292c31c..39c65a5 100644
--- a/epdc-cloud-news/src/main/java/com/elink/esua/epdc/controller/EpdcAppNewsController.java
+++ b/epdc-cloud-news/src/main/java/com/elink/esua/epdc/controller/EpdcAppNewsController.java
@@ -64,21 +64,6 @@ public class EpdcAppNewsController {
return newsService.listNews(epdcNewsFromDTO);
}
- /**
- * 小程序端 根据新闻类别获取新闻列表
- *
- * @param epdcNewsFromDTO
- * @return com.elink.esua.epdc.commons.tools.utils.Result>
- * @author work@yujt.net.cn
- * @date 2020/5/22 15:21
- */
- @GetMapping("listNewsByCategory")
- public Result> listNewsByCategory(@RequestBody EpdcNewsListByCategoryFromDTO epdcNewsFromDTO) {
- ValidatorUtils.validateEntity(epdcNewsFromDTO);
- List list = newsService.listNewsByCategory(epdcNewsFromDTO);
- return new Result().ok(list);
- }
-
/***
* @Description 新闻详情
* @Author qushutong
@@ -124,15 +109,17 @@ public class EpdcAppNewsController {
}
- /***
- * banner列表
- * @param
+ /**
+ * banner列表
+ *
+ * @param fromDto
* @return com.elink.esua.epdc.commons.tools.utils.Result>
* @author qushutong
* @date 2019/9/10 20:58
*/
@GetMapping("listBanner")
- public Result> listBanner(@RequestBody EpdcBannerListFromDTO fromDTO) {
- return new Result().ok(bannerService.listBanner(fromDTO));
+ public Result> listBanner(@RequestBody EpdcBannerListFromDTO fromDto) {
+ ValidatorUtils.validateEntity(fromDto);
+ return new Result().ok(bannerService.listBanner(fromDto));
}
}
\ No newline at end of file
diff --git a/epdc-cloud-news/src/main/java/com/elink/esua/epdc/dao/NewsCategoryDao.java b/epdc-cloud-news/src/main/java/com/elink/esua/epdc/dao/NewsCategoryDao.java
index 60bb95f..196dfe1 100644
--- a/epdc-cloud-news/src/main/java/com/elink/esua/epdc/dao/NewsCategoryDao.java
+++ b/epdc-cloud-news/src/main/java/com/elink/esua/epdc/dao/NewsCategoryDao.java
@@ -18,6 +18,7 @@
package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
+import com.elink.esua.epdc.dto.epdc.result.NewsCategoryResultDTO;
import com.elink.esua.epdc.entity.NewsCategoryEntity;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@@ -34,10 +35,19 @@ import java.util.Map;
@Mapper
public interface NewsCategoryDao extends BaseDao {
- int selectCodeCount(String categoryCode,String id);
+ int selectCodeCount(String categoryCode, String id);
- int selectNameCount(String categoryName,String id);
+ int selectNameCount(String categoryName, String id);
- List