feat:1.优化commonResult 2. 重新初始化数据库结构
This commit is contained in:
@@ -0,0 +1,17 @@
|
|||||||
|
package com.guo.learningprogresstracker.config;
|
||||||
|
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||||
|
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||||
|
|
||||||
|
@Configuration
|
||||||
|
public class WebCorsConfig implements WebMvcConfigurer {
|
||||||
|
@Override
|
||||||
|
public void addCorsMappings(CorsRegistry registry) {
|
||||||
|
registry.addMapping("/**") // 配置所有路径
|
||||||
|
.allowedOrigins("http://localhost:5173")
|
||||||
|
.allowedMethods("GET", "POST", "PUT", "DELETE", "OPTIONS")
|
||||||
|
.allowedHeaders("*")
|
||||||
|
.allowCredentials(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -8,10 +8,6 @@ import org.slf4j.LoggerFactory;
|
|||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.web.servlet.HandlerInterceptor;
|
import org.springframework.web.servlet.HandlerInterceptor;
|
||||||
import org.springframework.web.servlet.ModelAndView;
|
import org.springframework.web.servlet.ModelAndView;
|
||||||
/**
|
|
||||||
* @Author: ChangYu
|
|
||||||
* @Version 1.0
|
|
||||||
*/
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 拦截器
|
* 拦截器
|
||||||
@@ -23,10 +19,7 @@ public class Interceptor implements HandlerInterceptor {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception {
|
||||||
/**
|
|
||||||
* token过期或失效时,由于前端基本都是AJAX请求,拦截器返回401,由前端负责跳转至OA登陆页面
|
|
||||||
* note:chang yu
|
|
||||||
*/
|
|
||||||
// StpUtil.checkLogin();
|
// StpUtil.checkLogin();
|
||||||
// //续签
|
// //续签
|
||||||
// StpUtil.updateLastActiveToNow();
|
// StpUtil.updateLastActiveToNow();
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class LoginController {
|
|||||||
|
|
||||||
@Operation(summary = "登录API")
|
@Operation(summary = "登录API")
|
||||||
@PostMapping("/login")
|
@PostMapping("/login")
|
||||||
public CommonResult<Object> login(@RequestBody LoginBody loginBody) throws AppException {
|
public CommonResult<String> login(@RequestBody LoginBody loginBody) throws AppException {
|
||||||
String userId = userServiceImpl.authenticate(loginBody.getUsername(), loginBody.getPassword());
|
String userId = userServiceImpl.authenticate(loginBody.getUsername(), loginBody.getPassword());
|
||||||
String token = loginService.login(userId);
|
String token = loginService.login(userId);
|
||||||
//todo 参数传递未加密
|
//todo 参数传递未加密
|
||||||
@@ -35,7 +35,7 @@ public class LoginController {
|
|||||||
|
|
||||||
@Operation(summary = "退出登录API-功能未完成")
|
@Operation(summary = "退出登录API-功能未完成")
|
||||||
@PostMapping("/loingOut")
|
@PostMapping("/loingOut")
|
||||||
public CommonResult loingOut(@RequestBody LoginBody loginBody) throws AppException {
|
public CommonResult<Void> loingOut(@RequestBody LoginBody loginBody) throws AppException {
|
||||||
//todo loginOut 退出登录API
|
//todo loginOut 退出登录API
|
||||||
// loginService.loginOut();
|
// loginService.loginOut();
|
||||||
return CommonResult.success("已登出");
|
return CommonResult.success("已登出");
|
||||||
|
|||||||
+5
-4
@@ -41,7 +41,7 @@ public class StudySessionController {
|
|||||||
* 通过sessionNum获取一个【学习会话】
|
* 通过sessionNum获取一个【学习会话】
|
||||||
*/
|
*/
|
||||||
@GetMapping("/{sessionNum}")
|
@GetMapping("/{sessionNum}")
|
||||||
public CommonResult getStudySessionBySessionNum(@NotEmpty(message = "sessionNum不可为空") @PathVariable String sessionNum) throws ErrorParameterException {
|
public CommonResult<StudySessionResponce> getStudySessionBySessionNum(@NotEmpty(message = "sessionNum不可为空") @PathVariable String sessionNum) throws ErrorParameterException {
|
||||||
StudySessionsEntity studySessionsEntity = studySessionsServiceImpl.getOneOpt(Wrappers.lambdaQuery(StudySessionsEntity.class)
|
StudySessionsEntity studySessionsEntity = studySessionsServiceImpl.getOneOpt(Wrappers.lambdaQuery(StudySessionsEntity.class)
|
||||||
.eq(StudySessionsEntity::getSessionNum, sessionNum))
|
.eq(StudySessionsEntity::getSessionNum, sessionNum))
|
||||||
.orElseThrow(() -> new ErrorParameterException("会话[" + sessionNum + "]不存在"));
|
.orElseThrow(() -> new ErrorParameterException("会话[" + sessionNum + "]不存在"));
|
||||||
@@ -53,7 +53,7 @@ public class StudySessionController {
|
|||||||
* 暂停一个【学习会话】
|
* 暂停一个【学习会话】
|
||||||
*/
|
*/
|
||||||
@PostMapping("/{sessionNum}/study-sessions/pause")
|
@PostMapping("/{sessionNum}/study-sessions/pause")
|
||||||
public CommonResult pauseStudySession(@PathVariable("sessionNum") String sessionNum) throws ErrorParameterException {
|
public CommonResult<Void> pauseStudySession(@PathVariable("sessionNum") String sessionNum) throws ErrorParameterException {
|
||||||
studySessionsServiceImpl.pauseStudySession(sessionNum);
|
studySessionsServiceImpl.pauseStudySession(sessionNum);
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}
|
}
|
||||||
@@ -62,16 +62,17 @@ public class StudySessionController {
|
|||||||
* 结束一个【学习会话】
|
* 结束一个【学习会话】
|
||||||
*/
|
*/
|
||||||
@PostMapping("/{sessionNum}/study-sessions/ended")
|
@PostMapping("/{sessionNum}/study-sessions/ended")
|
||||||
public CommonResult endedStudySession(@PathVariable("sessionNum") String sessionNum,
|
public CommonResult<Void> endedStudySession(@PathVariable("sessionNum") String sessionNum,
|
||||||
@Valid @RequestBody EndedStudySessionRequest request) throws ErrorParameterException {
|
@Valid @RequestBody EndedStudySessionRequest request) throws ErrorParameterException {
|
||||||
studySessionsServiceImpl.endedStudySession(sessionNum, request.getContent());
|
studySessionsServiceImpl.endedStudySession(sessionNum, request.getContent());
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取【学习会话】所有的学习残片数据,以列表返回
|
* 获取【学习会话】所有的学习残片数据,以列表返回
|
||||||
*/
|
*/
|
||||||
@GetMapping("/{sessionNum}/all-fragments")
|
@GetMapping("/{sessionNum}/all-fragments")
|
||||||
public CommonResult getAllFragments(@PathVariable("sessionNum") String sessionNum) throws ErrorParameterException {
|
public CommonResult<ArrayList<String>> getAllFragments(@PathVariable("sessionNum") String sessionNum) throws ErrorParameterException {
|
||||||
ArrayList<String> allFragments = studySessionsServiceImpl.getAllFragments(sessionNum);
|
ArrayList<String> allFragments = studySessionsServiceImpl.getAllFragments(sessionNum);
|
||||||
return CommonResult.success(allFragments);
|
return CommonResult.success(allFragments);
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
package com.guo.learningprogresstracker.controller;
|
package com.guo.learningprogresstracker.controller;
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.guo.learningprogresstracker.common.Ops;
|
import com.guo.learningprogresstracker.common.Ops;
|
||||||
|
import com.guo.learningprogresstracker.dto.TaskInfo;
|
||||||
import com.guo.learningprogresstracker.dto.response.StudySessionResponce;
|
import com.guo.learningprogresstracker.dto.response.StudySessionResponce;
|
||||||
|
import com.guo.learningprogresstracker.dto.response.TaskInfoResponse;
|
||||||
import com.guo.learningprogresstracker.entity.CommonResult;
|
import com.guo.learningprogresstracker.entity.CommonResult;
|
||||||
import com.guo.learningprogresstracker.dto.request.TaskRequest;
|
import com.guo.learningprogresstracker.dto.request.TaskRequest;
|
||||||
import com.guo.learningprogresstracker.exception.ErrorParameterException;
|
import com.guo.learningprogresstracker.exception.ErrorParameterException;
|
||||||
@@ -27,6 +30,7 @@ import java.rmi.ServerException;
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 任务控制层
|
* 任务控制层
|
||||||
|
*
|
||||||
* @author guo
|
* @author guo
|
||||||
*/
|
*/
|
||||||
@RequestMapping("/tasks")
|
@RequestMapping("/tasks")
|
||||||
@@ -41,43 +45,42 @@ public class TaskController {
|
|||||||
|
|
||||||
@PostMapping
|
@PostMapping
|
||||||
@Operation(summary = "添加新任务")
|
@Operation(summary = "添加新任务")
|
||||||
public CommonResult addTask(@RequestBody @Validated({Ops.CreateG.class}) TaskRequest taskRequest) throws ErrorParameterException {
|
public CommonResult<String> addTask(@RequestBody @Validated({Ops.CreateG.class}) TaskRequest taskRequest) throws ErrorParameterException {
|
||||||
return CommonResult.success(tasksService.addTask(taskRequest));
|
return CommonResult.success(tasksService.addTask(taskRequest));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Operation(summary = "任务详情API")
|
@Operation(summary = "任务详情API")
|
||||||
@GetMapping("/{taskId}")
|
@GetMapping("/{taskId}")
|
||||||
public CommonResult getTask(@PathVariable("taskId") String taskId) {
|
public CommonResult<TaskInfoResponse> getTask(@PathVariable("taskId") String taskId) {
|
||||||
return CommonResult.success(tasksService.getTask(taskId));
|
return CommonResult.success(tasksService.getTask(taskId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@PutMapping("/{taskId}")
|
@PutMapping("/{taskId}")
|
||||||
@Operation(summary = "更新任务详情")
|
@Operation(summary = "更新任务详情")
|
||||||
public CommonResult updateTask(@PathVariable("taskId") String taskId,@Validated(Ops.UpdateG.class) @RequestBody TaskRequest updatedTask) {
|
public CommonResult<Void> updateTask(@PathVariable("taskId") String taskId, @Validated(Ops.UpdateG.class) @RequestBody TaskRequest updatedTask) {
|
||||||
tasksService.updateTask(taskId, updatedTask);
|
tasksService.updateTask(taskId, updatedTask);
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@DeleteMapping("/{taskId}")
|
@DeleteMapping("/{taskId}")
|
||||||
@Operation(summary = "删除指定任务")
|
@Operation(summary = "删除指定任务")
|
||||||
public CommonResult deleteTask(@PathVariable("taskId") String taskId) throws ServerException {
|
public CommonResult<Void> deleteTask(@PathVariable("taskId") String taskId) throws ServerException {
|
||||||
tasksService.deleteTask(taskId);
|
tasksService.deleteTask(taskId);
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}
|
}
|
||||||
|
|
||||||
@GetMapping
|
@GetMapping
|
||||||
@Operation(summary = "获取所有任务列表")
|
@Operation(summary = "获取所有任务列表")
|
||||||
public CommonResult tasksList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
public CommonResult<Page<TaskInfo>> tasksList(@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum,
|
||||||
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize) {
|
||||||
return CommonResult.success(tasksService.taskList(pageNum, pageSize));
|
return CommonResult.success(tasksService.taskList(pageNum, pageSize));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 开始或继续一个【学习会话】
|
* 开始或继续一个【学习会话】
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
@GetMapping("/{taskNum}/study-sessions/start-or-continue")
|
@GetMapping("/{taskNum}/study-sessions/start-or-continue")
|
||||||
public CommonResult startOrContinueStudySession(@NotEmpty(message = "taskNum不可为空")
|
public CommonResult<StudySessionResponce> startOrContinueStudySession(@NotEmpty(message = "taskNum不可为空")
|
||||||
@PathVariable String taskNum) throws NotFindEntitiesException {
|
@PathVariable String taskNum) throws NotFindEntitiesException {
|
||||||
StudySessionResponce response = studySessionsServiceImpl.startOrContinueStudySession(taskNum);
|
StudySessionResponce response = studySessionsServiceImpl.startOrContinueStudySession(taskNum);
|
||||||
return CommonResult.success(response);
|
return CommonResult.success(response);
|
||||||
@@ -88,7 +91,7 @@ public class TaskController {
|
|||||||
* 通过学习任务num获取该任务的未结束会话
|
* 通过学习任务num获取该任务的未结束会话
|
||||||
*/
|
*/
|
||||||
@GetMapping("/{taskNum}/not-ended-study-session")
|
@GetMapping("/{taskNum}/not-ended-study-session")
|
||||||
public CommonResult getNotEndedStudySessionByTaskNum(@NotEmpty(message = "taskNum不可为空")
|
public CommonResult<StudySessionResponce> getNotEndedStudySessionByTaskNum(@NotEmpty(message = "taskNum不可为空")
|
||||||
@PathVariable String taskNum) throws ErrorParameterException {
|
@PathVariable String taskNum) throws ErrorParameterException {
|
||||||
StudySessionResponce response = studySessionsServiceImpl.getNotEndedStudySessionByTaskNum(taskNum);
|
StudySessionResponce response = studySessionsServiceImpl.getNotEndedStudySessionByTaskNum(taskNum);
|
||||||
return CommonResult.success(response);
|
return CommonResult.success(response);
|
||||||
|
|||||||
+1
-1
@@ -28,7 +28,7 @@ public class reportFragmentsController {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
@PostMapping
|
@PostMapping
|
||||||
public CommonResult createFragments(@Valid @RequestBody CreateFragmentsRequest request) throws NotFindEntitiesException {
|
public CommonResult<Void> createFragments(@Valid @RequestBody CreateFragmentsRequest request) throws NotFindEntitiesException {
|
||||||
studyReportFragmentsServiceImpl.createFragments(request);
|
studyReportFragmentsServiceImpl.createFragments(request);
|
||||||
return CommonResult.success();
|
return CommonResult.success();
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,54 +1,50 @@
|
|||||||
package com.guo.learningprogresstracker.entity;
|
package com.guo.learningprogresstracker.entity;
|
||||||
|
|
||||||
|
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.NoArgsConstructor;
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
@NoArgsConstructor
|
@NoArgsConstructor
|
||||||
public class CommonResult<T> {
|
public class CommonResult<T> {
|
||||||
private Integer code;
|
private Integer code;
|
||||||
|
|
||||||
private String message;
|
private String message;
|
||||||
|
|
||||||
private T data;
|
private T data;
|
||||||
|
|
||||||
public CommonResult(Integer code, String message) {
|
public CommonResult(Integer code, String message) {
|
||||||
this(code, message, null);
|
this(code, message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult<String> success(){
|
public static <T> CommonResult<T> success() {
|
||||||
return new CommonResult(200,"请求成功",null);
|
return new CommonResult<>(200, "请求成功", null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult<String> success(String message){
|
public static <T> CommonResult<T> success(String message) {
|
||||||
return new CommonResult(200,message,null);
|
return new CommonResult<>(200, message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult<Object> success(String message,Object data){
|
public static <T> CommonResult<T> success(T data) {
|
||||||
return new CommonResult(200,message,data);
|
return new CommonResult<>(200, "请求成功", data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult success(Object data){
|
public static <T> CommonResult<T> success(String message, T data) {
|
||||||
return new CommonResult(200,"请求成功",data);
|
return new CommonResult<>(200, message, data);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult<String> error(String message){
|
public static <T> CommonResult<T> error(String message) {
|
||||||
return new CommonResult<>(400, message, null);
|
return new CommonResult<>(400, message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult<String> notFind(){
|
public static <T> CommonResult<T> notFind() {
|
||||||
return new CommonResult<>(404, "请求的资源不存在", null);
|
return new CommonResult<>(404, "请求的资源不存在", null);
|
||||||
}
|
}
|
||||||
public static CommonResult<String> notFind(String message){
|
|
||||||
|
public static <T> CommonResult<T> notFind(String message) {
|
||||||
return new CommonResult<>(404, message, null);
|
return new CommonResult<>(404, message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static CommonResult<String> serverError(String message){
|
public static <T> CommonResult<T> serverError(String message) {
|
||||||
return new CommonResult<>(500, message, null);
|
return new CommonResult<>(500, message, null);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
package com.guo.learningprogresstracker.service.impl;
|
package com.guo.learningprogresstracker.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
@@ -8,23 +7,19 @@ import com.guo.learningprogresstracker.dto.PriorityDto;
|
|||||||
import com.guo.learningprogresstracker.dto.TaskInfo;
|
import com.guo.learningprogresstracker.dto.TaskInfo;
|
||||||
import com.guo.learningprogresstracker.dto.request.TaskRequest;
|
import com.guo.learningprogresstracker.dto.request.TaskRequest;
|
||||||
import com.guo.learningprogresstracker.dto.response.TaskInfoResponse;
|
import com.guo.learningprogresstracker.dto.response.TaskInfoResponse;
|
||||||
import com.guo.learningprogresstracker.dto.response.TasksListInfoResponse;
|
|
||||||
import com.guo.learningprogresstracker.entity.TaskEntity;
|
import com.guo.learningprogresstracker.entity.TaskEntity;
|
||||||
import com.guo.learningprogresstracker.exception.ErrorParameterException;
|
import com.guo.learningprogresstracker.exception.ErrorParameterException;
|
||||||
import com.guo.learningprogresstracker.mapStruct.RequestConvert;
|
import com.guo.learningprogresstracker.mapStruct.RequestConvert;
|
||||||
import com.guo.learningprogresstracker.mapStruct.TaskConvert;
|
import com.guo.learningprogresstracker.mapStruct.TaskConvert;
|
||||||
import com.guo.learningprogresstracker.mapStruct.TaskConvertImpl;
|
|
||||||
import com.guo.learningprogresstracker.service.TasksService;
|
import com.guo.learningprogresstracker.service.TasksService;
|
||||||
import com.guo.learningprogresstracker.mapper.TasksMapper;
|
import com.guo.learningprogresstracker.mapper.TasksMapper;
|
||||||
import com.guo.learningprogresstracker.utils.CalculatedPriorityTool;
|
import com.guo.learningprogresstracker.utils.CalculatedPriorityTool;
|
||||||
import com.guo.learningprogresstracker.utils.GenerateNumTool;
|
import com.guo.learningprogresstracker.utils.GenerateNumTool;
|
||||||
import lombok.RequiredArgsConstructor;
|
import lombok.RequiredArgsConstructor;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.ibatis.exceptions.TooManyResultsException;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import java.rmi.ServerException;
|
import java.rmi.ServerException;
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author guo
|
* @author guo
|
||||||
@@ -44,7 +39,7 @@ public class TasksServiceImpl extends ServiceImpl<TasksMapper, TaskEntity>
|
|||||||
public Page<TaskInfo> taskList(Integer pageNum, Integer pageSize) {
|
public Page<TaskInfo> taskList(Integer pageNum, Integer pageSize) {
|
||||||
Page<TaskEntity> page = tasksMapper.selectPage(new Page<TaskEntity>(pageNum, pageSize), Wrappers.lambdaQuery(TaskEntity.class));
|
Page<TaskEntity> page = tasksMapper.selectPage(new Page<TaskEntity>(pageNum, pageSize), Wrappers.lambdaQuery(TaskEntity.class));
|
||||||
Page<TaskInfo> response = TaskConvert.MAPPER.toTaskInfoPage(page);
|
Page<TaskInfo> response = TaskConvert.MAPPER.toTaskInfoPage(page);
|
||||||
|
// todo 需要补充TaskInfo中的lastLearningStatus字段信息
|
||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -20,8 +20,8 @@ class LoginControllerTest {
|
|||||||
LoginBody loginBody = new LoginBody();
|
LoginBody loginBody = new LoginBody();
|
||||||
loginBody.setUsername("admin");
|
loginBody.setUsername("admin");
|
||||||
loginBody.setPassword("admin");
|
loginBody.setPassword("admin");
|
||||||
CommonResult<Object> login = loginController.login(loginBody);
|
CommonResult<String> login = loginController.login(loginBody);
|
||||||
assertEquals(login.getMessage(), "登录成功!");
|
assertEquals("登录成功!", login.getMessage());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user