Browse Source

修改话题详情、屏蔽话题接口异常问题

feature/syp_points
liuchuang 5 years ago
committed by songyunpeng
parent
commit
c76adbf10f
  1. 4
      esua-epdc/epdc-module/epdc-api/epdc-api-server/src/main/java/com/elink/esua/epdc/controller/ApiPartyGroupController.java
  2. 12
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/java/com/elink/esua/epdc/service/impl/PartyTopicServiceImpl.java
  3. 4
      esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml
  4. 1
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java
  5. 4
      esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

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

@ -182,7 +182,7 @@ public class ApiPartyGroupController {
* @author Liuchuang
* @since 2020/8/24 13:38
*/
@PostMapping("shield")
@PostMapping("topic/shield")
public Result shieldTopic(@LoginUser TokenDto userDetail, @RequestBody PartyTopicShieldFormDTO formDto) {
ValidatorUtils.validateEntity(formDto);
formDto.setShieldUserId(userDetail.getUserId());
@ -198,7 +198,7 @@ public class ApiPartyGroupController {
* @author Liuchuang
* @since 2020/8/24 14:35
*/
@GetMapping("detail/{id}")
@GetMapping("topic/detail/{id}")
public Result<PartyTopicDetailResultDTO> topicDetail(@PathVariable("id") String id) {
return partyGroupService.getTopicDetailById(id);
}

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

@ -167,12 +167,14 @@ public class PartyTopicServiceImpl extends BaseServiceImpl<PartyTopicDao, PartyT
PartyTopicResultDTO partyTopicResultDTO = new PartyTopicResultDTO();
//获取当前用户在当前党群禁言状态
PartyUserGroupDTO userByGroupIdAndUserId = partyUserGroupService.getUserByGroupIdAndUserId(formDto.getPartyGroupId(), formDto.getUserId());
if(userByGroupIdAndUserId!=null && userByGroupIdAndUserId.getBannedEndTime()!=null && new Date().before(userByGroupIdAndUserId.getBannedEndTime())){
partyTopicResultDTO.setBannedFlag("1");
}else{
partyTopicResultDTO.setBannedFlag("0");
if(userByGroupIdAndUserId!=null){
if (userByGroupIdAndUserId.getBannedEndTime()!=null && new Date().before(userByGroupIdAndUserId.getBannedEndTime())) {
partyTopicResultDTO.setBannedFlag("1");
} else{
partyTopicResultDTO.setBannedFlag("0");
}
partyTopicResultDTO.setCurrentUserIdentity(userByGroupIdAndUserId.getIdentityFlag());
}
partyTopicResultDTO.setCurrentUserIdentity(userByGroupIdAndUserId.getIdentityFlag());
partyTopicResultDTO.setTopicList(topicLists);
return new Result<PartyTopicResultDTO>().ok(partyTopicResultDTO);
}

4
esua-epdc/epdc-module/epdc-party-group/epdc-party-group-server/src/main/resources/mapper/PartyTopicDao.xml

@ -285,7 +285,7 @@
where id=#{relationId}
</update>
<resultMap id="partyTopicResult" type="com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO">
<resultMap id="partyTopicDetailMap" type="com.elink.esua.epdc.dto.result.PartyTopicDetailResultDTO">
<result property="id" column="ID"/>
<result property="topicContent" column="TOPIC_CONTENT"/>
<result property="nickname" column="NICKNAME"/>
@ -298,7 +298,7 @@
<result property="image" column="IMG_URL"/>
</collection>
</resultMap>
<select id="selectOneOfTopicDetailById" resultType="partyTopicDetailMap">
<select id="selectOneOfTopicDetailById" resultMap="partyTopicDetailMap">
SELECT
t.ID,
t.TOPIC_CONTENT,

1
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/java/com/elink/esua/epdc/service/impl/VolunteerInfoServiceImpl.java

@ -402,6 +402,7 @@ public class VolunteerInfoServiceImpl extends BaseServiceImpl<VolunteerInfoDao,
public Result<EpdcAppVolunteerListCountResultDTO> listVolunteerV2(EpdcAppVolunteerListFormDTO dto) {
int pageIndex = (dto.getPageIndex() - NumConstant.ONE) * dto.getPageSize();
dto.setPageIndex(pageIndex);
dto.setNickname(dto.getNickname().trim());
List<EpdcAppVolunteerListResultDTO> data = baseDao.selectListVolunteer(dto);
EpdcAppVolunteerListCountResultDTO volunteerListCountResultDTO = new EpdcAppVolunteerListCountResultDTO();
volunteerListCountResultDTO.setVolunteerCount(baseDao.selectListVolunteerCount());

4
esua-epdc/epdc-module/epdc-user/epdc-user-server/src/main/resources/mapper/VolunteerInfoDao.xml

@ -228,8 +228,8 @@
WHERE
v.DEL_FLAG = 0
AND v.AUDIT_STATUS != 2
<if test="nickname != null and nickname.trim() != '' ">
AND v.VOLUNTEER_NICKNAME like concat('%', #{nickname.trim()}, '%')
<if test="nickname != null and nickname != '' ">
AND v.VOLUNTEER_NICKNAME like concat('%', #{nickname}, '%')
</if>
ORDER BY v.VOLUNTEER_ORDER ASC ,CONVERT(v.VOLUNTEER_NICKNAME USING gbk)
LIMIT #{pageIndex},#{pageSize}

Loading…
Cancel
Save