ソースを参照

fix 修改日志报错代码

zoujiajian 3 年 前
コミット
094330b899

+ 1 - 0
netflix-web/src/main/java/com/cyksj/web/controller/cps/CpsBackLoginController.java

@@ -126,6 +126,7 @@ public class CpsBackLoginController {
 	 */
 	@GetMapping("/wx/authLogin/baseRedirect")
 	public void wxAuthLoginRedirect(String code, String state, HttpServletResponse response) throws Exception {
+		if (StrUtil.isEmpty(state)) throw BusinessRuntimeException.getInstance("授权错误,请重新授权");
 		String json = Codec.DoBase64.custom().setData(state).decodeAsText();
 		AuthRedirect re = Jsons.parseObject(json, AuthRedirect.class);
 		AuthToken token = weChatService.getAuthToken(code, wxOpenPlatYHLXLoginConfig.getAppId());

+ 5 - 1
netflix-web/src/main/java/com/cyksj/web/controller/group/GroupRelationController.java

@@ -142,7 +142,11 @@ public class GroupRelationController {
         GroupsRelationView groupsRelationView = beanSearcher.searchFirst(GroupsRelationView.class, MapUtils.builder()
                 .field(GroupsRelationView::getUserId, userIds).op(Operator.InList)
                 .field(GroupsRelationView::getId, relationId).build());
-        if (groupsRelationView.getAccountId() == null) return GatewayResponse.SUCCESS.newBuilder().toResult();
+        if (groupsRelationView == null) {
+            log.info("userId:{}查看relationId:{}车票不存在", userId, relationId);
+            throw BusinessRuntimeException.getInstance("该车票已不存在");
+        }
+        if (groupsRelationView.getAccountId() == null) throw BusinessRuntimeException.getInstance("该车队未配置账号");
         if (groupRelationFrontService == null) throw BusinessRuntimeException.getInstance("车票已不存在");
         ChatGptPwdViewRecord viewRecord = new ChatGptPwdViewRecord();
         viewRecord.setUserId(userId);