Kaynağa Gözat

fix:我的关注需求,关注日期修正

414057798 5 yıl önce
ebeveyn
işleme
e8e220f452

+ 4 - 2
src/main/java/com/lightinit/hsdataportal/impl/APIDemandServiceImpl.java

@@ -1,10 +1,9 @@
 package com.lightinit.hsdataportal.impl;
 
-import com.lightinit.hsdataportal.dictionary.DicRequirmentAuditState;
 import com.lightinit.hsdataportal.dictionary.DicPlatformType;
+import com.lightinit.hsdataportal.dictionary.DicRequirmentAuditState;
 import com.lightinit.hsdataportal.dictionary.DicRqrmntSourceType;
 import com.lightinit.hsdataportal.dictionary.DicRqrmntType;
-import com.lightinit.hsdataportal.dictionary.*;
 import com.lightinit.hsdataportal.entity.*;
 import com.lightinit.hsdataportal.mapper.RequirementApiMapper;
 import com.lightinit.hsdataportal.mapper.RequirementFollowMapper;
@@ -20,6 +19,7 @@ import org.springframework.transaction.annotation.Transactional;
 
 import java.util.Date;
 import java.util.List;
+import java.util.TimeZone;
 
 @Service
 public class APIDemandServiceImpl implements IAPIDemandService {
@@ -112,6 +112,7 @@ public class APIDemandServiceImpl implements IAPIDemandService {
 
     @Override
     public ResultState follow(Long id, Long userId, String resourceType) {
+        TimeZone.setDefault(TimeZone.getTimeZone("CTT"));
         DynamicDataContextHolder.setCustomerType(DynamicDataContextHolder.DEFAULT);
         ResultState<Long> resultState = new ResultState<Long>() ;
 
@@ -127,6 +128,7 @@ public class APIDemandServiceImpl implements IAPIDemandService {
             requirementFollow.setPlatformType(resourceType);
             requirementFollow.setFollowerId(userId);
             requirementFollow.setRqrmntId(id);
+            requirementFollow.setCreatedAt(new Date());
             result = followMapper.insert(requirementFollow) ;
             resultState.setData(requirementFollow.getId());
             resultState.setMsg("关注成功");

+ 6 - 7
src/main/resources/config.properties

@@ -9,7 +9,7 @@
 #jdbc.sentry.username=root
 #jdbc.sentry.password=iuGoto8#@20w
 
-jdbc.sentry.url=jdbc:mysql://rm-2zea3p7q7lrvjs8s4.mysql.rds.aliyuncs.com/hsdataplatform?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false
+jdbc.sentry.url=jdbc:mysql://rm-2zea3p7q7lrvjs8s4.mysql.rds.aliyuncs.com/hsdataplatform?useUnicode=true&characterEncoding=utf8&autoReconnect=true&useSSL=false&serverTimezone=GMT%2b8
 jdbc.sentry.username=hsdataplatform
 jdbc.sentry.password=Lightinit@1
 jdbc.sentry.driverClassName=com.mysql.cj.jdbc.Driver
@@ -59,12 +59,12 @@ redis.server=192.168.107.112
 
 
 
-#userType=user
-#redirectHomeUrl=/open/
+userType=user
+redirectHomeUrl=/open/
+redirectLoginUrl=/open/account/login.htm
+#userType=admin
+#redirectHomeUrl=/share/
 #redirectLoginUrl=/open/account/login.htm
-userType=admin
-redirectHomeUrl=/share/
-redirectLoginUrl=/share/account/login.htm
 imageContextPath=http://localhost:8080/hsdataimages/
 ##\u521B\u4E1A\u5DE5\u5382 \u70B9\u51FB\u8FDB\u5165
 devops=http://121.17.30.198:8097/devops-web/
@@ -105,4 +105,3 @@ uploadImageRootDir=D:/HSDataPlatform/Upload/Images/
 
 
 
-