Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Litemall
Commits
07a736e0
Commit
07a736e0
authored
Jul 24, 2018
by
Menethil
Browse files
添加时间格式化工具类,格式化模版消息通知的时间显示
parent
6becd5da
Changes
2
Hide whitespace changes
Inline
Side-by-side
litemall-core/src/main/java/org/linlinjava/litemall/core/util/DateTimeUtil.java
0 → 100644
View file @
07a736e0
package
org.linlinjava.litemall.core.util
;
import
java.time.LocalDateTime
;
import
java.time.format.DateTimeFormatter
;
/**
* 日期格式化工具类
*/
public
class
DateTimeUtil
{
/**
* 格式 yyyy年MM月dd日 HH:mm:ss
*
* @param dateTime
* @return
*/
public
static
String
getDateTimeDisplayString
(
LocalDateTime
dateTime
)
{
DateTimeFormatter
dtf2
=
DateTimeFormatter
.
ofPattern
(
"yyyy年MM月dd日 HH:mm:ss"
);
String
strDate2
=
dtf2
.
format
(
dateTime
);
return
strDate2
;
}
}
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/web/WxOrderController.java
View file @
07a736e0
...
...
@@ -11,6 +11,7 @@ import org.apache.commons.logging.Log;
import
org.apache.commons.logging.LogFactory
;
import
org.linlinjava.litemall.core.notify.NotifyService
;
import
org.linlinjava.litemall.core.notify.NotifyType
;
import
org.linlinjava.litemall.core.util.DateTimeUtil
;
import
org.linlinjava.litemall.core.util.JacksonUtil
;
import
org.linlinjava.litemall.core.util.ResponseUtil
;
import
org.linlinjava.litemall.db.domain.*
;
...
...
@@ -584,10 +585,10 @@ public class WxOrderController {
String
[]
parms
=
new
String
[]{
order
.
getOrderSn
(),
order
.
getOrderPrice
().
toString
(),
order
.
getAddTime
().
toString
(),
DateTimeUtil
.
getDateTimeDisplayString
(
order
.
getAddTime
()),
order
.
getConsignee
(),
order
.
getMobile
(),
order
.
getAddress
(),
order
.
getConsignee
()
order
.
getAddress
()
};
notifyService
.
notifyWxTemplate
(
result
.
getOpenid
(),
NotifyType
.
PAY_SUCCEED
,
parms
,
"/pages/index/index?orderId="
+
order
.
getId
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment