From f73f21bfe1e428183f2f7b1cf17ee93d7efaa31f Mon Sep 17 00:00:00 2001 From: xiaoming <31494286+gitdq1016@users.noreply.github.com> Date: Mon, 9 Sep 2024 08:19:40 +0800 Subject: [PATCH] share update add request param --- src/main/java/com/dl/officialsite/member/MemberService.java | 1 + .../java/com/dl/officialsite/sharing/SharingService.java | 1 + .../dl/officialsite/sharing/model/req/UpdateSharingReq.java | 5 +++++ 3 files changed, 7 insertions(+) diff --git a/src/main/java/com/dl/officialsite/member/MemberService.java b/src/main/java/com/dl/officialsite/member/MemberService.java index e1349981..2803fc75 100644 --- a/src/main/java/com/dl/officialsite/member/MemberService.java +++ b/src/main/java/com/dl/officialsite/member/MemberService.java @@ -150,6 +150,7 @@ public List queryMemberInfoByAddress(List addressList){ } public void updateShareCount(){ + //TODO 考虑到数据量大,后期分页查询或者修改触发点 List shareList = sharingRepository.findAll(); List memberList = memberRepository.findAll(); // 将shareList按照presenter分组统计求和,得到一个map,key为presenter,value为分享次数 diff --git a/src/main/java/com/dl/officialsite/sharing/SharingService.java b/src/main/java/com/dl/officialsite/sharing/SharingService.java index dc2afad2..b48b7416 100644 --- a/src/main/java/com/dl/officialsite/sharing/SharingService.java +++ b/src/main/java/com/dl/officialsite/sharing/SharingService.java @@ -123,6 +123,7 @@ public void updateSharing(UpdateSharingReq req, String address) { sharing.setLabel(req.getLabel()); sharing.setBilibiliLink(req.getBilibiliLink()); sharing.setYoutubeLink(req.getYoutubeLink()); + sharing.setTag(req.getTag()); this.sharingRepository.save(sharing); /* SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd"); diff --git a/src/main/java/com/dl/officialsite/sharing/model/req/UpdateSharingReq.java b/src/main/java/com/dl/officialsite/sharing/model/req/UpdateSharingReq.java index 4229b059..7db99258 100644 --- a/src/main/java/com/dl/officialsite/sharing/model/req/UpdateSharingReq.java +++ b/src/main/java/com/dl/officialsite/sharing/model/req/UpdateSharingReq.java @@ -73,4 +73,9 @@ public class UpdateSharingReq { private String youtubeLink; private String bilibiliLink; + + /** + * tag + */ + private String tag; }