| | |
| | | package com.panzhihua.service_jinhui_community.api; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiGoldCoinRecordVO; |
| | | import com.panzhihua.common.model.vos.jinhui.JinhuiMicroVolunteeringVO; |
| | | import com.panzhihua.service_jinhui_community.entity.JinhuiMicroVolunteering; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiGoldCoinRecordService; |
| | | import com.panzhihua.service_jinhui_community.service.JinhuiMicroVolunteeringService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | */ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/Micro") |
| | | @RequestMapping("/micro") |
| | | public class JinhuiMicroVolunteeringApi |
| | | { |
| | | |
| | | @Resource |
| | | private JinhuiMicroVolunteeringService recordService; |
| | | |
| | | |
| | | /** |
| | | * 分页查询 |
| | | * @param |
| | | * @return |
| | | */ |
| | | // @GetMapping("/Volunteering/getList") |
| | | // public R volunteeringGetList(int pageNum,int pageSize,String userId) |
| | | // { |
| | | // return recordService.getList(pageNum,pageSize,userId); |
| | | // } |
| | | // |
| | | // @GetMapping("/Volunteering/getList") |
| | | // public R volunteeringGetDetails(String id) |
| | | // { |
| | | // return R.ok(recordService.getDetails(id)); |
| | | // } |
| | | // /** |
| | | // * 新增 |
| | | // * @param |
| | | // * @return |
| | | // */ |
| | | // public R volunteeringAddData(JinhuiMicroVolunteeringVO item) |
| | | // { |
| | | // return recordService.addData(item); |
| | | // } |
| | | // |
| | | // public R volunteeringEditData(JinhuiMicroVolunteeringVO item) |
| | | // { |
| | | // return recordService.editData(item); |
| | | // } |
| | | // |
| | | // public R volunteeringExpurgateData(String id) |
| | | // { |
| | | // return recordService.expurgateData(id); |
| | | // } |
| | | @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/getList") |
| | | 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); |
| | | } |
| | | |
| | | |
| | | |