Browse Source

fix: 作品提交审核更新时间问题

liaoyitao 3 months ago
parent
commit
6d9983f927

+ 1 - 1
src/main/java/com/lqkj/link/module/zone/repository/ZoneInfoRepository.java

@@ -158,7 +158,7 @@ public interface ZoneInfoRepository extends JpaRepository<ZoneInfo, Integer> {
158
 
158
 
159
     @Modifying
159
     @Modifying
160
     @Query(nativeQuery = true,
160
     @Query(nativeQuery = true,
161
-        value = "update zone_info set auth_status = :authStatus, update_time = now() where zone_id = :zoneId"
161
+        value = "update zone_info set auth_status = :authStatus where zone_id = :zoneId"
162
     )
162
     )
163
     void updateAuthStatus(@Param("zoneId") Integer zoneId,
163
     void updateAuthStatus(@Param("zoneId") Integer zoneId,
164
                           @Param("authStatus") Integer authStatus);
164
                           @Param("authStatus") Integer authStatus);

+ 1 - 0
src/main/java/com/lqkj/link/module/zone/service/ZoneInfoService.java

@@ -339,6 +339,7 @@ public class ZoneInfoService {
339
     public void saveThumbnail(Integer zoneId, String thumbnailPath) {
339
     public void saveThumbnail(Integer zoneId, String thumbnailPath) {
340
         ZoneInfo zoneInfo = zoneInfoRepository.findById(zoneId).get();
340
         ZoneInfo zoneInfo = zoneInfoRepository.findById(zoneId).get();
341
         zoneInfo.setThumbnail(thumbnailPath);
341
         zoneInfo.setThumbnail(thumbnailPath);
342
+        zoneInfo.setUpdateTime(new Date());
342
         zoneInfoRepository.save(zoneInfo);
343
         zoneInfoRepository.save(zoneInfo);
343
     }
344
     }
344
 
345