From 47de8ceefb38ee55fc577f94bfda09dd5adbd29d Mon Sep 17 00:00:00 2001 From: huanghongfa <18228131219@163.com> Date: 星期二, 22 十二月 2020 17:18:39 +0800 Subject: [PATCH] 测试更新 --- springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java index cd6e9be..884b264 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java @@ -5,10 +5,12 @@ import com.panzhihua.common.model.vos.R; import com.panzhihua.common.model.vos.community.*; import com.panzhihua.common.service.community.CommunityService; +import com.panzhihua.common.validated.AddGroup; import io.swagger.annotations.Api; import io.swagger.annotations.ApiImplicitParam; import io.swagger.annotations.ApiOperation; import org.springframework.util.ObjectUtils; +import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -80,7 +82,7 @@ @PostMapping("dynamicuser") public R addDynamicUser(@RequestBody ComActDynVO comActDynVO){ Long id = comActDynVO.getId(); - if (ObjectUtils.isEmpty(id)||id==0) { + if (null==id||id==0) { return R.fail("社区动态不存在"); } Long userId = this.getUserId(); @@ -89,7 +91,7 @@ @ApiOperation(value = "志愿者申请") @PostMapping("volunteer") - public R addVolunteer(@RequestBody ComMngVolunteerMngVO comMngVolunteerMngVO){ + public R addVolunteer(@RequestBody @Validated(AddGroup.class) ComMngVolunteerMngVO comMngVolunteerMngVO){ comMngVolunteerMngVO.setState(1); return communityService.addVolunteer(comMngVolunteerMngVO); } -- Gitblit v1.7.1