Browse Source

update api

deason 1 năm trước cách đây
mục cha
commit
0772c4eb8f

+ 20 - 0
src/main/java/com/qmth/exam/reserve/bean/examsite/ExamSiteInfo.java

@@ -0,0 +1,20 @@
+package com.qmth.exam.reserve.bean.examsite;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class ExamSiteInfo {
+
+    @ApiModelProperty(value = "考点ID")
+    private Long examSiteId;
+
+    @ApiModelProperty(value = "考点名称")
+    private String examSiteName;
+
+    @ApiModelProperty(value = "考点地址")
+    private String examSiteAddress;
+
+}

+ 3 - 3
src/main/java/com/qmth/exam/reserve/bean/student/StudentInfo.java

@@ -27,15 +27,15 @@ public class StudentInfo {
     private String photoPath;
 
     @ApiModelProperty(value = "所属教学点ID")
-    private String teachingId;
+    private Long teachingId;
 
     @ApiModelProperty(value = "所属教学点名称")
     private String teachingName;
 
     @ApiModelProperty(value = "允许预约时段数量")
-    private String applyNumber;
+    private Integer applyNumber;
 
     @ApiModelProperty(value = "考生教学点所在城市ID")
-    private String cityId;
+    private Long cityId;
 
 }

+ 4 - 0
src/main/java/com/qmth/exam/reserve/controller/admin/SystemPropertyController.java

@@ -6,6 +6,8 @@ import com.qmth.exam.reserve.bean.SystemPropertyBean;
 import com.qmth.exam.reserve.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -16,6 +18,8 @@ import org.springframework.web.bind.annotation.RestController;
 @Aac(strict = false, auth = false)
 public class SystemPropertyController extends BaseController {
 
+    private static final Logger log = LoggerFactory.getLogger(SystemPropertyController.class);
+
     @ApiOperation(value = "获取系统常用属性集合")
     @PostMapping(value = "/properties")
     public SystemPropertyBean properties() {

+ 4 - 0
src/main/java/com/qmth/exam/reserve/controller/admin/UserController.java

@@ -5,6 +5,8 @@ import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.exam.reserve.controller.BaseController;
 import com.qmth.exam.reserve.service.UserService;
 import io.swagger.annotations.Api;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
@@ -15,6 +17,8 @@ import org.springframework.web.bind.annotation.RestController;
 @Aac(strict = false, auth = true)
 public class UserController extends BaseController {
 
+    private static final Logger log = LoggerFactory.getLogger(UserController.class);
+
     @Autowired
     private UserService userService;
 

+ 20 - 0
src/main/java/com/qmth/exam/reserve/controller/student/CategoryController.java

@@ -0,0 +1,20 @@
+package com.qmth.exam.reserve.controller.student;
+
+import com.qmth.boot.api.annotation.Aac;
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.exam.reserve.controller.BaseController;
+import io.swagger.annotations.Api;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Api(tags = "数据分类相关接口")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/student/category")
+@Aac(strict = false, auth = true)
+public class CategoryController extends BaseController {
+
+    private static final Logger log = LoggerFactory.getLogger(CategoryController.class);
+
+}

+ 35 - 0
src/main/java/com/qmth/exam/reserve/controller/student/ExamSiteController.java

@@ -0,0 +1,35 @@
+package com.qmth.exam.reserve.controller.student;
+
+import com.qmth.boot.api.annotation.Aac;
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.exam.reserve.bean.examsite.ExamSiteInfo;
+import com.qmth.exam.reserve.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@RestController
+@Api(tags = "考点相关接口")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/student/exam/site")
+@Aac(strict = false, auth = true)
+public class ExamSiteController extends BaseController {
+
+    private static final Logger log = LoggerFactory.getLogger(ExamSiteController.class);
+
+    @ApiOperation(value = "获取“数据分类”关联的考点列表")
+    @PostMapping(value = "/list")
+    public List<ExamSiteInfo> list(@ApiParam("数据分类ID") @RequestParam Long categoryId) {
+        //todo
+        return new ArrayList<>();
+    }
+
+}

+ 4 - 0
src/main/java/com/qmth/exam/reserve/controller/student/LoginController.java

@@ -8,6 +8,8 @@ import com.qmth.exam.reserve.bean.login.WechatLoginReq;
 import com.qmth.exam.reserve.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -19,6 +21,8 @@ import org.springframework.web.bind.annotation.RestController;
 @Aac(strict = false, auth = false)
 public class LoginController extends BaseController {
 
+    private static final Logger log = LoggerFactory.getLogger(LoginController.class);
+
     @ApiOperation(value = "考生登录(账号)")
     @PostMapping(value = "/login")
     public SessionUser login(@RequestBody LoginReq req) {

+ 37 - 0
src/main/java/com/qmth/exam/reserve/controller/student/StudentApplyController.java

@@ -0,0 +1,37 @@
+package com.qmth.exam.reserve.controller.student;
+
+import com.qmth.boot.api.annotation.Aac;
+import com.qmth.boot.api.constant.ApiConstant;
+import com.qmth.exam.reserve.controller.BaseController;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Api(tags = "考生预约相关接口")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/student")
+@Aac(strict = false, auth = true)
+public class StudentApplyController extends BaseController {
+
+    private static final Logger log = LoggerFactory.getLogger(StudentApplyController.class);
+
+    @ApiOperation(value = "保存考生预约结果")
+    @PostMapping(value = "/apply/save")
+    public void save(@ApiParam("考点ID") @RequestParam Long examSiteId,
+                     @ApiParam("预约时段ID") @RequestParam Long timePeriodId) {
+        //todo
+    }
+
+    @ApiOperation(value = "取消考生预约结果")
+    @PostMapping(value = "/apply/cancel")
+    public void cancel(@ApiParam("预约ID") @RequestParam Long applyId) {
+        //todo
+    }
+
+}

+ 4 - 0
src/main/java/com/qmth/exam/reserve/controller/student/StudentController.java

@@ -7,6 +7,8 @@ import com.qmth.exam.reserve.bean.student.WechatBindReq;
 import com.qmth.exam.reserve.controller.BaseController;
 import io.swagger.annotations.Api;
 import io.swagger.annotations.ApiOperation;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestBody;
 import org.springframework.web.bind.annotation.RequestMapping;
@@ -18,6 +20,8 @@ import org.springframework.web.bind.annotation.RestController;
 @Aac(strict = false, auth = true)
 public class StudentController extends BaseController {
 
+    private static final Logger log = LoggerFactory.getLogger(StudentController.class);
+
     @ApiOperation(value = "考生账号与微信号绑定")
     @PostMapping(value = "/wechat/binding")
     public void binding(@RequestBody WechatBindReq req) {