From 16ca40d6e32928e1fd4b24600374e9ee61e9ebbd Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 12 七月 2021 11:03:30 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java
index e7fc97f..4eaacb0 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java
@@ -112,6 +112,15 @@
         BeanUtils.copyProperties(editEasyPhotoActivityDTO,photoActivityDO);
         photoActivityDO.setActivityStartAt(DateUtils.stringToDate(editEasyPhotoActivityDTO.getActivityStartAt(),DateUtils.ymdhm_format));
         photoActivityDO.setActivityEndAt(DateUtils.stringToDate(editEasyPhotoActivityDTO.getActivityEndAt(),DateUtils.ymdhm_format));
+        if(new Date().getTime() > photoActivityDO.getActivityStartAt().getTime()){
+            photoActivityDO.setStatus(ComActEasyPhotoActivityDO.status.jxz);
+        }else{
+            photoActivityDO.setStatus(ComActEasyPhotoActivityDO.status.dks);
+        }
+
+        if(new Date().getTime() > photoActivityDO.getActivityEndAt().getTime()){
+            photoActivityDO.setStatus(ComActEasyPhotoActivityDO.status.yjs);
+        }
         if(this.baseMapper.updateById(photoActivityDO) > 0){
             return R.ok();
         }

--
Gitblit v1.7.1