-
Notifications
You must be signed in to change notification settings - Fork 8.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bugfix: fix fastjson serialization of time data types #4505
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@xjlgod add commit log in change/1.5.0: |
I have done it. |
@xjlgod add your github id in contributor list for 1.5.0 change |
@xjlgod thanks for your contribution. |
|
} | ||
if (f1Type == Types.TIME && f1.getValue().getClass().equals(String.class)) { | ||
f1.setValue(Time.valueOf(f1.getValue().toString())); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
date处理了类似 2022-04-08 12:23:33 的情况,time不需要处理吗?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
time本身就是12:23:33这种类型,不需要做处理。主要是fastJson序列化出来的字符串需要转成time类型来比较。
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
数据库是datetime类型的如何处理?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#4505 (comment)
解决的issue里没涉及对datetime类型错误的描述,datetime是相当于TIMESTAMP进行处理的
Codecov Report
@@ Coverage Diff @@
## develop #4505 +/- ##
=============================================
+ Coverage 49.35% 49.39% +0.03%
- Complexity 4073 4075 +2
=============================================
Files 731 731
Lines 25465 25475 +10
Branches 3156 3160 +4
=============================================
+ Hits 12569 12584 +15
+ Misses 11559 11550 -9
- Partials 1337 1341 +4
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Ⅰ. Describe what this PR did
Detail is in issue 4443
Ⅱ. Does this pull request fix one issue?
fixes #4443
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews