Skip to content

Commit

Permalink
更新版本文件
Browse files Browse the repository at this point in the history
  • Loading branch information
kingston-csj committed Jun 14, 2024
1 parent ec41ecb commit bb422ea
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 20 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@

## 请作者喝杯咖啡
如果您觉得有所收获,可以请作者喝杯咖啡。大家的支持,促使我不断改进优化,谢谢!
![](/screenshots/wx.png "微信收款码")
![](/screenshots/wx.jpg "微信收款码")
![](/screenshots/zfb.jpg "支付宝收款码")

## 一起交流
Expand Down
4 changes: 3 additions & 1 deletion VERSIONS.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@
### jforgame-socket-struct
消息javabean支持继承关系,允许编解码父类字段

## V1.2.0(2024-03-29)
## V1.2.0(2024-06-2)
### jforgame-doctor
增加對jdk17及以上版本的支持
### jforgame-data
增加策划配置数据读取工具,支持csv/excel格式,允许数据按id查询,按索引查询,支持数据热更新



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ private static void findAndAddClassesInPackageByFile(String packageName, String
// 自定义过滤规则 如果可以循环(包含子目录) 或则是以.class结尾的文件(编译好的java类文件)
File[] files = dir.listFiles(file -> (recursive && file.isDirectory()) || (file.getName().endsWith(".class")));
// 循环所有文件
for (File file : files) {
assert files != null;
for (File file : files) {
// 如果是目录 则继续扫描
if (file.isDirectory()) {
findAndAddClassesInPackageByFile(packageName + "." + file.getName(), file.getAbsolutePath(), recursive,
Expand Down
5 changes: 5 additions & 0 deletions jforgame-commons/src/main/java/jforgame/commons/TimeUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ private TimeUtil() {
*/
public static final long MILLIS_PER_DAY = 24 * MILLIS_PER_HOUR;

/**
* Number of milliseconds in a standard week.
*/
public static final long MILLIS_PER_WEEK = 7 * MILLIS_PER_DAY;


}
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,11 @@ private void init() {
});
}

public IdMeta getIdMeta() {
IdMeta getIdMeta() {
return idMeta;
}

public Map<String, IndexMeta> getIndexMetaMap() {
Map<String, IndexMeta> getIndexMetaMap() {
return indexMetaMap;
}

Expand Down
28 changes: 14 additions & 14 deletions jforgame-orm/src/main/java/jforgame/orm/BeanProcessor.java
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ public class BeanProcessor {
private final Map<String, String> columnToPropertyOverrides;

static {
primitiveDefaults.put(Integer.TYPE, Integer.valueOf(0));
primitiveDefaults.put(Short.TYPE, Short.valueOf((short) 0));
primitiveDefaults.put(Byte.TYPE, Byte.valueOf((byte) 0));
primitiveDefaults.put(Float.TYPE, Float.valueOf(0.0F));
primitiveDefaults.put(Double.TYPE, Double.valueOf(0.0D));
primitiveDefaults.put(Long.TYPE, Long.valueOf(0L));
primitiveDefaults.put(Integer.TYPE, 0);
primitiveDefaults.put(Short.TYPE, (short) 0);
primitiveDefaults.put(Byte.TYPE, (byte) 0);
primitiveDefaults.put(Float.TYPE, 0.0F);
primitiveDefaults.put(Double.TYPE, 0.0D);
primitiveDefaults.put(Long.TYPE, 0L);
primitiveDefaults.put(Boolean.TYPE, Boolean.FALSE);
primitiveDefaults.put(Character.TYPE, Character.valueOf('\000'));
primitiveDefaults.put(Character.TYPE, '\0');
}

public BeanProcessor() {
Expand Down Expand Up @@ -243,25 +243,25 @@ protected Object processColumn(ResultSet rs, int index, Class<?> propType)
return rs.getString(index);
}
if ((propType.equals(Integer.TYPE)) || (propType.equals(Integer.class))) {
return Integer.valueOf(rs.getInt(index));
return rs.getInt(index);
}
if ((propType.equals(Boolean.TYPE)) || (propType.equals(Boolean.class))) {
return Boolean.valueOf(rs.getBoolean(index));
return rs.getBoolean(index);
}
if ((propType.equals(Long.TYPE)) || (propType.equals(Long.class))) {
return Long.valueOf(rs.getLong(index));
return rs.getLong(index);
}
if ((propType.equals(Double.TYPE)) || (propType.equals(Double.class))) {
return Double.valueOf(rs.getDouble(index));
return rs.getDouble(index);
}
if ((propType.equals(Float.TYPE)) || (propType.equals(Float.class))) {
return Float.valueOf(rs.getFloat(index));
return rs.getFloat(index);
}
if ((propType.equals(Short.TYPE)) || (propType.equals(Short.class))) {
return Short.valueOf(rs.getShort(index));
return rs.getShort(index);
}
if ((propType.equals(Byte.TYPE)) || (propType.equals(Byte.class))) {
return Byte.valueOf(rs.getByte(index));
return rs.getByte(index);
}
if (propType.equals(Timestamp.class)) {
return rs.getTimestamp(index);
Expand Down
2 changes: 1 addition & 1 deletion jforgame-orm/src/main/java/jforgame/orm/OrmBridge.java
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ public void setPropertyToColumnOverride(Map<String, String> propertyToColumnOver
}

public List<String> listProperties() {
return this.fieldMetadataMap.keySet().stream().collect(Collectors.toList());
return new ArrayList<>(this.fieldMetadataMap.keySet());
}

}
Binary file added screenshots/wx.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file removed screenshots/wx.png
Binary file not shown.

0 comments on commit bb422ea

Please sign in to comment.