From 63b527f7e65c6a5519213adbeebacef0ede4963d Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期四, 08 七月 2021 18:04:29 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java |    7 ++++++-
 1 files changed, 6 insertions(+), 1 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 84e3506..5012bdb 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
@@ -78,7 +78,12 @@
         photoActivityDO.setActivityEndAt(DateUtils.stringToDate(addEasyPhotoActivityDTO.getActivityEndAt(),DateUtils.ymdhm_format));
         photoActivityDO.setCreateAt(new Date());
         photoActivityDO.setReleaseAt(new Date());
-        photoActivityDO.setStatus(1);
+        if(new Date().getTime() > photoActivityDO.getActivityStartAt().getTime()){
+            photoActivityDO.setStatus(2);
+        }else{
+            photoActivityDO.setStatus(1);
+        }
+
         photoActivityDO.setCount(0);
         if(this.baseMapper.insert(photoActivityDO) > 0){
             return R.ok();

--
Gitblit v1.7.1