Преглед на файлове

fix 编辑officialSession

zoujiajian преди 1 година
родител
ревизия
1fa250e754
променени са 1 файла, в които са добавени 5 реда и са изтрити 3 реда
  1. 5 3
      netflix-web/src/main/java/com/cyksj/web/controller/manage/account/CmsGptCarController.java

+ 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())