diff --git a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java b/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java index 66fa6efdfa..6c0336d141 100644 --- a/epmet-module/resi-group/resi-group-client/src/main/java/com/epmet/resi/group/dto/act/GroupActInfoDTO.java +++ b/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; + /** * 签到开始时间 */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java index 18939138f8..b91e73f878 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/entity/GroupActInfoEntity.java +++ b/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; + /** * 签到开始时间 */ diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java index da18613611..48334bac4e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/act/service/impl/GroupActInfoServiceImpl.java +++ b/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 gridInfoRes = govOrgOpenFeignClient.queryGridInfo(formDTO.getGridId()); diff --git a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java b/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java index 4eb0ad9dd3..e81e96c00e 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/constant/GroupActConstant.java +++ b/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"; /** diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.22__alter_actinfo_ischange.sql b/epmet-module/resi-group/resi-group-server/src/main/resources/db/migration/V0.0.22__alter_actinfo_ischange.sql new file mode 100644 index 0000000000..d2c08682a3 --- /dev/null +++ b/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`; + + diff --git a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml b/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml index abe49a62c8..3c934ec5fd 100644 --- a/epmet-module/resi-group/resi-group-server/src/main/resources/mapper/group/ResiGroupDao.xml +++ b/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