From 179c4d64313c9b7572778da4aaaf6c6584fe457d Mon Sep 17 00:00:00 2001 From: mitao <2763622819@qq.com> Date: 星期二, 20 五月 2025 23:48:08 +0800 Subject: [PATCH] 修改文件上传类型限制 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerActivitiesPeopleServiceImpl.java | 35 ++++++++++++++++++++++------------- 1 files changed, 22 insertions(+), 13 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerActivitiesPeopleServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerActivitiesPeopleServiceImpl.java index 598652a..eaeebd9 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerActivitiesPeopleServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/VolunteerActivitiesPeopleServiceImpl.java @@ -65,24 +65,29 @@ { for (GrantIntegral item: grantIntegral.getPeopleAndGranList() ) { - if(StringUtils.isEmpty(grantIntegral.getId())) + if(StringUtils.isEmpty(item.getId())) { return R.fail("奖励发放id不能为空!"); } - if(StringUtils.isEmpty(grantIntegral.getGrantIntegral())) + if(StringUtils.isEmpty(item.getGrantIntegral())) { return R.fail("奖励发放积分不能为空!"); } - VolunteerActivitiesPeopleVO vla=new VolunteerActivitiesPeopleVO(); - vla.setId(item.getId()); - vla.setIssuePoints(item.getGrantIntegral()); - vla.setIssueStatus("1"); - baseMapper.vapUpdate(vla); //用户新增积分 LoginUserInfoVO sysUser=userService.getUserInfoByUserId(item.getUserId()).getData(); + + VolunteerActivitiesPeopleVO vla=new VolunteerActivitiesPeopleVO(); + vla.setId(item.getId()); + vla.setUserId(item.getUserId()); + vla.setIssuePoints(item.getGrantIntegral()); + vla.setCommunityId(sysUser.getCommunityId()+""); + vla.setIssueStatus("1"); + baseMapper.vapUpdate(vla); + + int grant=0; if(!StringUtils.isEmpty(sysUser.getLoveIntegral())) { @@ -98,15 +103,19 @@ volunteerIntegralRecordVO.setVolunteerId(item.getVolunteerId()); volunteerIntegralRecordVO.setUserId(item.getUserId()); volunteerIntegralRecordVO.setIType("1"); - volunteerIntegralRecordVO.setCommunityId(item.getCommunityId()); + volunteerIntegralRecordVO.setCommunityId(sysUser.getCommunityId()+""); volunteerIntegralRecordService.insertVolunteer(volunteerIntegralRecordVO); } - -// VolunteerActivityVO activityVO=new VolunteerActivityVO(); -// activityVO.setId(grantIntegral.getActivityId()); -// activityVO.setAwardState("1"); -// volunteerActivityService.updateById(activityVO); + //判断活动奖励是否发放完 + int num=baseMapper.vapGetUnissuedQuantity(grantIntegral.getActivityId()); + if(num==0) + { + VolunteerActivityVO activityVO=new VolunteerActivityVO(); + activityVO.setId(grantIntegral.getActivityId()); + activityVO.setAwardState("1"); + volunteerActivityService.updateById(activityVO); + } return R.ok(); } -- Gitblit v1.7.1