Browse Source

新闻相关修改

feature/yujt_analysisHomeChange
yujt 5 years ago
parent
commit
c1ddc53854
  1. 4
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java
  2. 15
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java
  3. 5
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java
  4. 6
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java
  5. 1
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java
  6. 13
      epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java

4
epdc-cloud-api/src/main/java/com/elink/esua/epdc/controller/ApiPropertyController.java

@ -8,7 +8,7 @@ import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO;
import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcBannerListByCategoryFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcBannerListFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcNewsListByCategoryFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcNewsListByCategoryFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO;
@ -352,7 +352,7 @@ public class ApiPropertyController {
* @date 2020/5/25 09:17 * @date 2020/5/25 09:17
*/ */
@GetMapping("safety/bannerList") @GetMapping("safety/bannerList")
public Result<List<EpdcBannerListResultDTO>> listBnnerByCategory(@LoginUser TokenDto userDetail, EpdcBannerListByCategoryFromDTO formDto) { public Result<List<EpdcBannerListResultDTO>> listBnnerByCategory(@LoginUser TokenDto userDetail, EpdcBannerListFromDTO formDto) {
return propertyService.listBnnerByCategory(userDetail, formDto); return propertyService.listBnnerByCategory(userDetail, formDto);
} }
} }

15
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/NewsFeignClient.java

@ -153,22 +153,9 @@ public interface NewsFeignClient {
* @author qushutong * @author qushutong
* @date 2019/9/11 9:25 * @date 2019/9/11 9:25
*/ */
@GetMapping(value = "news/epdc-app/news/list", consumes = MediaType.APPLICATION_JSON_VALUE) @GetMapping(value = "news/epdc-app/news/listBanner", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<EpdcBannerListResultDTO>> listBanner(@RequestBody EpdcBannerListFromDTO fromDTO); Result<List<EpdcBannerListResultDTO>> listBanner(@RequestBody EpdcBannerListFromDTO fromDTO);
/**
* 根据新闻类别获取banner列表
*
* @param formDto
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcNewsListResultDTO>>
* @author work@yujt.net.cn
* @date 2020/5/25 09:14
*/
@GetMapping(value = "news/epdc-app/news/listBannerByCategory", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<List<EpdcBannerListResultDTO>> listBannerByCategory(@RequestBody EpdcBannerListByCategoryFromDTO formDto);
/*** /***
* 获取第一条通知消息 * 获取第一条通知消息
* @param userId * @param userId

5
epdc-cloud-api/src/main/java/com/elink/esua/epdc/feign/fallback/NewsFeignClientFallback.java

@ -43,11 +43,6 @@ public class NewsFeignClientFallback implements NewsFeignClient {
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "listNewsByCategory", formDto); return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "listNewsByCategory", formDto);
} }
@Override
public Result<List<EpdcBannerListResultDTO>> listBannerByCategory(EpdcBannerListByCategoryFromDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "EpdcBannerListByCategoryFromDTO", formDto);
}
@Override @Override
public Result<EpdcNewsDetailResultDTO> getNewsDetail(EpdcNewsDetailFormDTO formDto) { public Result<EpdcNewsDetailResultDTO> getNewsDetail(EpdcNewsDetailFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "getNewsDetail", formDto); return ModuleUtils.feignConError(ServiceConstant.EPDC_NEWS_SERVER, "getNewsDetail", formDto);

6
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/PropertyService.java

@ -7,7 +7,7 @@ import com.elink.esua.epdc.dto.comment.TopicCommentFormDTO;
import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO; import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcBannerListByCategoryFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcBannerListFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcNewsListByCategoryFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcNewsListByCategoryFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO;
@ -269,9 +269,9 @@ public interface PropertyService {
* *
* @param userDetail 用户信息 * @param userDetail 用户信息
* @param formDto 查询参数 * @param formDto 查询参数
* @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO>> * @return com.elink.esua.epdc.commons.tools.utils.Result<java.util.List < com.elink.esua.epdc.dto.epdc.result.EpdcBannerListFromDTO>>
* @author work@yujt.net.cn * @author work@yujt.net.cn
* @date 2020/5/25 09:15 * @date 2020/5/25 09:15
*/ */
Result<List<EpdcBannerListResultDTO>> listBnnerByCategory(TokenDto userDetail, EpdcBannerListByCategoryFromDTO formDto); Result<List<EpdcBannerListResultDTO>> listBnnerByCategory(TokenDto userDetail, EpdcBannerListFromDTO formDto);
} }

1
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/NewsServiceImpl.java

@ -61,7 +61,6 @@ public class NewsServiceImpl implements NewsService {
return newsFeignClient.updateStatement(newsStatementFromDTO); return newsFeignClient.updateStatement(newsStatementFromDTO);
} }
@Override @Override
public Result modifyNewsBrowse(EpdcNewsBrowseFromDTO newsBrowseFromDTO) { public Result modifyNewsBrowse(EpdcNewsBrowseFromDTO newsBrowseFromDTO) {
return newsFeignClient.modifyNewsBrowse(newsBrowseFromDTO); return newsFeignClient.modifyNewsBrowse(newsBrowseFromDTO);

13
epdc-cloud-api/src/main/java/com/elink/esua/epdc/service/impl/PropertyServiceImpl.java

@ -2,7 +2,6 @@ package com.elink.esua.epdc.service.impl;
import com.elink.esua.epdc.async.WxMaSecCheckTask; import com.elink.esua.epdc.async.WxMaSecCheckTask;
import com.elink.esua.epdc.common.token.dto.TokenDto; import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.constant.NumConstant;
import com.elink.esua.epdc.commons.tools.enums.UserTagEnum; import com.elink.esua.epdc.commons.tools.enums.UserTagEnum;
import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum; import com.elink.esua.epdc.commons.tools.enums.YesOrNoEnum;
import com.elink.esua.epdc.commons.tools.utils.Result; import com.elink.esua.epdc.commons.tools.utils.Result;
@ -12,7 +11,7 @@ import com.elink.esua.epdc.dto.comment.TopicCommentStatementFormDTO;
import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO; import com.elink.esua.epdc.dto.comment.TopicCommentsFormDTO;
import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO; import com.elink.esua.epdc.dto.comment.result.EventCommentsResultDTO;
import com.elink.esua.epdc.dto.enums.TopicStateEnum; import com.elink.esua.epdc.dto.enums.TopicStateEnum;
import com.elink.esua.epdc.dto.epdc.form.EpdcBannerListByCategoryFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcBannerListFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcNewsListByCategoryFromDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcNewsListByCategoryFromDTO;
import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO; import com.elink.esua.epdc.dto.epdc.form.EpdcUserGroupInviteFormDTO;
import com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO; import com.elink.esua.epdc.dto.epdc.result.EpdcBannerListResultDTO;
@ -30,13 +29,11 @@ import com.elink.esua.epdc.dto.project.result.ProjectListResultDTO;
import com.elink.esua.epdc.dto.topic.form.*; import com.elink.esua.epdc.dto.topic.form.*;
import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO; import com.elink.esua.epdc.dto.topic.result.TopicDetailResultDTO;
import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO; import com.elink.esua.epdc.dto.topic.result.TopicListResultDTO;
import com.elink.esua.epdc.enums.IndependentFunctionCodeEnum;
import com.elink.esua.epdc.feign.AdminFeignClient; import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.NewsFeignClient; import com.elink.esua.epdc.feign.NewsFeignClient;
import com.elink.esua.epdc.feign.PropertyFeignClient; import com.elink.esua.epdc.feign.PropertyFeignClient;
import com.elink.esua.epdc.service.PropertyService; import com.elink.esua.epdc.service.PropertyService;
import com.elink.esua.epdc.utils.UserTagUtils; import com.elink.esua.epdc.utils.UserTagUtils;
import com.google.common.collect.Lists;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
@ -322,12 +319,8 @@ public class PropertyServiceImpl implements PropertyService {
} }
@Override @Override
public Result<List<EpdcBannerListResultDTO>> listBnnerByCategory(TokenDto userDetail, EpdcBannerListByCategoryFromDTO formDto) { public Result<List<EpdcBannerListResultDTO>> listBnnerByCategory(TokenDto userDetail, EpdcBannerListFromDTO formDto) {
List<String> categoryCodes = Lists.newArrayList();
categoryCodes.add(IndependentFunctionCodeEnum.POLICE_NOTICE.getCode());
categoryCodes.add(IndependentFunctionCodeEnum.SAFETY_PRECAUTIONS.getCode());
formDto.setDeptId(userDetail.getGridId()); formDto.setDeptId(userDetail.getGridId());
formDto.setCategoryCodeList(categoryCodes); return newsFeignClient.listBanner(formDto);
return newsFeignClient.listBannerByCategory(formDto);
} }
} }

Loading…
Cancel
Save