chenchen 5 сар өмнө
parent
commit
5a5bab6256

+ 12 - 0
application-webadmin/src/main/java/com/tourism/webadmin/app/website/controller/BasicToWebController.java

@@ -70,4 +70,16 @@ public class BasicToWebController {
 //                companyInfoService.getCompanyInfoListWithRelation(companyInfoFilter, orderBy);
 //        return ResponseResult.success(MyPageUtil.makeResponseData(companyInfoList, CompanyInfoVo.class));
 //    }
+
+
+
+    /**
+     * 生成随机的浏览量,点赞数和热度值。
+     * @return 应答结果对象,包含查询结果集。
+     */
+    @OperationLog(type = SysOperationLogType.UPDATE)
+    @GetMapping("/generate")
+    public void generate(){
+
+    }
 }

+ 4 - 1
application-webadmin/src/main/java/com/tourism/webadmin/app/website/service/impl/BasicToWebServiceImpl.java

@@ -338,7 +338,10 @@ public class BasicToWebServiceImpl implements BasicToWebService
 
         TourTourismProjectTravelNotes tourTourismProjectTravelNotes = tourTourismProjectTravelNotesService.getById(travelNotesId);
         tourTourismProjectTravelNotes.setPageViewCount(tourTourismProjectTravelNotes.getPageViewCount()+1);
-
+        //每有一人浏览,则增加50热度值
+        tourTourismProjectTravelNotes.setHotValue(tourTourismProjectTravelNotes.getHotValue()+50);
+        tourTourismProjectTravelNotesService.updateById(tourTourismProjectTravelNotes);
+    }
     }
 
 }