| package com.mzl.flower.base; | 
|   | 
| import org.springframework.http.HttpStatus; | 
| import org.springframework.http.ResponseEntity; | 
|   | 
| import java.io.Serializable; | 
|   | 
| public class BaseController<T> implements Serializable { | 
|     public BaseController() { | 
|     } | 
|   | 
|     protected ResponseEntity<ReturnDataDTO<?>> returnData(String code, Object data,String msg) { | 
|         return new ResponseEntity(new ReturnDataDTO(code, data, msg), HttpStatus.OK); | 
|     } | 
|   | 
|     protected ResponseEntity<ReturnDataDTO<?>> returnData(String code, Object data) { | 
|         return new ResponseEntity(new ReturnDataDTO(code, data, ""), HttpStatus.OK); | 
|     } | 
| } |