| | |
| | | import javax.validation.Valid; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import com.xiaopeng.common.log.annotation.AdminOperationLog; |
| | | import com.xiaopeng.common.log.enums.AdminBusinessType; |
| | | import com.xiaopeng.common.log.enums.AdminOperationType; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | |
| | | @ApiOperation(value = "运维人员管理新增", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/operationsUser/add") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.ADD, |
| | | content = "新增运维人员", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> add(@RequestBody XpOperationsUserAddDTO dto) { |
| | | return xpOperationsUserService.addOperationsUser(dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "运维人员管理编辑", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/operationsUser/edit") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.EDIT, |
| | | content = "编辑运维人员", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> edit(@RequestBody XpOperationsUserAddDTO dto) { |
| | | return xpOperationsUserService.editOperationsUser(dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "运维人员管理启用禁用", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/operationsUser/enableDisableById") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.SWITCH_STATUS, |
| | | content = "运维人员管理启用禁用", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> enableDisableById(@RequestBody EnableDisableDTO dto) { |
| | | xpOperationsUserService.enableDisableById(dto); |
| | | return R.ok(); |
| | |
| | | |
| | | @ApiOperation(value = "运维人员管理删除", tags = {"管理后台-运维执行"}) |
| | | @DeleteMapping("/api/v1/operationsUser/deleteById") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.DELETE, |
| | | content = "删除运维人员", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> deleteById(@RequestParam Long id) { |
| | | try { |
| | | R<XpFleet> fleetResult = xpFleetClient.getFleetByOperationsUserId(id); |
| | |
| | | |
| | | @ApiOperation(value = "运维人员管理重置密码", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/operationsUser/rePassword") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.RESET_PASSWORD, |
| | | content = "重置运维人员密码", |
| | | appendRequestData = true |
| | | ) |
| | | public R<String> rePassword(@RequestBody RePasswordDTO dto) { |
| | | xpOperationsUserService.rePassword(dto); |
| | | return R.ok(); |
| | |
| | | |
| | | @ApiOperation(value = "运维人员管理导出列表", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/operationsUser/exportOperationsUser") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.EXPORT, |
| | | content = "导出运维人员列表", |
| | | appendRequestData = true |
| | | ) |
| | | public void exportOperationsUser(@RequestBody XpOperationsUserQuery query, HttpServletResponse response) { |
| | | xpOperationsUserService.exportOperationsUser(query, response); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "运维人员管理导出模板", tags = {"管理后台-运维执行"}) |
| | | @GetMapping("/api/v1/operationsUser/exportTemplate") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.EXPORT, |
| | | content = "导出运维人员模板", |
| | | appendRequestData = false |
| | | ) |
| | | public void exportTemplate(HttpServletResponse response) { |
| | | xpOperationsUserService.exportTemplate(response); |
| | | } |
| | |
| | | |
| | | @ApiOperation(value = "运维人员管理导入数据", tags = {"管理后台-运维执行"}) |
| | | @PostMapping("/api/v1/operationsUser/importOperationsUser") |
| | | @AdminOperationLog( |
| | | businessType = AdminBusinessType.OPERATIONS_USER_MANAGEMENT, |
| | | operationType = AdminOperationType.IMPORT, |
| | | content = "导入运维人员数据", |
| | | appendRequestData = false |
| | | ) |
| | | public R<String> importOperationsUser(@RequestParam("file") MultipartFile file) { |
| | | xpOperationsUserService.importOperationsUser(file); |
| | | return R.ok(); |