| | |
| | | */ |
| | | package org.springblade.modules.task.controller; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiParam; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import lombok.AllArgsConstructor; |
| | | import javax.validation.Valid; |
| | | |
| | | import org.springblade.core.secure.BladeUser; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springblade.core.mp.support.Condition; |
| | | import org.springblade.core.mp.support.Query; |
| | | import org.springblade.core.tool.api.R; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.modules.task.dto.TaskLabelReportingEventDTO; |
| | | import org.springblade.modules.task.entity.TaskLabelReportingEventEntity; |
| | | import org.springblade.modules.task.service.ITaskLabelReportingEventService; |
| | | import org.springblade.modules.task.vo.TaskLabelReportingEventVO; |
| | | import org.springblade.modules.task.wrapper.TaskLabelReportingEventWrapper; |
| | | import org.springblade.modules.task.service.ITaskLabelReportingEventService; |
| | | import org.springblade.core.boot.ctrl.BladeController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.validation.Valid; |
| | | |
| | | /** |
| | | * 打金店报事 控制器 |
| | |
| | | @ApiOperation(value = "详情", notes = "传入taskLabelReportingEvent") |
| | | public R<TaskLabelReportingEventVO> detail(TaskLabelReportingEventEntity taskLabelReportingEvent) { |
| | | TaskLabelReportingEventEntity detail = taskLabelReportingEventService.getOne(Condition.getQueryWrapper(taskLabelReportingEvent)); |
| | | return R.data(TaskLabelReportingEventWrapper.build().entityVO(detail)); |
| | | return R.data(TaskLabelReportingEventWrapper.build(). entityVO(detail)); |
| | | } |
| | | /** |
| | | * 打金店报事 分页 |
| | |
| | | @PostMapping("/save") |
| | | @ApiOperationSupport(order = 4) |
| | | @ApiOperation(value = "新增", notes = "传入taskLabelReportingEvent") |
| | | public R save(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) { |
| | | public R save(@Valid @RequestBody TaskLabelReportingEventDTO taskLabelReportingEvent) { |
| | | return R.status(taskLabelReportingEventService.saveReportingEven(taskLabelReportingEvent)); |
| | | } |
| | | |
| | |
| | | @PostMapping("/update") |
| | | @ApiOperationSupport(order = 5) |
| | | @ApiOperation(value = "修改", notes = "传入taskLabelReportingEvent") |
| | | public R update(@Valid @RequestBody TaskLabelReportingEventEntity taskLabelReportingEvent) { |
| | | public R update(@Valid @RequestBody TaskLabelReportingEventVO taskLabelReportingEvent) throws Exception { |
| | | return R.status(taskLabelReportingEventService.updateLabelReporting(taskLabelReportingEvent)); |
| | | } |
| | | |
| | |
| | | @ApiOperationSupport(order = 7) |
| | | @ApiOperation(value = "逻辑删除", notes = "传入ids") |
| | | public R remove(@ApiParam(value = "主键集合", required = true) @RequestParam String ids) { |
| | | return R.status(taskLabelReportingEventService.deleteLogic(Func.toLongList(ids))); |
| | | return R.status(taskLabelReportingEventService.removeByIds(Func.toLongList(ids))); |
| | | } |
| | | |
| | | |