|
|
@@ -138,7 +138,7 @@ public class CmsGptCarController {
|
|
|
@PostMapping("/post/mirror/car/session")
|
|
|
public Result<String> postMirrorCarSession(@RequestBody ChatgptSession chatgptSession) {
|
|
|
Integer selectCount = chatgptSessionMapper.selectCount(Wrappers.lambdaQuery(ChatgptSession.class)
|
|
|
- .eq(ChatgptSession::getCarId, chatgptSession.getCarId()).or().eq(ChatgptSession::getEmail, chatgptSession.getEmail()));
|
|
|
+ .eq(chatgptSession.getCarId() != null, ChatgptSession::getCarId, chatgptSession.getCarId()).or().eq(ChatgptSession::getEmail, chatgptSession.getEmail()));
|
|
|
if (selectCount > 0) {
|
|
|
throw BusinessRuntimeException.getInstance("请检验车队ID或账号是否已存在");
|
|
|
}
|