Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
asset-distribution
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
data-spider
asset-distribution
Commits
b3d1d9a1
Commit
b3d1d9a1
authored
Oct 25, 2020
by
liwenbin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
账单分期需求
parent
2a70e4d0
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
163 additions
and
82 deletions
+163
-82
AidCommonCallbackController.java
.../distribution/controller/AidCommonCallbackController.java
+72
-71
CheckController.java
...tgroup/asset/distribution/controller/CheckController.java
+8
-0
RetryController.java
...tgroup/asset/distribution/controller/RetryController.java
+50
-11
AssetForm.java
...m/quantgroup/asset/distribution/model/form/AssetForm.java
+9
-0
DateUtil.java
...java/com/quantgroup/asset/distribution/util/DateUtil.java
+24
-0
No files found.
src/main/java/com/quantgroup/asset/distribution/controller/AidCommonCallbackController.java
View file @
b3d1d9a1
...
@@ -71,77 +71,78 @@ public class AidCommonCallbackController {
...
@@ -71,77 +71,78 @@ public class AidCommonCallbackController {
@PathVariable
(
"fund_product_id"
)
String
fundProId
,
@PathVariable
(
"fund_product_id"
)
String
fundProId
,
@RequestBody
AidRsaParams
aidRsaParams
)
{
@RequestBody
AidRsaParams
aidRsaParams
)
{
try
{
// mdgbd, 对方不肯下回调接口, 先直接返回成功
QGPreconditions
.
checkArgument
(
StringUtils
.
isNoneEmpty
(
fundId
,
fundProId
,
aidRsaParams
.
getContent
()),
// try {
QGExceptionType
.
AID_COMMON_AUDIT_RESULT_ORDER_ERROR
,
fundId
,
fundProId
,
aidRsaParams
.
getContent
());
// QGPreconditions.checkArgument(StringUtils.isNoneEmpty(fundId, fundProId, aidRsaParams.getContent()),
// QGExceptionType.AID_COMMON_AUDIT_RESULT_ORDER_ERROR, fundId, fundProId, aidRsaParams.getContent());
AidFundInfoConfig
aidFundInfoConfig
=
aidFundInfoConfigService
.
findAidFundInfo
(
fundId
,
fundProId
);
//
QGPreconditions
.
checkArgument
(
aidFundInfoConfig
!=
null
,
QGExceptionType
.
UNKNOW_AID_FUND_ID
,
fundId
);
// AidFundInfoConfig aidFundInfoConfig = aidFundInfoConfigService.findAidFundInfo(fundId, fundProId);
// QGPreconditions.checkArgument(aidFundInfoConfig != null, QGExceptionType.UNKNOW_AID_FUND_ID, fundId);
String
content
=
RsaUtils
.
decryptByPublicKey
(
aidRsaParams
.
getContent
(),
aidFundInfoConfig
.
getPublicKey
());
//
log
.
info
(
"通用助贷资方接收审核结果, fundId : {}, fundProductId : {}, content : {}"
,
fundId
,
fundProId
,
content
);
// String content = RsaUtils.decryptByPublicKey(aidRsaParams.getContent(), aidFundInfoConfig.getPublicKey());
// log.info("通用助贷资方接收审核结果, fundId : {}, fundProductId : {}, content : {}", fundId, fundProId, content);
AidAuditResultEntity
aidAuditResultEntity
=
JSON
.
parseObject
(
content
,
AidAuditResultEntity
.
class
);
//
QGPreconditions
.
checkArgument
(
AidAuditResultCheckUtils
.
check
(
aidAuditResultEntity
),
// AidAuditResultEntity aidAuditResultEntity = JSON.parseObject(content, AidAuditResultEntity.class);
QGExceptionType
.
AID_COMMON_AUDIT_RESULT_ORDER_ERROR
,
fundId
,
fundProId
,
JSON
.
toJSONString
(
aidAuditResultEntity
));
// QGPreconditions.checkArgument(AidAuditResultCheckUtils.check(aidAuditResultEntity),
// QGExceptionType.AID_COMMON_AUDIT_RESULT_ORDER_ERROR, fundId, fundProId, JSON.toJSONString(aidAuditResultEntity));
// 定位订单
//
AidLoanFundAuditOrder
aidLoanFundAuditOrder
=
aidFundAuditOrderService
.
findByBizNoAndFundId
(
// // 定位订单
aidAuditResultEntity
.
getOrderNo
(),
fundId
);
// AidLoanFundAuditOrder aidLoanFundAuditOrder = aidFundAuditOrderService.findByBizNoAndFundId(
QGPreconditions
.
checkArgument
(
aidLoanFundAuditOrder
!=
null
&&
// aidAuditResultEntity.getOrderNo(), fundId);
(
aidLoanFundAuditOrder
.
getAuditResult
().
equals
(
AidFundStatus
.
Incoming
.
WAIT
)
||
// QGPreconditions.checkArgument(aidLoanFundAuditOrder != null &&
aidLoanFundAuditOrder
.
getAuditResult
().
equals
(
AidFundStatus
.
Incoming
.
PRE
)),
// (aidLoanFundAuditOrder.getAuditResult().equals(AidFundStatus.Incoming.WAIT) ||
QGExceptionType
.
AID_COMMON_AUDIT_RESULT_ORDER_ERROR
,
// aidLoanFundAuditOrder.getAuditResult().equals(AidFundStatus.Incoming.PRE)),
aidAuditResultEntity
.
getOrderNo
(),
fundId
,
aidLoanFundAuditOrder
.
getAuditResult
());
// QGExceptionType.AID_COMMON_AUDIT_RESULT_ORDER_ERROR,
// aidAuditResultEntity.getOrderNo(), fundId, aidLoanFundAuditOrder.getAuditResult());
//
// 开始处理审核结果
//
String
orderNo
=
aidAuditResultEntity
.
getOrderNo
();
// // 开始处理审核结果
if
(
aidAuditResultEntity
.
getAuditResult
().
equals
(
AidAuditResultConstants
.
AUDITING
))
{
// String orderNo = aidAuditResultEntity.getOrderNo();
return
MiddleOfficeResponse
.
created
(
MiddleOfficeCommonResponseEnum
.
SUCCESS
);
// if (aidAuditResultEntity.getAuditResult().equals(AidAuditResultConstants.AUDITING)) {
}
// return MiddleOfficeResponse.created(MiddleOfficeCommonResponseEnum.SUCCESS);
// }
AssetForm
assetForm
=
JSON
.
parseObject
(
aidLoanFundAuditOrder
.
getAssetFormText
(),
AssetForm
.
class
);
//
Asset
asset
=
JSON
.
parseObject
(
aidLoanFundAuditOrder
.
getAssetText
(),
Asset
.
class
);
// AssetForm assetForm = JSON.parseObject(aidLoanFundAuditOrder.getAssetFormText(), AssetForm.class);
Map
<
String
,
Object
>
dataMap
=
JSON
.
parseObject
(
aidLoanFundAuditOrder
.
getDataText
(),
Map
.
class
);
// Asset asset = JSON.parseObject(aidLoanFundAuditOrder.getAssetText(), Asset.class);
// Map<String, Object> dataMap = JSON.parseObject(aidLoanFundAuditOrder.getDataText(), Map.class);
// 审核拒绝
//
if
(
aidAuditResultEntity
.
getAuditResult
().
equals
(
AidAuditResultConstants
.
REJECT
))
{
// // 审核拒绝
// 将助贷审核订单状态改为拒绝
// if (aidAuditResultEntity.getAuditResult().equals(AidAuditResultConstants.REJECT)) {
aidFundAuditOrderService
.
updateOrderStatus
(
aidLoanFundAuditOrder
,
AidFundStatus
.
Incoming
.
REJECT
);
// // 将助贷审核订单状态改为拒绝
// 将分发记录改为失败
// aidFundAuditOrderService.updateOrderStatus(aidLoanFundAuditOrder, AidFundStatus.Incoming.REJECT);
assetDistributeRecordService
.
updateAssetDistributeStatus
(
orderNo
,
StatusConstants
.
FAIL
);
// // 将分发记录改为失败
// 重新进行分发
// assetDistributeRecordService.updateAssetDistributeStatus(orderNo, StatusConstants.FAIL);
assetDistributeService
.
distribute
(
assetForm
,
asset
,
dataMap
);
// // 重新进行分发
return
MiddleOfficeResponse
.
created
(
MiddleOfficeCommonResponseEnum
.
SUCCESS
);
// assetDistributeService.distribute(assetForm, asset, dataMap);
}
// return MiddleOfficeResponse.created(MiddleOfficeCommonResponseEnum.SUCCESS);
// }
// 审核通过
//
if
(
aidAuditResultEntity
.
getAuditResult
().
equals
(
AidAuditResultConstants
.
PASS
))
{
// // 审核通过
aidLoanFundAuditOrder
.
setAuditContext
(
JSON
.
toJSONString
(
aidAuditResultEntity
));
// if (aidAuditResultEntity.getAuditResult().equals(AidAuditResultConstants.PASS)) {
// 通过了直接通知资金系统
// aidLoanFundAuditOrder.setAuditContext(JSON.toJSONString(aidAuditResultEntity));
String
finance
=
financeProductService
.
createSingletonFinanceProduct
(
aidAuditResultEntity
.
getAmount
().
toString
(),
// // 通过了直接通知资金系统
String
.
valueOf
(
aidAuditResultEntity
.
getTerm
()),
aidLoanFundAuditOrder
.
getFundId
(),
aidLoanFundAuditOrder
.
getFundProductId
());
// String finance = financeProductService.createSingletonFinanceProduct(aidAuditResultEntity.getAmount().toString(),
assetForm
=
financeProductService
.
checkFundResult
(
assetForm
,
finance
,
aidAuditResultEntity
.
getDeadLine
());
// String.valueOf(aidAuditResultEntity.getTerm()), aidLoanFundAuditOrder.getFundId(), aidLoanFundAuditOrder.getFundProductId());
assetForm
.
setAmount
(
aidAuditResultEntity
.
getAmount
().
toString
());
// assetForm = financeProductService.checkFundResult(assetForm, finance, aidAuditResultEntity.getDeadLine());
assetForm
.
setTerm
(
String
.
valueOf
(
aidAuditResultEntity
.
getTerm
()));
// assetForm.setAmount(aidAuditResultEntity.getAmount().toString());
// assetForm.setTerm(String.valueOf(aidAuditResultEntity.getTerm()));
// 将助贷审核订单状态改为成功
//
aidFundAuditOrderService
.
updateOrderStatus
(
aidLoanFundAuditOrder
,
AidFundStatus
.
Incoming
.
PASS
);
// // 将助贷审核订单状态改为成功
notifyService
.
notifyFundServer
(
assetForm
,
dataMap
);
// aidFundAuditOrderService.updateOrderStatus(aidLoanFundAuditOrder, AidFundStatus.Incoming.PASS);
}
// notifyService.notifyFundServer(assetForm, dataMap);
return
MiddleOfficeResponse
.
created
(
MiddleOfficeCommonResponseEnum
.
SUCCESS
);
// }
}
catch
(
QGException
qx
)
{
// return MiddleOfficeResponse.created(MiddleOfficeCommonResponseEnum.SUCCESS);
log
.
error
(
"助贷资方通用审核结果回调接口出现错误 : {}, fundId : {}, fundProductId : {}, aidRsaParams : {}"
,
fundId
,
// } catch (QGException qx) {
fundProId
,
aidRsaParams
);
// log.error("助贷资方通用审核结果回调接口出现错误 : {}, fundId : {}, fundProductId : {}, aidRsaParams : {}", fundId,
alarmService
.
dingtalkAlarm
(
"Warn"
,
"助贷资方通用审核结果回调接口出现错误"
,
"fundId : "
+
// fundProId, aidRsaParams);
fundId
+
" , fundProductId : "
+
fundProId
+
" , 错误信息 : "
+
qx
.
qgExceptionType
.
code
+
"->"
+
qx
.
detail
);
// alarmService.dingtalkAlarm("Warn", "助贷资方通用审核结果回调接口出现错误", "fundId : " +
}
catch
(
Exception
e
)
{
// fundId + " , fundProductId : " + fundProId + " , 错误信息 : " + qx.qgExceptionType.code + "->" + qx.detail);
log
.
error
(
"助贷资方通用审核结果回调接口出现未知异常, fundId : {}, fundProductId : {}, aidRsaParams : {}"
,
fundId
,
// } catch (Exception e) {
fundProId
,
aidRsaParams
,
e
);
// log.error("助贷资方通用审核结果回调接口出现未知异常, fundId : {}, fundProductId : {}, aidRsaParams : {}", fundId,
alarmService
.
dingtalkAlarm
(
"Warn"
,
"助贷资方通用审核结果回调接口出现未知错误"
,
"fundId : "
+
// fundProId, aidRsaParams, e);
fundId
+
" , fundProductId : "
+
fundProId
+
" , 错误信息 : 未知错误"
);
// alarmService.dingtalkAlarm("Warn", "助贷资方通用审核结果回调接口出现未知错误", "fundId : " +
}
// fundId + " , fundProductId : " + fundProId + " , 错误信息 : 未知错误");
// }
return
MiddleOfficeResponse
.
created
(
MiddleOfficeCommonResponseEnum
.
SUCCESS
);
return
MiddleOfficeResponse
.
created
(
MiddleOfficeCommonResponseEnum
.
SUCCESS
);
}
}
...
...
src/main/java/com/quantgroup/asset/distribution/controller/CheckController.java
View file @
b3d1d9a1
...
@@ -44,4 +44,12 @@ public class CheckController {
...
@@ -44,4 +44,12 @@ public class CheckController {
public
GlobalResponse
test
()
{
public
GlobalResponse
test
()
{
return
GlobalResponse
.
success
(
map
);
return
GlobalResponse
.
success
(
map
);
}
}
/**
* 检查是否下线
* @return
*/
public
static
boolean
isOffLine
()
{
return
map
!=
null
&&
map
.
size
()
>
0
;
}
}
}
src/main/java/com/quantgroup/asset/distribution/controller/RetryController.java
View file @
b3d1d9a1
...
@@ -2,11 +2,15 @@ package com.quantgroup.asset.distribution.controller;
...
@@ -2,11 +2,15 @@ package com.quantgroup.asset.distribution.controller;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.util.List
;
import
java.util.List
;
import
java.util.concurrent.TimeUnit
;
import
com.quantgroup.asset.distribution.service.redis.IRedisService
;
import
com.quantgroup.asset.distribution.util.DateUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.Page
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.data.domain.PageRequest
;
import
org.springframework.scheduling.annotation.Async
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
...
@@ -34,6 +38,8 @@ public class RetryController {
...
@@ -34,6 +38,8 @@ public class RetryController {
private
IDistributeFailLogRepository
distributeFailLogRepository
;
private
IDistributeFailLogRepository
distributeFailLogRepository
;
@Autowired
@Autowired
private
IAssetService
assetService
;
private
IAssetService
assetService
;
@Autowired
private
IRedisService
<
String
>
redisService
;
@RequestMapping
(
"/orders"
)
@RequestMapping
(
"/orders"
)
public
GlobalResponse
retryOrders
(
String
startTime
,
String
endTime
)
{
public
GlobalResponse
retryOrders
(
String
startTime
,
String
endTime
)
{
...
@@ -41,20 +47,53 @@ public class RetryController {
...
@@ -41,20 +47,53 @@ public class RetryController {
Page
<
DistributeFailLog
>
pageableFailAuditLog
=
distributeFailLogRepository
.
findByCreatedAtBetweenAndEnable
(
Page
<
DistributeFailLog
>
pageableFailAuditLog
=
distributeFailLogRepository
.
findByCreatedAtBetweenAndEnable
(
Timestamp
.
valueOf
(
startTime
),
Timestamp
.
valueOf
(
endTime
),
true
,
new
PageRequest
(
0
,
1000
));
Timestamp
.
valueOf
(
startTime
),
Timestamp
.
valueOf
(
endTime
),
true
,
new
PageRequest
(
0
,
1000
));
List
<
DistributeFailLog
>
distributeFailLogList
=
pageableFailAuditLog
.
getContent
();
List
<
DistributeFailLog
>
distributeFailLogList
=
pageableFailAuditLog
.
getContent
();
if
(
CollectionUtils
.
isNotEmpty
(
distributeFailLogList
))
{
retryDistributeFailLogList
(
distributeFailLogList
);
log
.
info
(
"分发失败查询数量为:{}"
,
distributeFailLogList
.
size
());
pageableFailAuditLog
.
forEach
(
distributeFailLog
->
{
AssetForm
assetForm
=
JSON
.
parseObject
(
distributeFailLog
.
getContext
(),
AssetForm
.
class
);
// 重新审核
assetService
.
assetsIn
(
assetForm
);
distributeFailLog
.
setEnable
(
false
);
distributeFailLogRepository
.
save
(
distributeFailLog
);
});
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
log
.
error
(
"资产分发失败订单重新分发异常!"
,
e
);
log
.
error
(
"资产分发失败订单重新分发异常!"
,
e
);
}
}
return
GlobalResponse
.
success
();
return
GlobalResponse
.
success
();
}
}
@Async
@RequestMapping
(
"/repeat_db_distribute"
)
public
void
repeatDBAudit
()
{
try
{
boolean
b
=
redisService
.
setIfAbsent
(
"ASSET_DISTRIBUTION:REPEAT_DB_ATTRIBUTE:99AMU"
,
"1"
,
1
,
TimeUnit
.
DAYS
);
if
(!
b
)
{
return
;
}
String
startTime
=
DateUtil
.
getStrFormatDate
(
"yyyy-MM-dd HH:mm:ss"
,
-
7
);
String
endTime
=
DateUtil
.
timestamp2Str
(
System
.
currentTimeMillis
()
+
""
,
"yyyy-MM-dd HH:mm:ss"
);
int
i
=
1
;
while
(
i
>
0
&&
!
CheckController
.
isOffLine
())
{
Page
<
DistributeFailLog
>
pageableFailDistributeLog
=
distributeFailLogRepository
.
findByCreatedAtBetweenAndEnable
(
Timestamp
.
valueOf
(
startTime
),
Timestamp
.
valueOf
(
endTime
),
true
,
new
PageRequest
(
0
,
50
));
List
<
DistributeFailLog
>
distributeFailLogList
=
pageableFailDistributeLog
.
getContent
();
retryDistributeFailLogList
(
distributeFailLogList
);
TimeUnit
.
SECONDS
.
sleep
(
30
);
++
i
;
if
(
distributeFailLogList
==
null
||
distributeFailLogList
.
size
()
<
50
)
{
i
=
-
1
;
}
}
// 删除锁
redisService
.
del
(
"RULE_ENGINE:REPEAT_DB_AUDIT:88C1K"
);
log
.
info
(
"数据库审核失败订单重审完成!"
);
}
catch
(
Exception
e
)
{
log
.
error
(
"重复审核数据库失败订单任务出现异常!"
,
e
);
}
}
private
void
retryDistributeFailLogList
(
List
<
DistributeFailLog
>
distributeFailLogList
)
{
if
(
CollectionUtils
.
isNotEmpty
(
distributeFailLogList
))
{
log
.
info
(
"分发失败查询数量为:{}"
,
distributeFailLogList
.
size
());
distributeFailLogList
.
forEach
(
distributeFailLog
->
{
AssetForm
assetForm
=
JSON
.
parseObject
(
distributeFailLog
.
getContext
(),
AssetForm
.
class
);
// 重新审核
assetService
.
assetsIn
(
assetForm
);
distributeFailLog
.
setEnable
(
false
);
distributeFailLogRepository
.
save
(
distributeFailLog
);
});
}
}
}
}
src/main/java/com/quantgroup/asset/distribution/model/form/AssetForm.java
View file @
b3d1d9a1
...
@@ -58,6 +58,12 @@ public class AssetForm implements Serializable{
...
@@ -58,6 +58,12 @@ public class AssetForm implements Serializable{
private
String
amountTermLimits
;
private
String
amountTermLimits
;
private
String
fundRate
;
private
String
fundRate
;
private
String
moreOrderTag
;
private
String
allowInstalment
;
private
String
allowInstalmentTerms
;
public
Asset
transToAsset
()
{
public
Asset
transToAsset
()
{
Asset
asset
=
new
Asset
();
Asset
asset
=
new
Asset
();
...
@@ -94,6 +100,9 @@ public class AssetForm implements Serializable{
...
@@ -94,6 +100,9 @@ public class AssetForm implements Serializable{
notifyMap
.
put
(
"financeProducts"
,
this
.
financeProducts
);
notifyMap
.
put
(
"financeProducts"
,
this
.
financeProducts
);
notifyMap
.
put
(
"amountTermLimits"
,
this
.
amountTermLimits
);
notifyMap
.
put
(
"amountTermLimits"
,
this
.
amountTermLimits
);
notifyMap
.
put
(
"fundRate"
,
fundRate
);
notifyMap
.
put
(
"fundRate"
,
fundRate
);
notifyMap
.
put
(
"callbackUrl"
,
callbackUrl
);
notifyMap
.
put
(
"allowInstalment"
,
allowInstalment
);
notifyMap
.
put
(
"allowInstalmentTerms"
,
allowInstalmentTerms
);
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
Map
<
String
,
Object
>
dataMap
=
new
HashMap
<>();
// 目前通知资金方可能有3个模型分
// 目前通知资金方可能有3个模型分
...
...
src/main/java/com/quantgroup/asset/distribution/util/DateUtil.java
View file @
b3d1d9a1
package
com
.
quantgroup
.
asset
.
distribution
.
util
;
package
com
.
quantgroup
.
asset
.
distribution
.
util
;
import
lombok.extern.slf4j.Slf4j
;
import
java.sql.Timestamp
;
import
java.sql.Timestamp
;
import
java.text.SimpleDateFormat
;
import
java.text.SimpleDateFormat
;
import
java.time.LocalDateTime
;
import
java.time.LocalDateTime
;
...
@@ -9,6 +11,7 @@ import java.util.Date;
...
@@ -9,6 +11,7 @@ import java.util.Date;
/**
/**
* Created by renfeng on 2019/7/22.
* Created by renfeng on 2019/7/22.
*/
*/
@Slf4j
public
class
DateUtil
{
public
class
DateUtil
{
...
@@ -38,4 +41,25 @@ public class DateUtil {
...
@@ -38,4 +41,25 @@ public class DateUtil {
public
static
Long
transStringToLong
(
String
dateTime
,
String
pattern
)
{
public
static
Long
transStringToLong
(
String
dateTime
,
String
pattern
)
{
return
Timestamp
.
valueOf
(
LocalDateTime
.
parse
(
dateTime
,
DateTimeFormatter
.
ofPattern
(
pattern
))).
getTime
();
return
Timestamp
.
valueOf
(
LocalDateTime
.
parse
(
dateTime
,
DateTimeFormatter
.
ofPattern
(
pattern
))).
getTime
();
}
}
/**
* 获取格式化日期
*
* @param pattern
* @param add
* @return
*/
public
static
String
getStrFormatDate
(
String
pattern
,
int
add
)
{
return
LocalDateTime
.
now
().
plusDays
(
add
).
format
(
DateTimeFormatter
.
ofPattern
(
pattern
));
}
public
static
String
timestamp2Str
(
String
longmills
,
String
pattern
)
{
try
{
Timestamp
ts
=
new
Timestamp
(
Long
.
parseLong
(
longmills
));
return
new
SimpleDateFormat
(
pattern
).
format
(
ts
);
}
catch
(
Exception
e
)
{
log
.
error
(
"Timestamp转String异常,格式 : {}"
,
pattern
,
e
);
return
null
;
}
}
}
}
Write
Preview
Markdown
is supported
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