From 70bd054a9cd6e69dab7a994ce928ea364d3140c6 Mon Sep 17 00:00:00 2001 From: vran Date: Sun, 30 Jan 2022 15:52:08 +0800 Subject: [PATCH] fix: can't init admin user when start --- .../com/databasir/core/domain/system/service/SystemService.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/src/main/java/com/databasir/core/domain/system/service/SystemService.java b/core/src/main/java/com/databasir/core/domain/system/service/SystemService.java index 98d4039..fb74170 100644 --- a/core/src/main/java/com/databasir/core/domain/system/service/SystemService.java +++ b/core/src/main/java/com/databasir/core/domain/system/service/SystemService.java @@ -50,7 +50,7 @@ public class SystemService { String email = "N/A"; String username = "databasir"; - Optional userOpt = userDao.selectByEmail(email); + Optional userOpt = userDao.selectByEmailOrUsername(username); if (!userOpt.isPresent()) { UserPojo admin = new UserPojo(); admin.setEmail(email);