From 2930d753db74f60d2496fab90817f5b96db5a417 Mon Sep 17 00:00:00 2001
From: huanghongfa <huanghongfa123456>
Date: 星期一, 12 七月 2021 18:07:29 +0800
Subject: [PATCH] 修改bug

---
 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoActivityServiceImpl.java |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 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 12d7601..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
@@ -110,8 +110,17 @@
         }
 
         BeanUtils.copyProperties(editEasyPhotoActivityDTO,photoActivityDO);
-        photoActivityDO.setActivityStartAt(DateUtils.stringToDate(editEasyPhotoActivityDTO.getActivityStartAt(),DateUtils.ymdhms_format));
-        photoActivityDO.setActivityEndAt(DateUtils.stringToDate(editEasyPhotoActivityDTO.getActivityEndAt(),DateUtils.ymdhms_format));
+        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