commit | d6e8d430e565a42f731eedc711f9a04dda2aaec7 | [log] [tgz] |
---|---|---|
author | YelinCui <22301115@bjtu.edu.cn> | Sun Jun 08 22:10:16 2025 +0800 |
committer | YelinCui <22301115@bjtu.edu.cn> | Sun Jun 08 22:10:16 2025 +0800 |
tree | 4f0f5bee32bfe21b8588c86a1f457acf4f5ffbbd | |
parent | d81ebf8c1e596c9bac07b771a56827c7c570c462 [diff] |
查看冷门资源 Change-Id: Idb875bd6ff4c6dba3cc40cf6ef298731b526c1a7
diff --git a/target/classes/com/example/myproject/controller/PromotionController.class b/target/classes/com/example/myproject/controller/PromotionController.class index 2de5158..2c5370a 100644 --- a/target/classes/com/example/myproject/controller/PromotionController.class +++ b/target/classes/com/example/myproject/controller/PromotionController.class Binary files differ
diff --git a/target/classes/com/example/myproject/controller/TorrentController.class b/target/classes/com/example/myproject/controller/TorrentController.class index 1fd4786..4713572 100644 --- a/target/classes/com/example/myproject/controller/TorrentController.class +++ b/target/classes/com/example/myproject/controller/TorrentController.class Binary files differ
diff --git a/target/classes/com/example/myproject/mapper/TorrentMapper.class b/target/classes/com/example/myproject/mapper/TorrentMapper.class index 56fb640..1a9a7c9 100644 --- a/target/classes/com/example/myproject/mapper/TorrentMapper.class +++ b/target/classes/com/example/myproject/mapper/TorrentMapper.class Binary files differ
diff --git a/target/classes/com/example/myproject/service/TorrentService.class b/target/classes/com/example/myproject/service/TorrentService.class index 4927d64..579be31 100644 --- a/target/classes/com/example/myproject/service/TorrentService.class +++ b/target/classes/com/example/myproject/service/TorrentService.class Binary files differ
diff --git a/target/classes/com/example/myproject/service/serviceImpl/TorrentServiceImpl.class b/target/classes/com/example/myproject/service/serviceImpl/TorrentServiceImpl.class index f1b6465..ac29866 100644 --- a/target/classes/com/example/myproject/service/serviceImpl/TorrentServiceImpl.class +++ b/target/classes/com/example/myproject/service/serviceImpl/TorrentServiceImpl.class Binary files differ
diff --git a/target/classes/mapper/TorrentMapper.xml b/target/classes/mapper/TorrentMapper.xml index 8e5419b..9c165ce 100644 --- a/target/classes/mapper/TorrentMapper.xml +++ b/target/classes/mapper/TorrentMapper.xml
@@ -105,5 +105,17 @@ JOIN favorite f ON t.id = f.seed_id WHERE f.user_id = #{userId} </select> + <update id="incrementViews" parameterType="long"> + UPDATE torrent + SET views = views + 1 + WHERE id = #{id} + </update> + <select id="selectColdTorrents" resultType="com.example.myproject.entity.TorrentEntity"> + SELECT * FROM torrent + WHERE views < #{threshold} + ORDER BY views ASC + </select> + + </mapper> \ No newline at end of file