Browse Source

获取论坛指南信息 接口

feature/syp_points
zhangyongzhangyong 5 years ago
parent
commit
762612e23e
  1. 17
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java
  2. 15
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/PartyGroupFeignClient.java
  3. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/PartyGroupFeignClientFallback.java
  4. 38
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java
  5. 10
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java
  6. 23
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcPartyGroupGuideResultDTO.java
  7. 34
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/EpdcPartyGroupGuideController.java
  8. 10
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupGuideDao.java
  9. 10
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupGuideService.java
  10. 7
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupGuideServiceImpl.java
  11. 10
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupGuideDao.xml

17
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java

@ -4,10 +4,7 @@ import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.annotation.LoginUser;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.PartyGroupOfficialsResultDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.dto.result.PartyTopicResultDTO;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.service.PartyGroupService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType;
@ -164,4 +161,16 @@ public class ApiPartyGroupController {
return partyGroupService.joinGroup(userDetail, formDto);
}
/**
* 获取当天(周几)-论坛指南信息
* @param partyGroupId 党群ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO>
* @Author zhangyong
* @Date 13:48 2020-06-17
**/
@GetMapping("group/guideInfo/{partyGroupId}")
public Result<EpdcPartyGroupGuideResultDTO> guideInfo(@PathVariable("partyGroupId") String partyGroupId){
return partyGroupService.getGuideInfo(partyGroupId);
}
}

15
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/PartyGroupFeignClient.java

@ -3,10 +3,7 @@ package com.elink.esua.epdc.feign;
import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.PartyGroupOfficialsResultDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.dto.result.PartyTopicResultDTO;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.feign.fallback.PartyGroupFeignClientFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.http.MediaType;
@ -144,4 +141,14 @@ public interface PartyGroupFeignClient {
@GetMapping(value = "partyGroup/topic/myTopicList", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<PartyTopicResultDTO> myTopicList(MyPartyTopicFormDTO formDto);
/**
* 获取论坛指南信息
* @param partyGroupId 党群ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO>
* @Author zhangyong
* @Date 13:48 2020-06-17
**/
@GetMapping(value = "partyGroup/epdc-app/partygroupguide/group/guideInfo/{partyGroupId}", consumes = MediaType.APPLICATION_JSON_VALUE)
Result<EpdcPartyGroupGuideResultDTO> getGuideInfo(@PathVariable("partyGroupId") String partyGroupId);
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/feign/fallback/PartyGroupFeignClientFallback.java

@ -4,10 +4,7 @@ import com.elink.esua.epdc.commons.tools.constant.ServiceConstant;
import com.elink.esua.epdc.commons.tools.utils.ModuleUtils;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.PartyGroupOfficialsResultDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.dto.result.PartyTopicResultDTO;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.feign.PartyGroupFeignClient;
import org.springframework.stereotype.Component;
@ -85,4 +82,9 @@ public class PartyGroupFeignClientFallback implements PartyGroupFeignClient {
public Result<PartyTopicResultDTO> myTopicList(MyPartyTopicFormDTO formDto) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PARTY_GROUP_SERVER, "myTopicList",formDto);
}
@Override
public Result<EpdcPartyGroupGuideResultDTO> getGuideInfo(String partyGroupId) {
return ModuleUtils.feignConError(ServiceConstant.EPDC_PARTY_GROUP_SERVER, "getGuideInfo",partyGroupId);
}
}

38
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/PartyGroupService.java

@ -3,10 +3,7 @@ package com.elink.esua.epdc.service;
import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.PartyGroupOfficialsResultDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.dto.result.PartyTopicResultDTO;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.dto.result.*;
import java.util.List;
@ -18,7 +15,7 @@ import java.util.List;
public interface PartyGroupService {
/**
* @Description 党群列表接口
* @Description 党群列表接口
* @Author songyunpeng
* @Date 2020/6/3
* @Param []
@ -26,7 +23,7 @@ public interface PartyGroupService {
**/
Result<List<PartyGroupResultDTO>> groupList(TokenDto userDetail);
/**
* @Description 网格长列表
* @Description 网格长列表
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDTO]
@ -34,7 +31,7 @@ public interface PartyGroupService {
**/
Result<List<PartyGroupOfficialsResultDTO>> officialsList(TokenDto userDetail, PartyGroupOfficialsFormDTO formDTO);
/**
* @Description 评论
* @Description 评论
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -42,7 +39,7 @@ public interface PartyGroupService {
**/
Result commentSubmit(TokenDto userDetail, PartyTopicCommentFormDTO formDto);
/**
* @Description 话题列表
* @Description 话题列表
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -50,7 +47,7 @@ public interface PartyGroupService {
**/
Result<PartyTopicResultDTO> topicList(TokenDto userDetail, PartyTopicFormDTO formDto);
/**
* @Description 发布话题
* @Description 发布话题
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -58,7 +55,7 @@ public interface PartyGroupService {
**/
Result topicSubmit(TokenDto userDetail, PartyTopicSubmitFormDTO formDto);
/**
* @Description 话题/接口
* @Description 话题/接口
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -66,7 +63,7 @@ public interface PartyGroupService {
**/
Result topicStatement(TokenDto userDetail, TopicStatementFormDTO formDto);
/**
* @Description 群成员列表
* @Description 群成员列表
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -74,7 +71,7 @@ public interface PartyGroupService {
**/
Result<PartyUserGroupResultDTO> userList(TokenDto userDetail, PartyUserGroupFormDTO formDto);
/**
* @Description 当前用户在群里的信息
* @Description 当前用户在群里的信息
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -82,7 +79,7 @@ public interface PartyGroupService {
**/
Result<PartyUserGroupResultDTO> currentUserInfo(String partyGroupId);
/**
* @Description 禁言
* @Description 禁言
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -90,7 +87,7 @@ public interface PartyGroupService {
**/
Result banned( PartyUserBannedFormDTO formDto);
/**
* @Description 身份认证
* @Description 身份认证
* @Author songyunpeng
* @Date 2020/6/3
* @Param [userDetail, formDto]
@ -98,7 +95,7 @@ public interface PartyGroupService {
**/
Result modifyIdentity(PartyUserIdentityFormDTO formDto);
/**
* @Description 加入党群
* @Description 加入党群
* @Author songyunpeng
* @Date 2020/6/4
* @Param [userDetail, formDto]
@ -106,11 +103,20 @@ public interface PartyGroupService {
**/
Result joinGroup(TokenDto userDetail, PartyUserJoinGroupFormDTO formDto);
/**
* @Description 我的话题列表
* @Description 我的话题列表
* @Author songyunpeng
* @Date 2020/6/11
* @Param [userDetail, formDto]
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.PartyTopicResultDTO>
**/
Result<PartyTopicResultDTO> myTopicList(TokenDto userDetail, MyPartyTopicFormDTO formDto);
/**
* 获取论坛指南信息
* @param partyGroupId 党群ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO>
* @Author zhangyong
* @Date 13:48 2020-06-17
**/
Result<EpdcPartyGroupGuideResultDTO> getGuideInfo(String partyGroupId);
}

10
esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupServiceImpl.java

@ -4,10 +4,7 @@ import com.elink.esua.epdc.common.token.dto.TokenDto;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.ParentAndAllDeptDTO;
import com.elink.esua.epdc.dto.form.*;
import com.elink.esua.epdc.dto.result.PartyGroupOfficialsResultDTO;
import com.elink.esua.epdc.dto.result.PartyGroupResultDTO;
import com.elink.esua.epdc.dto.result.PartyTopicResultDTO;
import com.elink.esua.epdc.dto.result.PartyUserGroupResultDTO;
import com.elink.esua.epdc.dto.result.*;
import com.elink.esua.epdc.feign.AdminFeignClient;
import com.elink.esua.epdc.feign.PartyGroupFeignClient;
import com.elink.esua.epdc.service.PartyGroupService;
@ -154,4 +151,9 @@ public class PartyGroupServiceImpl implements PartyGroupService {
formDto.setUserId(userDetail.getUserId());
}
return partyGroupFeignClient.myTopicList(formDto); }
@Override
public Result<EpdcPartyGroupGuideResultDTO> getGuideInfo(String partyGroupId) {
return partyGroupFeignClient.getGuideInfo(partyGroupId);
}
}

23
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-client/src/main/java/com/elink/esua/epdc/dto/result/EpdcPartyGroupGuideResultDTO.java

@ -0,0 +1,23 @@
package com.elink.esua.epdc.dto.result;
import lombok.Data;
import java.io.Serializable;
/**
* 获取当天(周几)-论坛指南信息 返回值
*
* @author zhangyong
* @since v1.0.0 2020-06-17
*/
@Data
public class EpdcPartyGroupGuideResultDTO implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 党群指南 内容
*/
private String content;
}

34
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/controller/EpdcPartyGroupGuideController.java

@ -0,0 +1,34 @@
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.result.EpdcPartyGroupGuideResultDTO;
import com.elink.esua.epdc.service.PartyGroupGuideService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* 党群指南 app接口
*
* @author zhangyong
* @since v1.0.0 2020-06-16
*/
@RestController
@RequestMapping(Constant.EPDC_APP + "partygroupguide")
public class EpdcPartyGroupGuideController {
@Autowired
private PartyGroupGuideService partyGroupGuideService;
/**
* 获取当天(周几)-论坛指南信息
* @param partyGroupId 党群ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO>
* @Author zhangyong
* @Date 13:48 2020-06-17
**/
@GetMapping("group/guideInfo/{partyGroupId}")
public Result<EpdcPartyGroupGuideResultDTO> guideInfo(@PathVariable("partyGroupId") String partyGroupId){
return partyGroupGuideService.getGuideInfo(partyGroupId);
}
}

10
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/dao/PartyGroupGuideDao.java

@ -19,6 +19,7 @@ package com.elink.esua.epdc.dao;
import com.elink.esua.epdc.commons.mybatis.dao.BaseDao;
import com.elink.esua.epdc.dto.PartyGroupGuideDTO;
import com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO;
import com.elink.esua.epdc.entity.PartyGroupGuideEntity;
import org.apache.ibatis.annotations.Mapper;
@ -51,4 +52,13 @@ public interface PartyGroupGuideDao extends BaseDao<PartyGroupGuideEntity> {
* @Date 09:35 2020-06-17
**/
List<String> selectPartyGroupGuideByDayOfWeek(String dayOfWeek);
/**
* 获取论坛指南信息
* @param partyGroupId 党群ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO>
* @Author zhangyong
* @Date 13:48 2020-06-17
**/
EpdcPartyGroupGuideResultDTO selectOneGuideInfo(String partyGroupId);
}

10
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/PartyGroupGuideService.java

@ -21,6 +21,7 @@ import com.elink.esua.epdc.commons.mybatis.service.BaseService;
import com.elink.esua.epdc.commons.tools.page.PageData;
import com.elink.esua.epdc.commons.tools.utils.Result;
import com.elink.esua.epdc.dto.PartyGroupGuideDTO;
import com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO;
import com.elink.esua.epdc.entity.PartyGroupGuideEntity;
import java.util.List;
@ -93,4 +94,13 @@ public interface PartyGroupGuideService extends BaseService<PartyGroupGuideEntit
* @date 2020-06-16
*/
void delete(String[] ids);
/**
* 获取论坛指南信息
* @param partyGroupId 党群ID
* @return com.elink.esua.epdc.commons.tools.utils.Result<com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO>
* @Author zhangyong
* @Date 13:48 2020-06-17
**/
Result<EpdcPartyGroupGuideResultDTO> getGuideInfo(String partyGroupId);
}

7
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyGroupGuideServiceImpl.java

@ -29,6 +29,7 @@ import com.elink.esua.epdc.dao.PartyGroupGuideDao;
import com.elink.esua.epdc.dto.PartyGroupGuideDTO;
import com.elink.esua.epdc.dto.PartyGroupGuideRelationDTO;
import com.elink.esua.epdc.dto.enums.DayOfWeekEnum;
import com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO;
import com.elink.esua.epdc.entity.PartyGroupGuideEntity;
import com.elink.esua.epdc.redis.PartyGroupGuideRedis;
import com.elink.esua.epdc.service.PartyGroupGuideRelationService;
@ -178,4 +179,10 @@ public class PartyGroupGuideServiceImpl extends BaseServiceImpl<PartyGroupGuideD
}
return stringBuffer;
}
@Override
public Result<EpdcPartyGroupGuideResultDTO> getGuideInfo(String partyGroupId) {
EpdcPartyGroupGuideResultDTO dto = baseDao.selectOneGuideInfo(partyGroupId);
return new Result<EpdcPartyGroupGuideResultDTO>().ok(dto);
}
}

10
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyGroupGuideDao.xml

@ -46,4 +46,14 @@
WHERE DAY_OF_WEEK = #{dayOfWeek}
AND DEL_FLAG = 0
</select>
<select id="selectOneGuideInfo" resultType="com.elink.esua.epdc.dto.result.EpdcPartyGroupGuideResultDTO">
SELECT
CONTENT content
FROM epdc_party_group_guide g
LEFT JOIN epdc_party_group_guide_relation gr ON g.id = gr.PARTY_GROUP_GUIDE_ID
WHERE g.DEL_FLAG = 0 AND gr.DEL_FLAG = 0
AND g.DAY_OF_WEEK = dayofweek(curdate())-1
AND gr.PARTY_GROUP_ID = #{partyGroupId}
</select>
</mapper>

Loading…
Cancel
Save