Commit d0eae0dc authored by zhangzhenbang's avatar zhangzhenbang

初始化

parent 764914ec
Pipeline #144 failed with stages
package com.yingxin.beijingvehicleflow.controller;
import com.yingxin.beijingvehicleflow.response.Response;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -15,4 +17,9 @@ import org.springframework.web.bind.annotation.RestController;
@CrossOrigin
@RequestMapping("/api/v1")
public class ReservationController {
@PostMapping
public Response insertIdentityInfoAndReservation() {
return null;
}
}
package com.yingxin.beijingvehicleflow.response;
/**
* 返回狀態類
*
* @author 226
* @version 1.0
* @date 2020/2/13
*/
public class Response<T> {
private boolean status;
private String code;
private String msg;
private T data;
/*---------------------------常用構造器-----------------------------*/
private Response() {
}
private Response(boolean status) {
this.status = status;
}
private Response(boolean status, String code, String msg) {
this.status = status;
this.code = code;
this.msg = msg;
}
public Response(boolean status, String code, String msg, T data) {
this.code = code;
this.msg = msg;
this.status = status;
this.data = data;
}
/*---------------------------常用靜態方法-----------------------------*/
public static Response fail() {
return new Response(false);
}
public static Response fail(String code, String msg) {
return new Response(false, code, msg);
}
public static Response succ() {
return new Response(true);
}
public static Response succ(String code, String msg) {
return new Response(true, code, msg);
}
/*---------------------------Getter & Setter-----------------------------*/
public boolean isStatus() {
return status;
}
public void setStatus(boolean status) {
this.status = status;
}
public String getCode() {
return code;
}
public void setCode(String code) {
this.code = code;
}
public String getMsg() {
return msg;
}
public void setMsg(String msg) {
this.msg = msg;
}
public T getData() {
return data;
}
public void setData(T data) {
this.data = data;
}
}
package com.yingxin.beijingvehicleflow.service;
/**
* description //TODO
*
* @author 226
* @version 1.0
* @date 2020/2/23
*/
public interface ReservationService {
}
package com.yingxin.beijingvehicleflow.service.impl;
import com.yingxin.beijingvehicleflow.service.ReservationService;
import org.springframework.stereotype.Service;
/**
* description //TODO
*
* @author 226
* @version 1.0
* @date 2020/2/23
*/
@Service
public class ReservationServiceImpl implements ReservationService {
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment