统一post
This commit is contained in:
parent
3da89c6026
commit
4a70e627f8
|
|
@ -85,7 +85,7 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑边带记录设备数据")
|
||||
@RequiresPermissions("base:info:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdDeviceRecord record) {
|
||||
return toAjax(tbBdDeviceRecordService.updateByPrimaryKeySelective(record));
|
||||
}
|
||||
|
|
@ -94,14 +94,14 @@ public class TbBdDeviceRecordController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param record
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除边带记录设备数据")
|
||||
@RequiresPermissions("base:info:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbBdDeviceRecordService.deleteByPrimaryKey(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbBdDeviceRecord record) {
|
||||
return tbBdDeviceRecordService.deleteByPrimaryKey(record.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -85,7 +85,7 @@ public class TbBdRecordController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑边带申请数据")
|
||||
@RequiresPermissions("base:record:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody @NotNull(message = "参数不能为空") @Valid TbBdRecord tbBdRecord) {
|
||||
return tbBdRecordService.updateByPrimaryKeySelective(tbBdRecord);
|
||||
}
|
||||
|
|
@ -94,14 +94,14 @@ public class TbBdRecordController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbBdRecord
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除边带申请数据")
|
||||
@RequiresPermissions("base:record:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbBdRecordService.deleteByPrimaryKey(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbBdRecord tbBdRecord) {
|
||||
return tbBdRecordService.deleteByPrimaryKey(tbBdRecord.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -71,9 +71,9 @@ public class TbDevAttributeController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "删除设备监测数据")
|
||||
@RequiresPermissions("base:attribute:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return toAjax(tbDevAttributeService.deleteByPrimaryKey(id));
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbDevAttribute record) {
|
||||
return toAjax(tbDevAttributeService.deleteByPrimaryKey(record.getId()));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ public class TbDeviceController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑设备数据")
|
||||
@RequiresPermissions("base:device:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Valid @RequestBody TbDevice tbDevice) {
|
||||
return tbDeviceService.updateByPrimaryKeySelective(tbDevice);
|
||||
}
|
||||
|
|
@ -83,14 +83,14 @@ public class TbDeviceController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbDevice
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除设备数据")
|
||||
@RequiresPermissions("base:device:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbDeviceService.deleteByPrimaryKey(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbDevice tbDevice) {
|
||||
return tbDeviceService.deleteByPrimaryKey(tbDevice.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -90,7 +90,7 @@ public class TbPeopleController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑人员数据")
|
||||
@RequiresPermissions("base:people:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Valid @RequestBody TbPeople tbPeople) {
|
||||
return tbPeopleService.update(tbPeople);
|
||||
}
|
||||
|
|
@ -98,14 +98,14 @@ public class TbPeopleController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbPeople
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除人员数据")
|
||||
@RequiresPermissions("base:people:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbPeopleService.deleteById(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbPeople tbPeople) {
|
||||
return tbPeopleService.deleteById(tbPeople.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class TbProPowerController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑杆塔数据")
|
||||
@RequiresPermissions("base:power:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Valid @RequestBody TbProPower tbProPower) {
|
||||
return tbProPowerService.update(tbProPower);
|
||||
}
|
||||
|
|
@ -92,14 +92,14 @@ public class TbProPowerController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbProPower
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除杆塔数据")
|
||||
@RequiresPermissions("base:power:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbProPowerService.deleteById(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbProPower tbProPower) {
|
||||
return tbProPowerService.deleteById(tbProPower.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ public class TbProjectController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑工程数据")
|
||||
@RequiresPermissions("base:project:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Valid @RequestBody TbProject tbProject) {
|
||||
return tbProjectService.update(tbProject);
|
||||
}
|
||||
|
|
@ -92,14 +92,14 @@ public class TbProjectController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbProject
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除工程数据")
|
||||
@RequiresPermissions("base:project:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbProjectService.deleteById(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbProject tbProject) {
|
||||
return tbProjectService.deleteById(tbProject.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ public class TbTeamController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑班组信息")
|
||||
@RequiresPermissions("base:team:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@Valid @RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.update(tbTeam);
|
||||
}
|
||||
|
|
@ -90,14 +90,14 @@ public class TbTeamController extends BaseController {
|
|||
/**
|
||||
* 通过主键解散班组
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbTeam
|
||||
* @return 是否成功
|
||||
*/
|
||||
@ApiOperation(value = "通过主键解散班组")
|
||||
@RequiresPermissions("base:team:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbTeamService.deleteById(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbTeam tbTeam) {
|
||||
return tbTeamService.deleteById(tbTeam.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -158,7 +158,7 @@ public class TbTeamController extends BaseController {
|
|||
* @return 查询结果
|
||||
*/
|
||||
@ApiOperation(value = "查询安全帽类型设备列表")
|
||||
//@RequiresPermissions("base:team:list")
|
||||
@RequiresPermissions("base:team:list")
|
||||
@GetMapping("/devList")
|
||||
public AjaxResult queryByPage(TbDeviceVo tbDeviceVo) {
|
||||
return AjaxResult.success(tbTeamService.selectDeviceList(tbDeviceVo));
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ public class TbWarnConfigController extends BaseController {
|
|||
}
|
||||
|
||||
@ApiOperation(value = "查询设备预警配置数据")
|
||||
//@RequiresPermissions("base:warn:list")
|
||||
@RequiresPermissions("base:warn:list")
|
||||
@GetMapping("/getList")
|
||||
public AjaxResult getList(TbWarnConfig tbWarnConfig) {
|
||||
if (tbWarnConfig.getConfiguType().equals(Constants.TEMP_KEY)) {
|
||||
|
|
@ -121,7 +121,7 @@ public class TbWarnConfigController extends BaseController {
|
|||
*/
|
||||
@ApiOperation(value = "编辑预警配置数据")
|
||||
@RequiresPermissions("base:warn:edit")
|
||||
@PutMapping
|
||||
@PostMapping("/edit")
|
||||
public AjaxResult edit(@RequestBody @Valid TbWarnConfig tbWarnConfig) {
|
||||
return tbWarnConfigService.updateByPrimaryKeySelective(tbWarnConfig);
|
||||
}
|
||||
|
|
@ -130,14 +130,14 @@ public class TbWarnConfigController extends BaseController {
|
|||
/**
|
||||
* 删除数据
|
||||
*
|
||||
* @param id 主键
|
||||
* @param tbWarnConfig
|
||||
* @return 删除是否成功
|
||||
*/
|
||||
@ApiOperation(value = "删除预警配置数据")
|
||||
@RequiresPermissions("base:warn:delete")
|
||||
@DeleteMapping("/{id}")
|
||||
public AjaxResult deleteById(@PathVariable("id") Long id) {
|
||||
return tbWarnConfigService.deleteByPrimaryKey(id);
|
||||
@PostMapping("/deleteById")
|
||||
public AjaxResult deleteById(@RequestBody TbWarnConfig tbWarnConfig) {
|
||||
return tbWarnConfigService.deleteByPrimaryKey(tbWarnConfig.getId());
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue