| | |
| | | package com.mzl.flower.base; |
| | | |
| | | import com.mzl.flower.config.security.SecurityUtils; |
| | | import com.mzl.flower.entity.log.OperationRecord; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | |
| | |
| | | protected ResponseEntity<ReturnDataDTO<?>> returnData(String code, Object data) { |
| | | return new ResponseEntity(new ReturnDataDTO(code, data, ""), HttpStatus.OK); |
| | | } |
| | | |
| | | protected ResponseEntity<ReturnDataDTO<?>> returnData(String code, Object data, OperationRecord info) { |
| | | return new ResponseEntity(new ReturnDataInfoDTO(code, data, "",info), HttpStatus.OK); |
| | | } |
| | | |
| | | public OperationRecord getOperationRecord(String content) { |
| | | OperationRecord operationRecord = new OperationRecord(); |
| | | operationRecord.setContent(content); |
| | | operationRecord.create(SecurityUtils.getUserId()); |
| | | return operationRecord; |
| | | } |
| | | } |