fix mapper bugs for postgresql

This commit is contained in:
oonxt
2022-03-07 14:39:17 +08:00
parent 3fe3d7f863
commit 23ceb7be36
33 changed files with 2107 additions and 1831 deletions

View File

@@ -259,7 +259,7 @@ public class Institutions extends JpaBaseEntity implements Serializable {
}
public boolean isCaptchaSupport() {
return (captchaSupport !=null && captchaSupport.equalsIgnoreCase("YES") ? true : false);
return "YES".equalsIgnoreCase(captchaSupport);
}

View File

@@ -257,13 +257,13 @@ public class LoginRepository {
userInfo.getLoginCount() + 1,
userInfo.getId()
},
new int[] { Types.VARCHAR, Types.VARCHAR, Types.INTEGER, Types.VARCHAR });
new int[] { Types.TIMESTAMP, Types.VARCHAR, Types.INTEGER, Types.VARCHAR });
}
public void updateLastLogoff(UserInfo userInfo) {
jdbcTemplate.update( LOGOUT_USERINFO_UPDATE_STATEMENT,
new Object[] { userInfo.getLastLogoffTime(), userInfo.getId() },
new int[] { Types.VARCHAR, Types.VARCHAR });
new int[] { Types.TIMESTAMP, Types.VARCHAR });
}
public class UserInfoRowMapper implements RowMapper<UserInfo> {