huanghongfa
2020-12-31 17bccd09afb6e6a4fffa0409d7d5285e88442103
springcloud_k8s_panzhihuazhihuishequ/applets/src/main/java/com/panzhihua/applets/api/CommunityApi.java
@@ -1,15 +1,15 @@
package com.panzhihua.applets.api;
import com.panzhihua.common.controller.BaseController;
import com.panzhihua.common.model.vos.LoginUserInfoVO;
import com.panzhihua.common.model.dtos.community.PageVolunteerDTO;
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 com.panzhihua.common.validated.PageGroup;
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.*;
@@ -96,6 +96,23 @@
        return communityService.addVolunteer(comMngVolunteerMngVO);
    }
    @ApiOperation(value = "分页查询志愿者团队")
    @PostMapping("pagevolunteer")
    public R pageVolunteer(@RequestBody @Validated(PageGroup.class) PageVolunteerDTO pageVolunteerDTO){
        Long communityId = this.getCommunityId();
        ComMngVolunteerMngVO comMngVolunteerMngVO=new ComMngVolunteerMngVO();
        comMngVolunteerMngVO.setCommunityId(communityId);
        comMngVolunteerMngVO.setPageNum(pageVolunteerDTO.getPageNum());
        comMngVolunteerMngVO.setPageSize(pageVolunteerDTO.getPageSize());
        return communityService.pageVolunteer(comMngVolunteerMngVO);
    }
    @ApiOperation(value = "志愿者详情",response = ComMngVolunteerMngAppletsVO.class)
    @GetMapping("volunteer")
    public R detailVolunteer(@RequestParam("id") Long id){
        return communityService.detailVolunteer(id);
    }
}