日照智慧社区接口服务
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

50 lines
1.6 KiB

package com.epmet.controller;
import com.epmet.commons.tools.utils.Result;
import com.epmet.commons.tools.validator.ValidatorUtils;
import com.epmet.dao.IcResiUserDao;
import com.epmet.dto.form.VolunteerCommonFormDTO;
import com.epmet.dto.result.VolunteerDistributionResultDTO;
import com.epmet.feign.GovOrgOpenFeignClient;
import com.epmet.service.VolunteerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @Description 志愿者controller
* @Author wangxianzhang
* @Date 2021/12/10 5:45 下午
* @Version 1.0
*/
@RestController
@RequestMapping("volunteer")
public class VolunteerController {
/**
* 不知道为何用注解 注入不进来,暂时用构造方法注入
*/
@Autowired
private VolunteerService volunteerService;
/**
* 志愿者分布查询
*
* @param input
* @return
*/
@PostMapping("distribution")
public Result<VolunteerDistributionResultDTO> getVolunteerDistribution(@RequestBody VolunteerCommonFormDTO input) {
ValidatorUtils.validateEntity(input, VolunteerCommonFormDTO.GetVolunteerDistribution.class);
String customerId = input.getCustomerId();
String agencyId = input.getAgencyId();
VolunteerDistributionResultDTO r = volunteerService.getVolunteerDistributionAndLegends(customerId, agencyId);
return new Result<VolunteerDistributionResultDTO>().ok(r);
}
}