package com.nq.controller; import java.util.List; import com.nq.common.BaseController; import com.nq.common.page.TableDataInfo; import com.nq.pojo.UserLeverApply; import com.nq.service.IUserLeverApplyService; import com.nq.vo.AjaxResult; import com.nq.vo.user.UserApplyEditParamVo; import com.nq.vo.user.UserApplyLeverRes; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PutMapping; import org.springframework.web.bind.annotation.DeleteMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; @RestController @RequestMapping("/userLever/apply") public class UserLeverApplyController extends BaseController { @Autowired private IUserLeverApplyService userLeverApplyService; /** * 查询【请填写功能名称】列表 */ @GetMapping("/list") public TableDataInfo list(UserLeverApply userLeverApply) { startPage(); List list = userLeverApplyService.selectUserLeverApplyVoList(userLeverApply); return getDataTable(list); } @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Long id) { return AjaxResult.success(userLeverApplyService.selectUserLeverApplyById(id)); } @PostMapping("/applyUserLever") public AjaxResult add( UserLeverApply userLeverApply) { return toAjax(userLeverApplyService.insertUserLeverApply(userLeverApply)); } @PostMapping("/editUserLever") public AjaxResult editUserLever(UserApplyEditParamVo paramVo) { return toAjax(userLeverApplyService.editUserLever(paramVo)); } @PostMapping("/checkUserLever") public AjaxResult edit(UserLeverApply userLeverApply) { return toAjax(userLeverApplyService.updateUserLeverApply(userLeverApply)); } @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Long[] ids) { return toAjax(userLeverApplyService.deleteUserLeverApplyByIds(ids)); } }