增加接口操作日志
This commit is contained in:
parent
d26f02ffb3
commit
ef7330f48f
@ -4,6 +4,8 @@ package com.xhpc.workorder.controller;
|
||||
import com.xhpc.common.core.web.controller.BaseController;
|
||||
import com.xhpc.common.core.web.domain.AjaxResult;
|
||||
import com.xhpc.common.core.web.page.TableDataInfo;
|
||||
import com.xhpc.common.log.annotation.Log;
|
||||
import com.xhpc.common.log.enums.BusinessType;
|
||||
import com.xhpc.workorder.domain.XhpcWorkOrderDomain;
|
||||
import com.xhpc.workorder.service.WorkOrderService;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -32,7 +34,7 @@ public class WorkOrderController extends BaseController {
|
||||
return getDataTable(workOrderService.getOrderPage(params));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "工单-新增工单", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/")
|
||||
public AjaxResult insertNewOrder(@RequestBody XhpcWorkOrderDomain domain){
|
||||
return AjaxResult.success(workOrderService.insertOrder(domain));
|
||||
@ -44,13 +46,13 @@ public class WorkOrderController extends BaseController {
|
||||
return AjaxResult.success(workOrderService.selectOrderById(orderId));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "工单-维护工单", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{orderId}")
|
||||
public AjaxResult updateOrderInfo(@RequestBody XhpcWorkOrderDomain domain){
|
||||
return AjaxResult.success(workOrderService.updateOrder(domain));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "工单-删除工单", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{orderId}")
|
||||
public AjaxResult deleteOrder(@PathVariable("orderId")Long orderId) throws Exception {
|
||||
return AjaxResult.success(workOrderService.deleteOrder(orderId));
|
||||
|
||||
@ -50,7 +50,8 @@ public class WorkStationController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "导入设备", businessType = BusinessType.INSERT)
|
||||
|
||||
@Log(title = "场站设备-导入设备", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/importData")
|
||||
public AjaxResult importDevice(MultipartFile file, boolean updateSupport) throws Exception {
|
||||
if(file == null){
|
||||
@ -64,12 +65,14 @@ public class WorkStationController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "场站设备-新增设备", businessType = BusinessType.INSERT)
|
||||
@PostMapping("/")
|
||||
public AjaxResult insertNewDevice(@RequestBody XhpcStationDeviceDomain domain) throws Exception{
|
||||
return AjaxResult.success(stationService.insertDevice(domain));
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "场站设备-维护设备信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{deviceId}")
|
||||
public AjaxResult updateDeviceInfo(@RequestBody XhpcStationDeviceDomain domain,
|
||||
@PathVariable("deviceId")Long deviceId){
|
||||
@ -79,6 +82,7 @@ public class WorkStationController extends BaseController {
|
||||
}
|
||||
|
||||
|
||||
@Log(title = "场站设备-删除设备信息", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{deviceId}")
|
||||
public AjaxResult deleteDeviceInfo(@PathVariable("deviceId") Long deviceId) throws Exception {
|
||||
return AjaxResult.success(stationService.deleteDevice(deviceId));
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user