deason 1 жил өмнө
parent
commit
1985226da8

+ 17 - 0
src/main/java/com/qmth/exam/reserve/bean/login/WechatLoginReq.java

@@ -0,0 +1,17 @@
+package com.qmth.exam.reserve.bean.login;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class WechatLoginReq {
+
+    @ApiModelProperty(value = "考生-微信OID", required = true)
+    private String openId;
+
+    @ApiModelProperty(value = "考生-微信UID", required = true)
+    private String uid;
+
+}

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

@@ -0,0 +1,41 @@
+package com.qmth.exam.reserve.bean.student;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class StudentInfo {
+
+    @ApiModelProperty(value = "学校ID")
+    private Long orgId;
+
+    @ApiModelProperty(value = "ID")
+    private Long id;
+
+    @ApiModelProperty(value = "姓名")
+    private String name;
+
+    @ApiModelProperty(value = "考生学号")
+    private String studentCode;
+
+    @ApiModelProperty(value = "考生证件号")
+    private String identityNumber;
+
+    @ApiModelProperty(value = "考生头像相对路径")
+    private String photoPath;
+
+    @ApiModelProperty(value = "所属教学点ID")
+    private String teachingId;
+
+    @ApiModelProperty(value = "所属教学点名称")
+    private String teachingName;
+
+    @ApiModelProperty(value = "允许预约时段数量")
+    private String applyNumber;
+
+    @ApiModelProperty(value = "考生教学点所在城市ID")
+    private String cityId;
+
+}

+ 17 - 0
src/main/java/com/qmth/exam/reserve/bean/student/WechatBindReq.java

@@ -0,0 +1,17 @@
+package com.qmth.exam.reserve.bean.student;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Getter;
+import lombok.Setter;
+
+@Getter
+@Setter
+public class WechatBindReq {
+
+    @ApiModelProperty(value = "考生-微信OID")
+    private String openId;
+
+    @ApiModelProperty(value = "考生-微信UID")
+    private String uid;
+
+}

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

@@ -4,6 +4,7 @@ import com.qmth.boot.api.annotation.Aac;
 import com.qmth.boot.api.constant.ApiConstant;
 import com.qmth.exam.reserve.bean.login.LoginReq;
 import com.qmth.exam.reserve.bean.login.SessionUser;
+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;
@@ -26,4 +27,19 @@ public class LoginController extends BaseController {
         return user;
     }
 
+    @ApiOperation(value = "考生登录(微信号)")
+    @PostMapping(value = "/login/for/wechat")
+    public SessionUser loginForWechat(@RequestBody WechatLoginReq req) {
+        SessionUser user = new SessionUser();
+        //todo
+        return user;
+    }
+
+    @Aac(strict = false, auth = true)
+    @ApiOperation(value = "考生登出")
+    @PostMapping(value = "/logout")
+    public void logout() {
+        //todo
+    }
+
 }

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

@@ -0,0 +1,41 @@
+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.student.StudentInfo;
+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.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+@RestController
+@Api(tags = "考生相关接口")
+@RequestMapping(ApiConstant.DEFAULT_URI_PREFIX + "/student")
+@Aac(strict = false, auth = true)
+public class StudentController extends BaseController {
+
+    @ApiOperation(value = "考生账号与微信号绑定")
+    @PostMapping(value = "/wechat/binding")
+    public void binding(@RequestBody WechatBindReq req) {
+        //todo
+    }
+
+    @ApiOperation(value = "考生账号与微信号解绑")
+    @PostMapping(value = "/wechat/unbind")
+    public void unbind(@RequestBody WechatBindReq req) {
+        //todo
+    }
+
+    @ApiOperation(value = "获取考生信息")
+    @PostMapping(value = "/info")
+    public StudentInfo info() {
+        StudentInfo info = new StudentInfo();
+        //todo
+        return info;
+    }
+
+}