package com.panzhihua.service_jinhui_community.api;
|
|
import com.panzhihua.common.model.vos.R;
|
import com.panzhihua.common.model.vos.jinhui.JinhuiMicroVolunteeringTypeVO;
|
import com.panzhihua.common.model.vos.jinhui.JinhuiMicroVolunteeringVO;
|
import com.panzhihua.service_jinhui_community.entity.JinhuiMicroVolunteeringType;
|
import com.panzhihua.service_jinhui_community.service.JinhuiMicroVolunteeringService;
|
import com.panzhihua.service_jinhui_community.service.JinhuiMicroVolunteeringTypeService;
|
import lombok.extern.slf4j.Slf4j;
|
import org.springframework.web.bind.annotation.*;
|
|
import javax.annotation.Resource;
|
|
|
/**
|
* @auther llming
|
* @describe 金汇微心愿
|
*/
|
@Slf4j
|
@RestController
|
@RequestMapping("/micro")
|
public class JinhuiMicroVolunteeringApi
|
{
|
|
@Resource
|
private JinhuiMicroVolunteeringService recordService;
|
|
@Resource
|
private JinhuiMicroVolunteeringTypeService volunteeringTypeService;
|
|
/**
|
* 分页查询
|
* @param
|
* @return
|
*/
|
@GetMapping("/volunteering/getList")
|
public R volunteeringGetList(@RequestParam("pageNum") int pageNum,
|
@RequestParam("pageSize") int pageSize,
|
@RequestParam(value = "userId", required = false) String userId,
|
@RequestParam(value = "state", required = false) String state)
|
{
|
return recordService.getList(pageNum,pageSize,userId,state);
|
}
|
|
/**
|
* 详情
|
* @param id
|
* @return
|
*/
|
@GetMapping("/volunteering/getDetails")
|
public R volunteeringGetDetails(@RequestParam("id") String id)
|
{
|
return R.ok(recordService.getDetails(id));
|
}
|
/**
|
* 新增
|
* @param
|
* @return
|
*/
|
@PostMapping("/volunteering/addData")
|
public R volunteeringAddData(@RequestBody JinhuiMicroVolunteeringVO item)
|
{
|
return recordService.addData(item);
|
}
|
|
/**
|
* 编辑
|
* @param item
|
* @return
|
*/
|
@PostMapping("/volunteering/editData")
|
public R volunteeringEditData(@RequestBody JinhuiMicroVolunteeringVO item)
|
{
|
return recordService.editData(item);
|
}
|
|
/**
|
* 删除
|
* @param id
|
* @return
|
*/
|
@DeleteMapping("/volunteering/expurgateData")
|
public R volunteeringExpurgateData(@RequestParam("id") String id)
|
{
|
return recordService.expurgateData(id);
|
}
|
|
|
/***************************************************************************************************************
|
*
|
*
|
* 金汇微心愿分类
|
*
|
*
|
*****************************************************************************************************************/
|
/**
|
* 分页查询
|
* @param
|
* @return
|
*/
|
@GetMapping("/type/getList")
|
public R volunteeringTypeGetList(@RequestParam("pageNum") int pageNum,
|
@RequestParam("pageSize") int pageSize)
|
{
|
return volunteeringTypeService.getList(pageNum,pageSize);
|
}
|
|
|
/**
|
* 详情
|
* @param
|
* @return
|
*/
|
@GetMapping("/type/getDetails")
|
public R volunteeringTypeGetDetails(@RequestParam("id") String id)
|
{
|
return R.ok(volunteeringTypeService.getDetails(id));
|
}
|
|
/**
|
* 新增
|
* @param
|
* @return
|
*/
|
@PostMapping("/type/addData")
|
public R volunteeringTypeAddData(@RequestBody JinhuiMicroVolunteeringTypeVO item)
|
{
|
return volunteeringTypeService.addData(item);
|
}
|
|
/**
|
* 编辑
|
* @param
|
* @return
|
*/
|
@PostMapping("/type/editData")
|
public R volunteeringTypeEditData(@RequestBody JinhuiMicroVolunteeringTypeVO item)
|
{
|
return volunteeringTypeService.editData(item);
|
}
|
|
/**
|
* 删除
|
* @param
|
* @return
|
*/
|
@DeleteMapping("/type/expurgateData")
|
public R volunteeringTypeExpurgateData(@RequestParam("id") String id)
|
{
|
return volunteeringTypeService.expurgateData(id);
|
}
|
|
|
}
|