zoujiajian пре 1 година
родитељ
комит
1fa250e754

+ 5 - 3
netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsGptCarController.java

@@ -62,9 +62,11 @@ public class CmsGptCarController {
 	public Result<String> updateMirrorCarSession(@RequestBody ChatgptSession chatgptSession) {
 		Long id = chatgptSession.getId();
 		ChatgptSession dbChatSession = chatgptSessionMapper.selectById(id);
-		if (!ObjectUtil.equal(dbChatSession.getEmail(), chatgptSession.getEmail()) || !ObjectUtil.equal(dbChatSession.getPassword(), chatgptSession.getPassword())) {
-			String gptSession = chatGptAccountService.getGptSession(dbChatSession.getEmail(), dbChatSession.getPassword());
-			chatgptSession.setOfficialSession(gptSession);
+		if (StrUtil.equals(chatgptSession.getOfficialSession(), dbChatSession.getOfficialSession())) {
+			if (!ObjectUtil.equal(dbChatSession.getEmail(), chatgptSession.getEmail()) || !ObjectUtil.equal(dbChatSession.getPassword(), chatgptSession.getPassword())) {
+				String gptSession = chatGptAccountService.getGptSession(dbChatSession.getEmail(), dbChatSession.getPassword());
+				chatgptSession.setOfficialSession(gptSession);
+			}
 		}
 		Integer selectCount = chatgptSessionMapper.selectCount(Wrappers.lambdaQuery(ChatgptSession.class)
 				.and(e -> e.eq(ChatgptSession::getEmail, chatgptSession.getEmail())