|
@@ -4,11 +4,13 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
import com.qmth.themis.business.constant.SystemConstant;
|
|
|
import com.qmth.themis.business.dto.AuthDto;
|
|
|
import com.qmth.themis.business.entity.TBSession;
|
|
|
+import com.qmth.themis.business.entity.TEConfig;
|
|
|
import com.qmth.themis.business.entity.TEStudent;
|
|
|
import com.qmth.themis.business.enums.MqEnum;
|
|
|
import com.qmth.themis.business.enums.RoleEnum;
|
|
|
import com.qmth.themis.business.enums.SystemOperationEnum;
|
|
|
import com.qmth.themis.business.service.EhcacheService;
|
|
|
+import com.qmth.themis.business.service.TEConfigService;
|
|
|
import com.qmth.themis.business.service.TEStudentService;
|
|
|
import com.qmth.themis.business.util.EhcacheUtil;
|
|
|
import com.qmth.themis.business.util.JacksonUtil;
|
|
@@ -29,8 +31,7 @@ import com.qmth.themis.exam.util.ServletUtil;
|
|
|
import com.qmth.themis.mq.service.MqDtoService;
|
|
|
import io.swagger.annotations.*;
|
|
|
import org.apache.commons.lang3.RandomStringUtils;
|
|
|
-import org.slf4j.Logger;
|
|
|
-import org.slf4j.LoggerFactory;
|
|
|
+import org.springframework.cache.CacheManager;
|
|
|
import org.springframework.web.bind.annotation.RequestBody;
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
import org.springframework.web.bind.annotation.RequestMethod;
|
|
@@ -54,7 +55,6 @@ import java.util.Objects;
|
|
|
@RestController
|
|
|
@RequestMapping("/${prefix.url.exam}/student")
|
|
|
public class TEStudentController {
|
|
|
- private final static Logger log = LoggerFactory.getLogger(TEStudentController.class);
|
|
|
|
|
|
@Resource
|
|
|
TEStudentService teStudentService;
|
|
@@ -71,6 +71,9 @@ public class TEStudentController {
|
|
|
@Resource
|
|
|
MqDtoService mqDtoService;
|
|
|
|
|
|
+ @Resource
|
|
|
+ TEConfigService teConfigService;
|
|
|
+
|
|
|
@ApiOperation(value = "学生登录接口")
|
|
|
@RequestMapping(value = "/login", method = RequestMethod.POST)
|
|
|
@ApiResponses({@ApiResponse(code = 200, message = "学生信息", response = TEStudent.class)})
|
|
@@ -135,8 +138,10 @@ public class TEStudentController {
|
|
|
//mq发送消息end
|
|
|
//测试
|
|
|
String test = SignatureInfo.build(SignatureType.TOKEN, sessionId, token);
|
|
|
+ TEConfig teConfig = teConfigService.getGlobalConfig();
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
// map.put(SystemConstant.ACCESS_TOKEN, token);
|
|
|
+ map.put(SystemConstant.GLOBAL, teConfig);
|
|
|
map.put(SystemConstant.ACCESS_TOKEN, test);
|
|
|
map.put(SystemConstant.STUDENT_ACCOUNT, teStudent);
|
|
|
map.put(SystemConstant.SESSION_ID, sessionId);
|