/** * 生成问候信息 * * @return */ private String getWelcomeMsg() { String welcome = "晚上好"; Integer timeInteger = new Integer(G4Utils.getCurrentTime("HH")); if (timeInteger.intValue() >= 7 && timeInteger.intValue() <= 12) { welcome = "上午好"; } else if (timeInteger.intValue() > 12 && timeInteger.intValue() < 19) { welcome = "下午好"; } return welcome; }