记得上下班打卡 | git大法好,push需谨慎
Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
L
liquidnet-bus-v1
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
董敬伟
liquidnet-bus-v1
Commits
5f307dc7
Commit
5f307dc7
authored
Aug 02, 2021
by
胡佳晨
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'dev' into test
parents
f2e11462
73e7834f
Changes
11
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
411 additions
and
334 deletions
+411
-334
IDragonOrderRefundsService.java
...et/service/dragon/service/IDragonOrderRefundsService.java
+1
-1
KylinPerformancesMapper.xml
...iquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
+1
-1
AdamLoginController.java
...iquidnet/service/adam/controller/AdamLoginController.java
+3
-3
AdamUserServiceImpl.java
...uidnet/service/adam/service/impl/AdamUserServiceImpl.java
+2
-2
RefundController.java
...liquidnet/service/dragon/controller/RefundController.java
+12
-0
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+77
-22
KylinBannersController.java
...dnet/service/kylin/controller/KylinBannersController.java
+7
-4
BannersServiceImpl.java
...uidnet/service/kylin/service/impl/BannersServiceImpl.java
+4
-3
DragonOrderRefundsServiceImpl.java
...ce/dragon/service/impl/DragonOrderRefundsServiceImpl.java
+5
-0
PlatformDMController.java
...ervice/platform/controller/adam/PlatformDMController.java
+298
-298
RedisDataUtils.java
...ava/com/liquidnet/service/sweet/utils/RedisDataUtils.java
+1
-0
No files found.
liquidnet-bus-api/liquidnet-service-dragon-api/src/main/java/com/liquidnet/service/dragon/service/IDragonOrderRefundsService.java
View file @
5f307dc7
...
@@ -22,6 +22,6 @@ public interface IDragonOrderRefundsService {
...
@@ -22,6 +22,6 @@ public interface IDragonOrderRefundsService {
String
wePayRefundCallBack
(
HttpServletRequest
request
,
HttpServletResponse
response
);
String
wePayRefundCallBack
(
HttpServletRequest
request
,
HttpServletResponse
response
);
String
aliPayRefundCodeStatus
(
String
outTradeNo
,
String
tradeNo
,
String
outBizNo
,
String
callBackUrl
);
}
}
liquidnet-bus-do/liquidnet-service-kylin-do/src/main/resources/com.liquidnet.service.kylin.mapper/KylinPerformancesMapper.xml
View file @
5f307dc7
...
@@ -199,7 +199,7 @@
...
@@ -199,7 +199,7 @@
<if
test=
"status=='0'"
>
<if
test=
"status=='0'"
>
AND ps.STATUS = #{status}
AND ps.STATUS = #{status}
</if>
</if>
<if
test=
"merchantId
!='1'
"
>
<if
test=
"merchantId
!= 1
"
>
AND pr.merchant_id = #{merchantId}
AND pr.merchant_id = #{merchantId}
</if>
</if>
</where>
</where>
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/controller/AdamLoginController.java
View file @
5f307dc7
...
@@ -378,12 +378,12 @@ public class AdamLoginController {
...
@@ -378,12 +378,12 @@ public class AdamLoginController {
/* ---------------------------- Internal Method ---------------------------- */
/* ---------------------------- Internal Method ---------------------------- */
private
ResponseDto
<
AdamLoginInfoVo
>
checkSmsCode
(
String
mobile
,
String
code
)
{
private
ResponseDto
<
AdamLoginInfoVo
>
checkSmsCode
(
String
mobile
,
String
code
)
{
//
if (Arrays.asList(LnsEnum.ENV.dev.name(), LnsEnum.ENV.test.name()).contains(env.getProperty(CurrentUtil.CK_ENV_ACTIVE))
if
(
Arrays
.
asList
(
LnsEnum
.
ENV
.
dev
.
name
(),
LnsEnum
.
ENV
.
test
.
name
()).
contains
(
env
.
getProperty
(
CurrentUtil
.
CK_ENV_ACTIVE
))
//
|| reviewMobile.equals(mobile)) {
||
reviewMobile
.
equals
(
mobile
))
{
if
(
CurrentUtil
.
GRAY_LOGIN_SMS_CODE
.
equals
(
code
))
{
if
(
CurrentUtil
.
GRAY_LOGIN_SMS_CODE
.
equals
(
code
))
{
return
ResponseDto
.
success
();
return
ResponseDto
.
success
();
}
}
//
}
}
// LinkedMultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
// LinkedMultiValueMap<String, String> paramsMap = new LinkedMultiValueMap<>();
// paramsMap.add("mobile", mobile);
// paramsMap.add("mobile", mobile);
...
...
liquidnet-bus-service/liquidnet-service-adam/liquidnet-service-adam-impl/src/main/java/com/liquidnet/service/adam/service/impl/AdamUserServiceImpl.java
View file @
5f307dc7
...
@@ -130,12 +130,12 @@ public class AdamUserServiceImpl implements IAdamUserService {
...
@@ -130,12 +130,12 @@ public class AdamUserServiceImpl implements IAdamUserService {
// mongoTemplate.insert(userInfoVo, AdamUserInfoVo.class.getSimpleName());
// mongoTemplate.insert(userInfoVo, AdamUserInfoVo.class.getSimpleName());
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
userInfoVo
.
setMobile
(
SensitizeUtil
.
custom
(
param
.
getMobile
(),
3
,
4
));
//
userInfoVo.setMobile(SensitizeUtil.custom(param.getMobile(), 3, 4));
adamRdmService
.
setUserInfoVoByUid
(
userInfoVo
.
getUid
(),
userInfoVo
);
adamRdmService
.
setUserInfoVoByUid
(
userInfoVo
.
getUid
(),
userInfoVo
);
toMqSqls
.
add
(
SqlMapping
.
get
(
"adam_user.add"
));
toMqSqls
.
add
(
SqlMapping
.
get
(
"adam_user.add"
));
initUserObjs
.
add
(
new
Object
[]{
userInfoVo
.
getUid
(),
userInfoVo
.
getMobile
(),
userInfoVo
.
getState
(),
now
});
initUserObjs
.
add
(
new
Object
[]{
userInfoVo
.
getUid
(),
userInfoVo
.
getMobile
(),
userInfoVo
.
getState
(),
0
,
now
});
toMqSqls
.
add
(
SqlMapping
.
get
(
"adam_user_info.add"
));
toMqSqls
.
add
(
SqlMapping
.
get
(
"adam_user_info.add"
));
initUserInfoObjs
.
add
(
new
Object
[]{
userInfoVo
.
getUid
(),
userInfoVo
.
getNickname
(),
userInfoVo
.
getAvatar
(),
userInfoVo
.
getQrCode
()});
initUserInfoObjs
.
add
(
new
Object
[]{
userInfoVo
.
getUid
(),
userInfoVo
.
getNickname
(),
userInfoVo
.
getAvatar
(),
userInfoVo
.
getQrCode
()});
...
...
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/controller/RefundController.java
View file @
5f307dc7
...
@@ -46,4 +46,16 @@ public class RefundController {
...
@@ -46,4 +46,16 @@ public class RefundController {
return
orderRefundsService
.
wePayRefundCallBack
(
request
,
response
);
return
orderRefundsService
.
wePayRefundCallBack
(
request
,
response
);
}
}
@PostMapping
(
"refund/alipay/result"
)
@ApiOperation
(
"支付宝查询退款结果"
)
@ApiResponse
(
code
=
200
,
message
=
"接口返回对象参数"
)
public
String
refundSingle
(
@RequestParam
(
value
=
"orderCode"
)
String
orderCode
,
@RequestParam
(
value
=
"paymentId"
)
String
paymentId
,
@RequestParam
(
value
=
"orderRefundCode"
)
String
orderRefundCode
,
@RequestParam
(
value
=
"callBackUrl"
)
String
callBackUrl
)
{
return
orderRefundsService
.
aliPayRefundCodeStatus
(
orderCode
,
paymentId
,
orderRefundCode
,
callBackUrl
);
}
}
}
liquidnet-bus-service/liquidnet-service-dragon/liquidnet-service-dragon-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
5f307dc7
...
@@ -94,32 +94,35 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -94,32 +94,35 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
case
DragonConstant
.
REFUND_TYPE_JS_WEPAY
:
case
DragonConstant
.
REFUND_TYPE_JS_WEPAY
:
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
break
;
break
;
case
DragonConstant
.
REFUND_TYPE_APPLET_WEPAY
:
dto
=
weyPayRefund
(
code
,
orderRefundCode
,
code
,
reason
,
price
,
priceTotal
,
paymentId
,
paymentType
,
localWePayCallBackUrl
,
nowTime
);
break
;
}
}
log
.
info
(
"dto = "
+
JSON
.
toJSONString
(
dto
));
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"refunding"
))
{
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"refunding"
))
{
log
.
info
(
""
);
}
else
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"refunded"
))
{
}
else
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"refunded"
))
{
//调用回调
//调用回调
log
.
info
(
""
);
}
else
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"error"
))
{
}
else
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"error"
))
{
//调用回调
//调用回调
log
.
error
(
""
);
return
ResponseDto
.
failure
(
"退款失败:"
+
dto
.
getMessage
());
return
ResponseDto
.
failure
(
"退款失败:"
+
dto
.
getMessage
());
}
else
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"exception"
))
{
}
else
if
(
dto
.
getResult
().
equalsIgnoreCase
(
"exception"
))
{
log
.
error
(
""
);
}
}
DragonRefundAppDto
refundAppDto
=
new
DragonRefundAppDto
();
DragonRefundAppDto
refundAppDto
=
new
DragonRefundAppDto
();
refundAppDto
.
setOrderCode
(
orderCode
);
refundAppDto
.
setOrderCode
(
orderCode
);
refundAppDto
.
setCode
(
code
);
refundAppDto
.
setCode
(
code
);
refundAppDto
.
setOrderRefundCode
(
orderRefundCode
);
refundAppDto
.
setOrderRefundCode
(
orderRefundCode
);
refundAppDto
.
setRefundCode
(
refundCode
);
refundAppDto
.
setRefundCode
(
refundCode
);
log
.
info
(
"refundAppDto = "
+
JSON
.
toJSONString
(
refundAppDto
));
return
ResponseDto
.
success
(
refundAppDto
);
return
ResponseDto
.
success
(
refundAppDto
);
}
else
{
}
else
{
return
ResponseDto
.
failure
(
"退款失败"
);
return
ResponseDto
.
failure
(
"退款失败"
);
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
""
);
log
.
info
(
"orderCode = "
+
orderCode
+
""
,
e
);
return
ResponseDto
.
failure
(
"退款失败:"
+
e
.
getMessage
());
return
ResponseDto
.
failure
(
"退款失败:"
+
e
.
getMessage
());
}
}
}
}
...
@@ -155,7 +158,6 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -155,7 +158,6 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
String
sign
=
PayWepayUtils
.
getInstance
().
createSign
(
parameters
);
String
sign
=
PayWepayUtils
.
getInstance
().
createSign
(
parameters
);
parameters
.
put
(
"sign"
,
sign
);
parameters
.
put
(
"sign"
,
sign
);
String
data
=
PayWepayUtils
.
getInstance
().
getRequestXml
(
parameters
);
String
data
=
PayWepayUtils
.
getInstance
().
getRequestXml
(
parameters
);
log
.
debug
(
"XMLSTRING = "
+
data
);
try
{
try
{
HttpPost
httpost
=
new
HttpPost
(
"https://api.mch.weixin.qq.com/secapi/pay/refund"
);
HttpPost
httpost
=
new
HttpPost
(
"https://api.mch.weixin.qq.com/secapi/pay/refund"
);
httpost
.
setEntity
(
new
StringEntity
(
data
,
"UTF-8"
));
httpost
.
setEntity
(
new
StringEntity
(
data
,
"UTF-8"
));
...
@@ -164,7 +166,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -164,7 +166,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
HttpEntity
entity
=
response
.
getEntity
();
HttpEntity
entity
=
response
.
getEntity
();
entity
.
getContent
();
entity
.
getContent
();
String
jsonStr
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
String
jsonStr
=
EntityUtils
.
toString
(
entity
,
"UTF-8"
);
log
.
debug
(
"JSONSTR = "
+
jsonStr
);
log
.
info
(
"JSONSTR = "
+
jsonStr
);
WePayRefundReturnDto
wePayRefundReturnDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnDto
.
class
);
WePayRefundReturnDto
wePayRefundReturnDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnDto
.
class
);
if
(
wePayRefundReturnDto
.
getErrCodeDes
()
!=
null
)
{
if
(
wePayRefundReturnDto
.
getErrCodeDes
()
!=
null
)
{
channelDto
.
setResult
(
"error"
);
channelDto
.
setResult
(
"error"
);
...
@@ -174,7 +176,6 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -174,7 +176,6 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
channelDto
.
setContent
(
contentDto
);
channelDto
.
setContent
(
contentDto
);
return
channelDto
;
return
channelDto
;
}
}
log
.
debug
(
"BEAN = "
+
wePayRefundReturnDto
);
if
(!
wePayRefundReturnDto
.
getReturnCode
().
equalsIgnoreCase
(
"SUCCESS"
)
||
wePayRefundReturnDto
.
getReturnCode
()
==
null
)
{
if
(!
wePayRefundReturnDto
.
getReturnCode
().
equalsIgnoreCase
(
"SUCCESS"
)
||
wePayRefundReturnDto
.
getReturnCode
()
==
null
)
{
try
{
try
{
String
refundError
=
""
;
String
refundError
=
""
;
...
@@ -323,7 +324,6 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -323,7 +324,6 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
);
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
log
.
error
(
""
);
channelDto
.
setResult
(
"exception"
);
channelDto
.
setResult
(
"exception"
);
channelDto
.
setMessage
(
"update order refund with db error: "
+
e
.
getMessage
());
channelDto
.
setMessage
(
"update order refund with db error: "
+
e
.
getMessage
());
contentDto
.
setRequest
(
JSON
.
toJSONString
(
response
.
getParams
()));
contentDto
.
setRequest
(
JSON
.
toJSONString
(
response
.
getParams
()));
...
@@ -361,17 +361,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -361,17 +361,14 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
String
jsonStr
=
new
String
(
outSteam
.
toByteArray
(),
"utf-8"
);
String
jsonStr
=
new
String
(
outSteam
.
toByteArray
(),
"utf-8"
);
outSteam
.
close
();
outSteam
.
close
();
inStream
.
close
();
inStream
.
close
();
log
.
debug
(
"JSON = "
+
jsonStr
);
WePayRefundReturnCallBackDto
callBackDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnCallBackDto
.
class
);
WePayRefundReturnCallBackDto
callBackDto
=
XmlUtil
.
toBean
(
jsonStr
,
WePayRefundReturnCallBackDto
.
class
);
log
.
debug
(
"DATA
= "
+
callBackDto
);
log
.
info
(
"callBackDto
= "
+
callBackDto
);
if
(
callBackDto
.
getReturnCode
().
equalsIgnoreCase
(
"SUCCESS"
))
{
if
(
callBackDto
.
getReturnCode
().
equalsIgnoreCase
(
"SUCCESS"
))
{
String
reqInfo
=
PayWepayUtils
.
getInstance
().
unCodeReqInfo
(
callBackDto
.
getReqInfo
());
String
reqInfo
=
PayWepayUtils
.
getInstance
().
unCodeReqInfo
(
callBackDto
.
getReqInfo
());
log
.
debug
(
"REQINFO = "
+
reqInfo
);
WePayRefundReturnCallBackInfoDto
info
=
XmlUtil
.
toBean
(
reqInfo
,
WePayRefundReturnCallBackInfoDto
.
class
);
WePayRefundReturnCallBackInfoDto
info
=
XmlUtil
.
toBean
(
reqInfo
,
WePayRefundReturnCallBackInfoDto
.
class
);
String
outRefundNo
=
info
.
getOutRefundNo
();
String
outRefundNo
=
info
.
getOutRefundNo
();
String
refundAt
=
info
.
getSuccessTime
();
String
refundAt
=
info
.
getSuccessTime
();
try
{
try
{
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
if
(
info
.
getRefundStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
if
(
info
.
getRefundStatus
().
equalsIgnoreCase
(
"SUCCESS"
))
{
dto
.
setStatus
(
1
);
dto
.
setStatus
(
1
);
...
@@ -383,8 +380,8 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -383,8 +380,8 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
dto
.
setRefundPrice
(
new
BigDecimal
(
info
.
getRefundFee
()).
divide
(
BigDecimal
.
valueOf
(
100
)).
toString
());
dto
.
setRefundPrice
(
new
BigDecimal
(
info
.
getRefundFee
()).
divide
(
BigDecimal
.
valueOf
(
100
)).
toString
());
dto
.
setRefundAt
(
refundAt
);
dto
.
setRefundAt
(
refundAt
);
dto
.
setRefundError
(
callBackDto
.
getReturnMsg
());
dto
.
setRefundError
(
callBackDto
.
getReturnMsg
());
log
.
debug
(
"SEND WEPAY NOTIFTURL = "
+
JSON
.
toJSONString
(
dto
));
log
.
info
(
"SEND WEPAY NOTIFTURL = "
+
JSON
.
toJSONString
(
dto
));
sendNotifyUrl
(
dto
);
sendNotifyUrl
(
dto
,
null
);
mqHandleUtil
.
sendMySqlRedis
(
mqHandleUtil
.
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
...
@@ -412,6 +409,65 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -412,6 +409,65 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
}
}
}
@Override
public
String
aliPayRefundCodeStatus
(
String
outTradeNo
,
String
tradeNo
,
String
outBizNo
,
String
callBackUrl
)
{
try
{
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
AlipayTradeFastpayRefundQueryRequest
request
=
new
AlipayTradeFastpayRefundQueryRequest
();
//创建API对应的request类
request
.
setBizContent
(
"{"
+
"\"out_trade_no\":\""
+
outTradeNo
+
"\","
+
"\"trade_no\":\""
+
tradeNo
+
"\","
+
"\"out_request_no\":\""
+
outBizNo
+
"\"}"
);
//设置业务参数
AlipayTradeFastpayRefundQueryResponse
response
=
PayAlipayUtils
.
getInstance
().
getHttpClient
().
execute
(
request
);
log
.
info
(
"AlipayTradeFastpayRefundQueryRequest -> data = "
+
response
);
if
(
response
.
isSuccess
())
{
try
{
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
if
(
response
.
getMsg
().
equalsIgnoreCase
(
"SUCCESS"
))
{
dto
.
setStatus
(
1
);
}
else
{
dto
.
setStatus
(
0
);
}
dto
.
setOrderRefundCode
(
response
.
getOutRequestNo
());
dto
.
setRefundCode
(
response
.
getOutTradeNo
());
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundAt
(
DateUtil
.
Formatter
.
yyyyMMddHHmmss
.
format
(
LocalDateTime
.
now
()));
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundError
(
""
);
sendNotifyUrl
(
dto
,
callBackUrl
);
log
.
debug
(
"SEND ALIPAY NOTIFTURL2 = "
+
JSON
.
toJSONString
(
dto
));
mqHandleUtil
.
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
new
Object
[]{
outBizNo
,
"ALIPAY"
,
JSON
.
toJSONString
(
response
),
nowTime
,
nowTime
},
DragonConstant
.
MysqlRedisQueueEnum
.
DRAGON_REFUND_KEY
.
getCode
()
);
mqHandleUtil
.
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_success.update"
),
new
Object
[]{
nowTime
,
DateUtil
.
format
(
response
.
getGmtRefundPay
(),
DateUtil
.
Formatter
.
yyyyMMddHHmmss
),
DragonConstant
.
RefundStatusEnum
.
STATUS_REFUNDED
.
getCode
(),
response
.
getOutRequestNo
()},
DragonConstant
.
MysqlRedisQueueEnum
.
DRAGON_REFUND_KEY
.
getCode
()
);
return
"success"
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
log
.
error
(
""
);
return
"fail"
;
}
}
else
{
log
.
error
(
"response.isSuccess() -> fail "
);
return
"fail"
;
}
}
catch
(
Exception
e
){
}
return
null
;
}
public
String
aliPayRefundCallBack
(
String
jsonStr
)
{
public
String
aliPayRefundCallBack
(
String
jsonStr
)
{
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
try
{
try
{
...
@@ -422,11 +478,10 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -422,11 +478,10 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
"\"trade_no\":\""
+
callBackDto
.
getTradeNo
()
+
"\","
+
"\"trade_no\":\""
+
callBackDto
.
getTradeNo
()
+
"\","
+
"\"out_request_no\":\""
+
callBackDto
.
getOutBizNo
()
+
"\"}"
);
//设置业务参数
"\"out_request_no\":\""
+
callBackDto
.
getOutBizNo
()
+
"\"}"
);
//设置业务参数
AlipayTradeFastpayRefundQueryResponse
response
=
PayAlipayUtils
.
getInstance
().
getHttpClient
().
execute
(
request
);
AlipayTradeFastpayRefundQueryResponse
response
=
PayAlipayUtils
.
getInstance
().
getHttpClient
().
execute
(
request
);
log
.
debug
(
"AlipayTradeFastpayRefundQueryRequest -> data = "
+
JSON
.
toJSONString
(
response
));
log
.
info
(
"AlipayTradeFastpayRefundQueryRequest -> data = "
+
JSON
.
toJSONString
(
response
));
if
(
response
.
isSuccess
())
{
if
(
response
.
isSuccess
())
{
try
{
try
{
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
NotifyUrlDto
dto
=
new
NotifyUrlDto
();
if
(
response
.
getMsg
().
equalsIgnoreCase
(
"SUCCESS"
))
{
if
(
response
.
getMsg
().
equalsIgnoreCase
(
"SUCCESS"
))
{
dto
.
setStatus
(
1
);
dto
.
setStatus
(
1
);
...
@@ -439,8 +494,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -439,8 +494,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
dto
.
setRefundAt
(
callBackDto
.
getGmtRefund
());
dto
.
setRefundAt
(
callBackDto
.
getGmtRefund
());
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundPrice
(
response
.
getRefundAmount
());
dto
.
setRefundError
(
""
);
dto
.
setRefundError
(
""
);
log
.
debug
(
"SEND ALIPAY NOTIFTURL = "
+
JSON
.
toJSONString
(
dto
));
sendNotifyUrl
(
dto
,
null
);
sendNotifyUrl
(
dto
);
mqHandleUtil
.
sendMySqlRedis
(
mqHandleUtil
.
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
SqlMapping
.
get
(
"dragon_order_refund_log.insert"
),
...
@@ -471,7 +525,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -471,7 +525,7 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
}
}
}
private
void
sendNotifyUrl
(
NotifyUrlDto
notifyUrlDto
)
{
private
void
sendNotifyUrl
(
NotifyUrlDto
notifyUrlDto
,
String
url
)
{
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
();
MultiValueMap
<
String
,
String
>
params
=
new
LinkedMultiValueMap
();
params
.
add
(
"orderRefundCode"
,
notifyUrlDto
.
getOrderRefundCode
());
params
.
add
(
"orderRefundCode"
,
notifyUrlDto
.
getOrderRefundCode
());
...
@@ -480,8 +534,8 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -480,8 +534,8 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
params
.
add
(
"refundError"
,
notifyUrlDto
.
getRefundError
());
params
.
add
(
"refundError"
,
notifyUrlDto
.
getRefundError
());
params
.
add
(
"refundPrice"
,
notifyUrlDto
.
getRefundPrice
());
params
.
add
(
"refundPrice"
,
notifyUrlDto
.
getRefundPrice
());
params
.
add
(
"status"
,
notifyUrlDto
.
getStatus
().
toString
());
params
.
add
(
"status"
,
notifyUrlDto
.
getStatus
().
toString
());
String
response
=
HttpUtil
.
post
(
dataUtils
.
getRefundNotifyUrl
(
DragonConstant
.
REFUND_REDIS_KET
+
notifyUrlDto
.
getOrderRefundCode
())
,
params
);
String
response
=
HttpUtil
.
post
(
url
==
null
?
dataUtils
.
getRefundNotifyUrl
(
DragonConstant
.
REFUND_REDIS_KET
+
notifyUrlDto
.
getOrderRefundCode
()):
url
,
params
);
log
.
debug
(
"RETURN RESPONSE="
+
response
);
log
.
info
(
"RETURN RESPONSE="
+
response
);
if
(
response
.
equals
(
"success"
))
{
if
(
response
.
equals
(
"success"
))
{
mqHandleUtil
.
sendMySqlRedis
(
mqHandleUtil
.
sendMySqlRedis
(
SqlMapping
.
get
(
"dragon_order_refund_call_back.update"
),
SqlMapping
.
get
(
"dragon_order_refund_call_back.update"
),
...
@@ -496,4 +550,5 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -496,4 +550,5 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
);
);
}
}
}
}
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/controller/KylinBannersController.java
View file @
5f307dc7
...
@@ -2,7 +2,6 @@ package com.liquidnet.service.kylin.controller;
...
@@ -2,7 +2,6 @@ package com.liquidnet.service.kylin.controller;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.base.ResponseDto
;
import
com.liquidnet.service.kylin.dto.vo.KylinBannersVo
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.liquidnet.service.kylin.entity.KylinBanners
;
import
com.liquidnet.service.kylin.service.impl.BannersServiceImpl
;
import
com.liquidnet.service.kylin.service.impl.BannersServiceImpl
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
...
@@ -12,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
...
@@ -12,6 +11,7 @@ import io.swagger.annotations.ApiOperation;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.List
;
/**
/**
...
@@ -41,9 +41,12 @@ public class KylinBannersController {
...
@@ -41,9 +41,12 @@ public class KylinBannersController {
@RequestParam
()
String
position
,
@RequestParam
()
String
position
,
@RequestParam
(
defaultValue
=
""
)
String
provinceName
@RequestParam
(
defaultValue
=
""
)
String
provinceName
)
{
)
{
try
{
List
<
KylinBanners
>
result
=
bannersServiceImpl
.
blist
(
position
,
provinceName
);
List
<
KylinBanners
>
result
=
bannersServiceImpl
.
blist
(
position
,
provinceName
);
return
ResponseDto
.
success
(
result
);
return
ResponseDto
.
success
(
result
);
}
catch
(
Exception
e
)
{
return
ResponseDto
.
success
(
new
ArrayList
<>());
}
}
}
}
}
liquidnet-bus-service/liquidnet-service-kylin/liquidnet-service-kylin-impl/src/main/java/com/liquidnet/service/kylin/service/impl/BannersServiceImpl.java
View file @
5f307dc7
...
@@ -11,11 +11,8 @@ import com.liquidnet.service.kylin.utils.ObjectUtil;
...
@@ -11,11 +11,8 @@ import com.liquidnet.service.kylin.utils.ObjectUtil;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.MongoTemplate
;
import
org.springframework.data.mongodb.core.query.Criteria
;
import
org.springframework.data.mongodb.core.query.Query
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
java.time.LocalDateTime
;
import
java.util.Iterator
;
import
java.util.Iterator
;
import
java.util.List
;
import
java.util.List
;
...
@@ -56,9 +53,11 @@ public class BannersServiceImpl implements IKylinBannersService {
...
@@ -56,9 +53,11 @@ public class BannersServiceImpl implements IKylinBannersService {
if
(
null
!=
StartTime
&&
null
!=
endTime
&&
!
StartTime
.
isEmpty
()
&&
!
endTime
.
isEmpty
())
{
if
(
null
!=
StartTime
&&
null
!=
endTime
&&
!
StartTime
.
isEmpty
()
&&
!
endTime
.
isEmpty
())
{
if
(
DateUtil
.
compareStrDay
(
nowTime
,
StartTime
)
<
0
)
{
// 当前时间小雨开始时间 还未开始呢
if
(
DateUtil
.
compareStrDay
(
nowTime
,
StartTime
)
<
0
)
{
// 当前时间小雨开始时间 还未开始呢
itBannerList
.
remove
();
itBannerList
.
remove
();
continue
;
}
}
if
(
DateUtil
.
compareStrDay
(
endTime
,
nowTime
)
<
0
)
{
// 解释时间大于当前时间 已过期
if
(
DateUtil
.
compareStrDay
(
endTime
,
nowTime
)
<
0
)
{
// 解释时间大于当前时间 已过期
itBannerList
.
remove
();
itBannerList
.
remove
();
continue
;
}
}
}
}
...
@@ -74,6 +73,7 @@ public class BannersServiceImpl implements IKylinBannersService {
...
@@ -74,6 +73,7 @@ public class BannersServiceImpl implements IKylinBannersService {
}
}
if
(!
pis
||
null
==
pList
)
{
if
(!
pis
||
null
==
pList
)
{
itBannerList
.
remove
();
itBannerList
.
remove
();
continue
;
}
}
if
(
bannerInfo
.
getPromotionType
()
!=
1
)
{
if
(
bannerInfo
.
getPromotionType
()
!=
1
)
{
...
@@ -88,6 +88,7 @@ public class BannersServiceImpl implements IKylinBannersService {
...
@@ -88,6 +88,7 @@ public class BannersServiceImpl implements IKylinBannersService {
}
}
if
(!
prois
||
null
==
proList
)
{
if
(!
prois
||
null
==
proList
)
{
itBannerList
.
remove
();
itBannerList
.
remove
();
continue
;
}
}
}
}
...
...
liquidnet-bus-service/liquidnet-service-notify/liquidnet-service-notify-impl/src/main/java/com/liquidnet/service/dragon/service/impl/DragonOrderRefundsServiceImpl.java
View file @
5f307dc7
...
@@ -412,6 +412,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
...
@@ -412,6 +412,11 @@ public class DragonOrderRefundsServiceImpl implements IDragonOrderRefundsService
}
}
}
}
@Override
public
String
aliPayRefundCodeStatus
(
String
outTradeNo
,
String
tradeNo
,
String
outBizNo
,
String
callBackUrl
)
{
return
null
;
}
public
String
aliPayRefundCallBack
(
String
jsonStr
)
{
public
String
aliPayRefundCallBack
(
String
jsonStr
)
{
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
LocalDateTime
nowTime
=
LocalDateTime
.
now
();
try
{
try
{
...
...
liquidnet-bus-service/liquidnet-service-platform/liquidnet-service-platform-impl/src/main/java/com/liquidnet/service/platform/controller/adam/PlatformDMController.java
View file @
5f307dc7
//
package com.liquidnet.service.platform.controller.adam;
package
com
.
liquidnet
.
service
.
platform
.
controller
.
adam
;
//
//
import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport;
import
com.github.xiaoymin.knife4j.annotations.ApiOperationSupport
;
//
import com.github.xiaoymin.knife4j.annotations.ApiSupport;
import
com.github.xiaoymin.knife4j.annotations.ApiSupport
;
//
import com.liquidnet.common.exception.LiquidnetServiceException;
import
com.liquidnet.common.exception.LiquidnetServiceException
;
//
import com.liquidnet.service.base.ResponseDto;
import
com.liquidnet.service.base.ResponseDto
;
//
import com.liquidnet.service.platform.service.impl.adam.dm.processor.*;
import
com.liquidnet.service.platform.service.impl.adam.dm.processor.*
;
//
import io.swagger.annotations.Api;
import
io.swagger.annotations.Api
;
//
import io.swagger.annotations.ApiImplicitParam;
import
io.swagger.annotations.ApiImplicitParam
;
//
import io.swagger.annotations.ApiImplicitParams;
import
io.swagger.annotations.ApiImplicitParams
;
//
import io.swagger.annotations.ApiOperation;
import
io.swagger.annotations.ApiOperation
;
//
import lombok.extern.slf4j.Slf4j;
import
lombok.extern.slf4j.Slf4j
;
//
import org.apache.commons.lang3.StringUtils;
import
org.apache.commons.lang3.StringUtils
;
//
import org.springframework.beans.factory.annotation.Autowired;
import
org.springframework.beans.factory.annotation.Autowired
;
//
import org.springframework.validation.annotation.Validated;
import
org.springframework.validation.annotation.Validated
;
//
import org.springframework.web.bind.annotation.*;
import
org.springframework.web.bind.annotation.*
;
//
//
import javax.servlet.http.HttpServletRequest;
import
javax.servlet.http.HttpServletRequest
;
//
import java.time.LocalDateTime;
import
java.time.LocalDateTime
;
//
import java.time.temporal.ChronoField;
import
java.time.temporal.ChronoField
;
//
import java.util.concurrent.ExecutorService;
import
java.util.concurrent.ExecutorService
;
//
import java.util.concurrent.Executors;
import
java.util.concurrent.Executors
;
//
import java.util.regex.Pattern;
import
java.util.regex.Pattern
;
//
//
@ApiSupport(order = 90062)
@ApiSupport
(
order
=
90062
)
//
@Api(tags = "DM")
@Api
(
tags
=
"DM"
)
//
@Slf4j
@Slf4j
//
@Validated
@Validated
//
@RestController
@RestController
//
@RequestMapping("dm")
@RequestMapping
(
"dm"
)
//
public class PlatformDMController {
public
class
PlatformDMController
{
//
@Autowired
@Autowired
//
DMUserInformationProcessor dmUserInformationProcessor;
DMUserInformationProcessor
dmUserInformationProcessor
;
//
@Autowired
@Autowired
//
DMThirdPartsProcessor dmThirdPartsProcessor;
DMThirdPartsProcessor
dmThirdPartsProcessor
;
//
@Autowired
@Autowired
//
DMRealNameProcessor dmRealNameProcessor;
DMRealNameProcessor
dmRealNameProcessor
;
//
@Autowired
@Autowired
//
DMUserMemberProcessor dmUserMemberProcessor;
DMUserMemberProcessor
dmUserMemberProcessor
;
//
@Autowired
@Autowired
//
DMEntersProcessor dmEntersProcessor;
DMEntersProcessor
dmEntersProcessor
;
//
@Autowired
@Autowired
//
DMAddressesProcessor dmAddressesProcessor;
DMAddressesProcessor
dmAddressesProcessor
;
//
@Autowired
@Autowired
//
DMTracesInfoProcessor dmTracesInfoProcessor;
DMTracesInfoProcessor
dmTracesInfoProcessor
;
//
@Autowired
@Autowired
//
DMMemberOrderProcessor dmMemberOrderProcessor;
DMMemberOrderProcessor
dmMemberOrderProcessor
;
//
@Autowired
@Autowired
//
DMMemberCodeProcessor dmMemberCodeProcessor;
DMMemberCodeProcessor
dmMemberCodeProcessor
;
//
@Autowired
@Autowired
//
DMCollectionProcessor dmCollectionProcessor;
DMCollectionProcessor
dmCollectionProcessor
;
//
//
@ModelAttribute
@ModelAttribute
//
public void accessExecuting(HttpServletRequest request) {
public
void
accessExecuting
(
HttpServletRequest
request
)
{
//
String alis = request.getHeader("alis");
String
alis
=
request
.
getHeader
(
"alis"
);
//
LocalDateTime now = LocalDateTime.now();
LocalDateTime
now
=
LocalDateTime
.
now
();
//
int hour = now.get(ChronoField.HOUR_OF_DAY), minute = now.getMinute(), dom = now.get(ChronoField.DAY_OF_MONTH);;
int
hour
=
now
.
get
(
ChronoField
.
HOUR_OF_DAY
),
minute
=
now
.
getMinute
(),
dom
=
now
.
get
(
ChronoField
.
DAY_OF_MONTH
);;
//
String lns = "^(" + (dom % 10) + hour % (minute / 10 + 1) + "[A-Z]{2})" + minute / 10 + "[0-9]{1}$";
String
lns
=
"^("
+
(
dom
%
10
)
+
hour
%
(
minute
/
10
+
1
)
+
"[A-Z]{2})"
+
minute
/
10
+
"[0-9]{1}$"
;
//
log.info("lns:{},alis:{}", lns, alis);
log
.
info
(
"lns:{},alis:{}"
,
lns
,
alis
);
//
if (StringUtils.isEmpty(alis) || !Pattern.matches(lns, alis)) {
if
(
StringUtils
.
isEmpty
(
alis
)
||
!
Pattern
.
matches
(
lns
,
alis
))
{
//
throw new LiquidnetServiceException("44444", "非法操作");
throw
new
LiquidnetServiceException
(
"44444"
,
"非法操作"
);
//
}
}
//
log.info("uri:[{}],Parameter:{}", request.getRequestURI(), request.getParameterMap());
log
.
info
(
"uri:[{}],Parameter:{}"
,
request
.
getRequestURI
(),
request
.
getParameterMap
());
//
}
}
//
//
@ApiOperationSupport(order = 1)
@ApiOperationSupport
(
order
=
1
)
//
@ApiOperation(value = "T - user")
@ApiOperation
(
value
=
"T - user"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "220"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"220"
),
//
})
})
//
@GetMapping(value = {"user"})
@GetMapping
(
value
=
{
"user"
})
//
public ResponseDto<Object> dataMigrationForUser(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForUser
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
log.info("===dG:{},incrDt:{},flg:{},flu:{}", dG, incrDt, flg, flu);
log
.
info
(
"===dG:{},incrDt:{},flg:{},flu:{}"
,
dG
,
incrDt
,
flg
,
flu
);
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmUserInformationProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmUserInformationProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmUserInformationProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmUserInformationProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 2)
@ApiOperationSupport
(
order
=
2
)
//
@ApiOperation(value = "T - tpa")
@ApiOperation
(
value
=
"T - tpa"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "45"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"45"
),
//
})
})
//
@GetMapping(value = {"tpa"})
@GetMapping
(
value
=
{
"tpa"
})
//
public ResponseDto<Object> dataMigrationForTpa(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForTpa
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmThirdPartsProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmThirdPartsProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmThirdPartsProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmThirdPartsProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 3)
@ApiOperationSupport
(
order
=
3
)
//
@ApiOperation(value = "T - real")
@ApiOperation
(
value
=
"T - real"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "2"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"2"
),
//
})
})
//
@GetMapping(value = {"real"})
@GetMapping
(
value
=
{
"real"
})
//
public ResponseDto<Object> dataMigrationForReal(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForReal
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmRealNameProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmRealNameProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmRealNameProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmRealNameProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 4)
@ApiOperationSupport
(
order
=
4
)
//
@ApiOperation(value = "T - collect")
@ApiOperation
(
value
=
"T - collect"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "15"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"15"
),
//
})
})
//
@GetMapping(value = {"collect"})
@GetMapping
(
value
=
{
"collect"
})
//
public ResponseDto<Object> dataMigrationForCollect(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForCollect
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmCollectionProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmCollectionProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmCollectionProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmCollectionProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 5)
@ApiOperationSupport
(
order
=
5
)
//
@ApiOperation(value = "T - enters")
@ApiOperation
(
value
=
"T - enters"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "93"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"93"
),
//
})
})
//
@GetMapping(value = {"enters"})
@GetMapping
(
value
=
{
"enters"
})
//
public ResponseDto<Object> dataMigrationForEnters(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForEnters
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmEntersProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmEntersProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmEntersProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmEntersProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 6)
@ApiOperationSupport
(
order
=
6
)
//
@ApiOperation(value = "T - addr")
@ApiOperation
(
value
=
"T - addr"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "27"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"27"
),
//
})
})
//
@GetMapping(value = {"addr"})
@GetMapping
(
value
=
{
"addr"
})
//
public ResponseDto<Object> dataMigrationForAddr(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForAddr
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmAddressesProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmAddressesProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmAddressesProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmAddressesProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 7)
@ApiOperationSupport
(
order
=
7
)
//
@ApiOperation(value = "T - vip")
@ApiOperation
(
value
=
"T - vip"
)
//
@ApiImplicitParams({
@ApiImplicitParams
({
//
@ApiImplicitParam(type = "form", name = "dG", example = "2"),
@ApiImplicitParam
(
type
=
"form"
,
name
=
"dG"
,
example
=
"2"
),
//
})
})
//
@GetMapping(value = {"vip"})
@GetMapping
(
value
=
{
"vip"
})
//
public ResponseDto<Object> dataMigrationForVip(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForVip
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
if (null != dG) {
if
(
null
!=
dG
)
{
//
ExecutorService exec = Executors.newFixedThreadPool(dG);
ExecutorService
exec
=
Executors
.
newFixedThreadPool
(
dG
);
//
for (int i = 0; i < dG; i++) {
for
(
int
i
=
0
;
i
<
dG
;
i
++)
{
//
final int k = i;
final
int
k
=
i
;
//
exec.execute(() -> {
exec
.
execute
(()
->
{
//
log.info("==================" + k);
log
.
info
(
"=================="
+
k
);
//
dmUserMemberProcessor.dataProcessing(k, dG, null, null, k == 0 ? "1" : "");
dmUserMemberProcessor
.
dataProcessing
(
k
,
dG
,
null
,
null
,
k
==
0
?
"1"
:
""
);
//
});
});
//
try { Thread.sleep(100L); } catch (InterruptedException ignored) {}
try
{
Thread
.
sleep
(
100L
);
}
catch
(
InterruptedException
ignored
)
{}
//
}
}
//
exec.shutdown();
exec
.
shutdown
();
//
} else {
}
else
{
//
dmUserMemberProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmUserMemberProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
}
}
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 8)
@ApiOperationSupport
(
order
=
8
)
//
@ApiOperation(value = "morder")
@ApiOperation
(
value
=
"morder"
)
//
@GetMapping(value = {"morder"})
@GetMapping
(
value
=
{
"morder"
})
//
public ResponseDto<Object> dataMigrationForMOrder(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForMOrder
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
dmMemberOrderProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmMemberOrderProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 9)
@ApiOperationSupport
(
order
=
9
)
//
@ApiOperation(value = "mcode")
@ApiOperation
(
value
=
"mcode"
)
//
@GetMapping(value = {"mcode"})
@GetMapping
(
value
=
{
"mcode"
})
//
public ResponseDto<Object> dataMigrationForMCode(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForMCode
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
dmMemberCodeProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmMemberCodeProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
//
@ApiOperationSupport(order = 10)
@ApiOperationSupport
(
order
=
10
)
//
@ApiOperation(value = "traces")
@ApiOperation
(
value
=
"traces"
)
//
@GetMapping(value = {"traces"})
@GetMapping
(
value
=
{
"traces"
})
//
public ResponseDto<Object> dataMigrationForTraces(@RequestParam(required = false) Integer dG,
public
ResponseDto
<
Object
>
dataMigrationForTraces
(
@RequestParam
(
required
=
false
)
Integer
dG
,
//
@RequestParam(required = false) String incrDt,
@RequestParam
(
required
=
false
)
String
incrDt
,
//
@RequestParam(required = false) String flg,
@RequestParam
(
required
=
false
)
String
flg
,
//
@RequestParam(required = false) String flu
@RequestParam
(
required
=
false
)
String
flu
//
) {
)
{
//
dmTracesInfoProcessor.dataProcessing(null, null, incrDt, flg, flu);
dmTracesInfoProcessor
.
dataProcessing
(
null
,
null
,
incrDt
,
flg
,
flu
);
//
return ResponseDto.success(dG);
return
ResponseDto
.
success
(
dG
);
//
}
}
//
}
}
liquidnet-bus-service/liquidnet-service-sweet/src/main/java/com/liquidnet/service/sweet/utils/RedisDataUtils.java
View file @
5f307dc7
...
@@ -47,6 +47,7 @@ public class RedisDataUtils {
...
@@ -47,6 +47,7 @@ public class RedisDataUtils {
List
<
SweetManualAppletDto
>
data
=
sweetManualMapper
.
getManualAppletDto
();
List
<
SweetManualAppletDto
>
data
=
sweetManualMapper
.
getManualAppletDto
();
for
(
SweetManualAppletDto
item
:
data
)
{
for
(
SweetManualAppletDto
item
:
data
)
{
item
.
setFieldName
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"name"
));
item
.
setFieldName
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"name"
));
item
.
setCityName
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"city_name"
));
item
.
setLatitude
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"latitude"
));
item
.
setLatitude
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"latitude"
));
item
.
setLongitude
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"longitude"
));
item
.
setLongitude
((
String
)
redisUtil
.
hget
(
"kylin:fields:id"
+
":"
+
item
.
getFieldId
(),
"longitude"
));
}
}
...
...
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