You've already forked FrameTour-BE
添加"订单"的基础业务接口和实现
This commit is contained in:
@ -47,7 +47,7 @@ public class ApiResponse<T> implements Serializable {
|
||||
* @param data 返回数据内容
|
||||
* @return
|
||||
*/
|
||||
public static <T> ApiResponse<T> buildSuccessResponse(T data) {
|
||||
public static <T> ApiResponse<T> success(T data) {
|
||||
ApiResponse<T> response = new ApiResponse<T>();
|
||||
response.setCode(ApiConst.Code.CODE_SUCCESS.code());
|
||||
response.setData(data);
|
||||
@ -71,7 +71,7 @@ public class ApiResponse<T> implements Serializable {
|
||||
* @param msg
|
||||
* @return
|
||||
*/
|
||||
public static <T> ApiResponse<T> buildCommonErrorResponse(String msg) {
|
||||
public static <T> ApiResponse<T> commonError(String msg) {
|
||||
return buildResponse(ApiConst.Code.CODE_COMMON_ERROR, msg);
|
||||
}
|
||||
|
||||
|
@ -69,7 +69,9 @@ public class SnowFlakeUtil {
|
||||
| (machineId<< UniqueIdMetaData.MACHINE_SHIFT_BITS)
|
||||
| sequence);
|
||||
}
|
||||
|
||||
public static Long getLongId(){
|
||||
return Long.valueOf(getId());
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user