Browse Source

Merge remote-tracking branch 'origin/dev_temp' into dev_temp

dev_shibei_match
jianjun 4 years ago
parent
commit
47736b36d6
  1. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java
  2. 3
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeCommentListResultDTO.java
  3. 17
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeDetailResultDTO.java
  4. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java
  5. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java
  6. 8
      epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

5
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/group/result/AllGroupListResultDTO.java

@ -5,9 +5,8 @@ import lombok.Data;
import java.io.Serializable;
/**
* @Description 推荐小组查询返参
* @Author yinzuomei
* @Date 2020/3/28 17:11
* @Author sun
* @Description 所有小组查询-接口返参
*/
@Data
public class AllGroupListResultDTO implements Serializable {

3
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeCommentListResultDTO.java

@ -1,6 +1,7 @@
package com.epmet.resi.group.dto.notice.result;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
@ -34,7 +35,7 @@ public class NoticeCommentListResultDTO implements Serializable {
/**
* 评论时间 yyyy-MM-dd HH:mm
* */
@JSONField(format="yyyy-MM-dd HH:mm")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date commentTime;
/**
* 用户Id 评论者Id

17
epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/notice/result/NoticeDetailResultDTO.java

@ -1,15 +1,12 @@
package com.epmet.resi.group.dto.notice.result;
import com.epmet.resi.group.dto.notice.form.AddNoticeFormDTO;
import com.epmet.resi.group.dto.topic.form.FileDTO;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@ -39,7 +36,13 @@ public class NoticeDetailResultDTO implements Serializable {
/**
* 发布时间yyyy-MM-dd HH:mm
*/
private String releaseTime;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date releaseTime;
/**
* 通知过期时间(此时间需大于变更时间)
*/
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date expirationTime;
/**
* 发布人头像
*/

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeCommentServiceImpl.java

@ -158,6 +158,7 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl<NoticeCommentDao,
//2.调用user服务,查询评论人员基础信息
List<String> userIdList = resultList.stream().map(NoticeCommentListResultDTO::getUserId).collect(Collectors.toList());
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
Result<List<UserBaseInfoResultDTO>> result = epmetUserOpenFeignClient.queryUserBaseInfo(userIdList);
if (!result.success()) {
throw new RenException("调用user服务,获取用户基础数据失败");

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/notice/service/impl/NoticeServiceImpl.java

@ -294,7 +294,7 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeDao, NoticeEntity>
throw new RenException(String.format("小组通知变更,获取通知数据失败,通知Id->", formDTO.getNoticeId()));
}
//通知已过期时不允许再次变更
if(entity.getChangeTime().before(new Date())){
if(entity.getExpirationTime().before(new Date())){
throw new RenException(EpmetErrorCode.NOTICE_BE_OVERDUE.getCode());
}
@ -469,7 +469,8 @@ public class NoticeServiceImpl extends BaseServiceImpl<NoticeDao, NoticeEntity>
resultDTO.setTitle(entity.getTitle());
resultDTO.setContent(entity.getContent());
resultDTO.setIsChange(entity.getIsChange());
resultDTO.setReleaseTime(entity.getChangeTime().toString());
resultDTO.setReleaseTime(entity.getChangeTime());
resultDTO.setExpirationTime(entity.getExpirationTime());
StringBuffer name = new StringBuffer();
StringBuffer url = new StringBuffer();
resultDTOList.forEach(user -> {

8
epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml

@ -575,7 +575,7 @@
(SELECT
ai.ID,
ai.CREATED_BY AS userId,
DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime,
DATE_FORMAT(ai.CHANGED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime,
IFNULL(ac.CONTENT,'') AS content,
ai.`STATUS` AS status,
'' AS issueId,
@ -587,7 +587,7 @@
LEFT JOIN group_act_content ac2 ON ac2.GROUP_ACT_ID = ai.ID AND ac2.CONTENT_TYPE = 'img' AND ac2.DEL_FLAG = 0 AND ac2.SORT = 1
WHERE ai.DEL_FLAG = '0'
AND ai.GROUP_ID = #{groupId}
ORDER BY ai.CREATED_TIME DESC
ORDER BY ai.CHANGED_TIME DESC
LIMIT 10)
UNION ALL
(SELECT
@ -737,7 +737,7 @@
(SELECT
ai.ID,
ai.CREATED_BY AS userId,
DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime,
DATE_FORMAT(ai.CHANGED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime,
IFNULL(ac.CONTENT,'') AS content,
'act' AS contentType,
IFNULL(ac2.CONTENT,'') AS firstPhoto,
@ -813,7 +813,7 @@
(SELECT
ai.ID,
ai.CREATED_BY AS userId,
DATE_FORMAT(ai.CREATED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime,
DATE_FORMAT(ai.CHANGED_TIME,'%Y-%m-%d %H:%i:%s') AS releaseTime,
IFNULL(ac.CONTENT,'') AS content,
ai.`STATUS` AS status,
'' AS issueId,

Loading…
Cancel
Save