Browse Source

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

master
yinzuomei 4 years ago
parent
commit
fe894a8eba
  1. 5
      epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java
  2. 5
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java
  3. 4
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java
  4. 1
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java
  5. 5
      epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.22__alter_actinfo_ischange.sql
  6. 10
      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/act/GroupActInfoDTO.java

@ -119,6 +119,11 @@ public class GroupActInfoDTO implements Serializable {
*/
private Date changedTime;
/**
* 是否变更过(:yes :no)
*/
private String isChange;
/**
* 签到开始时间
*/

5
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java

@ -118,6 +118,11 @@ public class GroupActInfoEntity extends BaseEpmetEntity {
*/
private Date changedTime;
/**
* 是否变更过(:yes :no)
*/
private String isChange;
/**
* 签到开始时间
*/

4
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java

@ -301,19 +301,21 @@ public class GroupActInfoServiceImpl extends BaseServiceImpl<GroupActInfoDao, Gr
entity.setStartTime(DateUtils.parse(startTimeStr, DateUtils.DATE_TIME_PATTERN));
if (StringUtils.isNotBlank(formDTO.getGroupActId())) {
entity.setStatus(GroupActConstant.CHANGED);
entity.setStatus(GroupActConstant.PUBLISHED);
entity.setChangedTime(new Date());
GroupActInfoEntity orginalEntity=baseDao.selectById(formDTO.getGroupActId());
entity.setSignInStartTime(orginalEntity.getSignInStartTime());
entity.setSignInEndTime(orginalEntity.getSignInEndTime());
entity.setSummaryFlag(orginalEntity.getSummaryFlag());
entity.setSignedInNum(orginalEntity.getSignedInNum());
entity.setIsChange(Constant.YES);
} else {
//发布新活动
entity.setStatus(GroupActConstant.PUBLISHED);
entity.setChangedTime(new Date());
entity.setSummaryFlag(NumConstant.ZERO);
entity.setSignedInNum(NumConstant.ZERO);
entity.setIsChange(Constant.NO);
}
Result<GridInfoResultDTO> gridInfoRes = govOrgOpenFeignClient.queryGridInfo(formDTO.getGridId());

1
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java

@ -12,7 +12,6 @@ public interface GroupActConstant {
// 活动状态:已发布:published;已取消:canceled;已变更:changed;已关闭:closed
String PUBLISHED="published";
String CANCELED="canceled";
String CHANGED="changed";
String CLOSED="closed";
/**

5
epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.22__alter_actinfo_ischange.sql

@ -0,0 +1,5 @@
alter table group_act_info MODIFY COLUMN `STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '活动状态:已发布:published;已取消:canceled;已关闭:closed';
ALTER TABLE `group_act_info`add COLUMN `IS_CHANGE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '是否变更过(是:yes 否:no)' AFTER `STATUS`;

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

@ -586,7 +586,10 @@
'act' AS contentType,
IFNULL(ac2.CONTENT,'') AS firstPhoto,
false AS isExpirat,
false AS isChanged
(case
when ai.`STATUS`='published' and ai.IS_CHANGE='yes' then true
else false
end )as isChanged
FROM group_act_info ai
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'
@ -913,7 +916,10 @@
ai.`STATUS` AS status,
'act' AS contentType,
false AS isExpirat,
'no' AS isChange,
(case
when ai.`STATUS`='published' and ai.IS_CHANGE='yes' then 'yes'
else 'no'
end )as isChange,
IFNULL(ac2.CONTENT,'') AS firstPhoto
FROM group_act_info ai
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

Loading…
Cancel
Save