| 
					
				 | 
			
			
				@ -0,0 +1,88 @@ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				package com.yihu.jw.base.endpoint.voluntary; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.base.service.voluntary.VoluntaryRecruitmentCompanyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.entity.voluntary.VoluntaryRecruitmentCompanyDO; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.Envelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ListEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.ObjEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.PageEnvelop; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.Api; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiOperation; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import io.swagger.annotations.ApiParam; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.beans.factory.annotation.Autowired; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import org.springframework.web.bind.annotation.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				import java.util.List; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				/** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * Created with IntelliJ IDEA. 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @Author: yeshijie 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @Date: 2021/8/1 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 * @Description: 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RestController 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@RequestMapping(value = "voluntaryRecruitmentCompany") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				@Api(value = "新冠-志愿招募单位管理", description = "新冠-志愿招募单位管理", tags = {"新冠-志愿招募单位管理"}) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				public class VoluntaryRecruitmentCompanyEndpoint extends EnvelopRestEndpoint { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private VoluntaryRecruitmentCompanyService companyService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "delete") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "删除") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public Envelop delete( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "ids", value = "id串,中间用,分隔", required = true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "ids") String ids) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        companyService.delete(ids.split(",")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success("删除成功"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @PostMapping(value = "update") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "更新") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ObjEnvelop<VoluntaryRecruitmentCompanyDO> update ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "jsonData", value = "Json数据", required = true) 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam String jsonData) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        VoluntaryRecruitmentCompanyDO appVersion = toEntity(jsonData, VoluntaryRecruitmentCompanyDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (null == appVersion.getId()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return failed("ID不能为空", ObjEnvelop.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        appVersion = companyService.save(appVersion); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(appVersion, VoluntaryRecruitmentCompanyDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = "page") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取分页") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public PageEnvelop<VoluntaryRecruitmentCompanyDO> page ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "fields", required = false) String fields, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "filters", required = false) String filters, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "sorts", value = "排序,规则参见说明文档") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "sorts", required = false) String sorts, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "page", value = "分页大小", required = true, defaultValue = "1") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "page") int page, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "size", value = "页码", required = true, defaultValue = "15") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "size") int size) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts, page, size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int count = (int)companyService.getCount(filters); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(appVersions, count, page, size, VoluntaryRecruitmentCompanyDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @GetMapping(value = "list") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    @ApiOperation(value = "获取列表") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public ListEnvelop<VoluntaryRecruitmentCompanyDO> list ( 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "fields", value = "返回的字段,为空返回全部字段") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "fields", required = false) String fields, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "filters", value = "过滤器,为空检索所有条件") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "filters", required = false) String filters, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @ApiParam(name = "sorts", value = "排序,规则参见说明文档") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            @RequestParam(value = "sorts", required = false) String sorts) throws Exception { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<VoluntaryRecruitmentCompanyDO> appVersions = companyService.search(fields, filters, sorts); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return success(appVersions, VoluntaryRecruitmentCompanyDO.class); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |