1.1
tj
2025-06-05 77c1b2e42b966f6ac3781efceb2cffdd590addec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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);
    }
}