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
Jeepay
Commits
adba7f7e
Commit
adba7f7e
authored
Jul 29, 2021
by
terrfly
Browse files
sonarLint 代码检测工具检测整改
parent
91b1c1c5
Changes
8
Hide whitespace changes
Inline
Side-by-side
jeepay-components/jeepay-components-oss/src/main/java/com/jeequan/jeepay/components/oss/ctrl/OssFileController.java
View file @
adba7f7e
...
@@ -75,7 +75,7 @@ public class OssFileController extends AbstractCtrl {
...
@@ -75,7 +75,7 @@ public class OssFileController extends AbstractCtrl {
}
catch
(
BizException
biz
)
{
}
catch
(
BizException
biz
)
{
throw
biz
;
throw
biz
;
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
logger
.
error
(
"upload error, fileName = {}"
,
file
==
null
?
null
:
file
.
getOriginalFilename
(),
e
);
logger
.
error
(
"upload error, fileName = {}"
,
file
.
getOriginalFilename
(),
e
);
throw
new
BizException
(
ApiCodeEnum
.
SYSTEM_ERROR
);
throw
new
BizException
(
ApiCodeEnum
.
SYSTEM_ERROR
);
}
}
}
}
...
...
jeepay-core/src/main/java/com/jeequan/jeepay/core/ctrls/AbstractCtrl.java
View file @
adba7f7e
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
*/
*/
package
com.jeequan.jeepay.core.ctrls
;
package
com.jeequan.jeepay.core.ctrls
;
import
cn.hutool.core.
util.Str
Util
;
import
cn.hutool.core.
text.CharSequence
Util
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
...
@@ -120,7 +120,7 @@ public abstract class AbstractCtrl {
...
@@ -120,7 +120,7 @@ public abstract class AbstractCtrl {
return
null
;
return
null
;
}
}
return
MutablePair
.
of
(
"ascend"
.
equalsIgnoreCase
(
sortOrderFlag
),
Str
Util
.
toUnderlineCase
(
sortField
).
toLowerCase
());
return
MutablePair
.
of
(
"ascend"
.
equalsIgnoreCase
(
sortOrderFlag
),
CharSequence
Util
.
toUnderlineCase
(
sortField
).
toLowerCase
());
}
}
...
@@ -210,9 +210,9 @@ public abstract class AbstractCtrl {
...
@@ -210,9 +210,9 @@ public abstract class AbstractCtrl {
if
(
result
instanceof
BaseModel
){
//如果属于BaseModel, 处理apiExtVal
if
(
result
instanceof
BaseModel
){
//如果属于BaseModel, 处理apiExtVal
JSONObject
resultTemp
=
(
JSONObject
)
JSON
.
toJSON
(
result
);
JSONObject
resultTemp
=
(
JSONObject
)
JSON
.
toJSON
(
result
);
for
(
String
ke
y
:
params
.
k
eySet
())
{
//遍历原始参数
for
(
Map
.
Entry
<
String
,
Object
>
entr
y
:
params
.
e
ntr
ySet
())
{
//遍历原始参数
if
(!
resultTemp
.
containsKey
(
key
)){
if
(!
resultTemp
.
containsKey
(
entry
.
getKey
()
)){
((
BaseModel
)
result
).
addExt
(
key
,
params
.
get
(
key
));
((
BaseModel
)
result
).
addExt
(
entry
.
getKey
(),
entry
.
getValue
(
));
}
}
}
}
}
}
...
...
jeepay-manager/src/main/java/com/jeequan/jeepay/mgr/ctrl/CurrentUserController.java
View file @
adba7f7e
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
com.jeequan.jeepay.mgr.ctrl
;
package
com.jeequan.jeepay.mgr.ctrl
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.codec.Base64
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
...
@@ -67,7 +68,7 @@ public class CurrentUserController extends CommonCtrl{
...
@@ -67,7 +68,7 @@ public class CurrentUserController extends CommonCtrl{
List
<
SysEntitlement
>
allMenuList
=
new
ArrayList
<>();
//所有菜单集合
List
<
SysEntitlement
>
allMenuList
=
new
ArrayList
<>();
//所有菜单集合
//2. 查询出用户所有菜单集合 (包含左侧显示菜单 和 其他类型菜单 )
//2. 查询出用户所有菜单集合 (包含左侧显示菜单 和 其他类型菜单 )
if
(
entIdList
!=
null
&&
!
entIdList
.
isEmpty
()){
if
(!
entIdList
.
isEmpty
()){
allMenuList
=
sysEntitlementService
.
list
(
SysEntitlement
.
gw
()
allMenuList
=
sysEntitlementService
.
list
(
SysEntitlement
.
gw
()
.
in
(
SysEntitlement:
:
getEntId
,
entIdList
)
.
in
(
SysEntitlement:
:
getEntId
,
entIdList
)
.
in
(
SysEntitlement:
:
getEntType
,
Arrays
.
asList
(
CS
.
ENT_TYPE
.
MENU_LEFT
,
CS
.
ENT_TYPE
.
MENU_OTHER
))
.
in
(
SysEntitlement:
:
getEntType
,
Arrays
.
asList
(
CS
.
ENT_TYPE
.
MENU_LEFT
,
CS
.
ENT_TYPE
.
MENU_OTHER
))
...
@@ -76,7 +77,7 @@ public class CurrentUserController extends CommonCtrl{
...
@@ -76,7 +77,7 @@ public class CurrentUserController extends CommonCtrl{
}
}
//4. 转换为json树状结构
//4. 转换为json树状结构
JSONArray
jsonArray
=
(
JSONArray
)
JSON
Array
.
toJSON
(
allMenuList
);
JSONArray
jsonArray
=
(
JSONArray
)
JSON
.
toJSON
(
allMenuList
);
List
<
JSONObject
>
allMenuRouteTree
=
new
TreeDataBuilder
(
jsonArray
,
List
<
JSONObject
>
allMenuRouteTree
=
new
TreeDataBuilder
(
jsonArray
,
"entId"
,
"pid"
,
"children"
,
"entSort"
,
true
)
"entId"
,
"pid"
,
"children"
,
"entSort"
,
true
)
.
buildTreeObject
();
.
buildTreeObject
();
...
...
jeepay-merchant/src/main/java/com/jeequan/jeepay/mch/ctrl/CurrentUserController.java
View file @
adba7f7e
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
package
com.jeequan.jeepay.mch.ctrl
;
package
com.jeequan.jeepay.mch.ctrl
;
import
cn.hutool.core.codec.Base64
;
import
cn.hutool.core.codec.Base64
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONArray
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
import
com.jeequan.jeepay.core.aop.MethodLog
;
...
@@ -70,7 +71,7 @@ public class CurrentUserController extends CommonCtrl{
...
@@ -70,7 +71,7 @@ public class CurrentUserController extends CommonCtrl{
List
<
SysEntitlement
>
allMenuList
=
new
ArrayList
<>();
//所有菜单集合
List
<
SysEntitlement
>
allMenuList
=
new
ArrayList
<>();
//所有菜单集合
//2. 查询出用户所有菜单集合 (包含左侧显示菜单 和 其他类型菜单 )
//2. 查询出用户所有菜单集合 (包含左侧显示菜单 和 其他类型菜单 )
if
(
entIdList
!=
null
&&
!
entIdList
.
isEmpty
()){
if
(!
entIdList
.
isEmpty
()){
allMenuList
=
sysEntitlementService
.
list
(
SysEntitlement
.
gw
()
allMenuList
=
sysEntitlementService
.
list
(
SysEntitlement
.
gw
()
.
in
(
SysEntitlement:
:
getEntId
,
entIdList
)
.
in
(
SysEntitlement:
:
getEntId
,
entIdList
)
.
in
(
SysEntitlement:
:
getEntType
,
Arrays
.
asList
(
CS
.
ENT_TYPE
.
MENU_LEFT
,
CS
.
ENT_TYPE
.
MENU_OTHER
))
.
in
(
SysEntitlement:
:
getEntType
,
Arrays
.
asList
(
CS
.
ENT_TYPE
.
MENU_LEFT
,
CS
.
ENT_TYPE
.
MENU_OTHER
))
...
@@ -79,7 +80,7 @@ public class CurrentUserController extends CommonCtrl{
...
@@ -79,7 +80,7 @@ public class CurrentUserController extends CommonCtrl{
}
}
//4. 转换为json树状结构
//4. 转换为json树状结构
JSONArray
jsonArray
=
(
JSONArray
)
JSON
Array
.
toJSON
(
allMenuList
);
JSONArray
jsonArray
=
(
JSONArray
)
JSON
.
toJSON
(
allMenuList
);
List
<
JSONObject
>
allMenuRouteTree
=
new
TreeDataBuilder
(
jsonArray
,
List
<
JSONObject
>
allMenuRouteTree
=
new
TreeDataBuilder
(
jsonArray
,
"entId"
,
"pid"
,
"children"
,
"entSort"
,
true
)
"entId"
,
"pid"
,
"children"
,
"entSort"
,
true
)
.
buildTreeObject
();
.
buildTreeObject
();
...
...
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/alipay/AlipayKit.java
View file @
adba7f7e
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
*/
*/
package
com.jeequan.jeepay.pay.channel.alipay
;
package
com.jeequan.jeepay.pay.channel.alipay
;
import
cn.hutool.core.
util.Str
Util
;
import
cn.hutool.core.
text.CharSequence
Util
;
import
com.alipay.api.AlipayObject
;
import
com.alipay.api.AlipayObject
;
import
com.alipay.api.AlipayRequest
;
import
com.alipay.api.AlipayRequest
;
import
com.alipay.api.domain.*
;
import
com.alipay.api.domain.*
;
...
@@ -101,7 +101,7 @@ public class AlipayKit {
...
@@ -101,7 +101,7 @@ public class AlipayKit {
}
else
{
}
else
{
result
=
StringUtils
.
defaultIfEmpty
(
subMsg
,
msg
);
result
=
StringUtils
.
defaultIfEmpty
(
subMsg
,
msg
);
}
}
return
Str
Util
.
maxLength
(
result
,
253
);
return
CharSequence
Util
.
maxLength
(
result
,
253
);
}
}
}
}
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/channel/ysfpay/payway/AliJsapi.java
View file @
adba7f7e
...
@@ -15,17 +15,18 @@
...
@@ -15,17 +15,18 @@
*/
*/
package
com.jeequan.jeepay.pay.channel.ysfpay.payway
;
package
com.jeequan.jeepay.pay.channel.ysfpay.payway
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.jeequan.jeepay.core.entity.PayOrder
;
import
com.jeequan.jeepay.core.entity.PayOrder
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.core.exception.BizException
;
import
com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService
;
import
com.jeequan.jeepay.pay.channel.ysfpay.YsfpayPaymentService
;
import
com.jeequan.jeepay.pay.model.MchAppConfigContext
;
import
com.jeequan.jeepay.pay.rqrs.AbstractRS
;
import
com.jeequan.jeepay.pay.rqrs.AbstractRS
;
import
com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg
;
import
com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ
;
import
com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRQ
;
import
com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRQ
;
import
com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRS
;
import
com.jeequan.jeepay.pay.rqrs.payorder.payway.AliJsapiOrderRS
;
import
com.jeequan.jeepay.pay.rqrs.payorder.UnifiedOrderRQ
;
import
com.jeequan.jeepay.pay.rqrs.msg.ChannelRetMsg
;
import
com.jeequan.jeepay.pay.util.ApiResBuilder
;
import
com.jeequan.jeepay.pay.util.ApiResBuilder
;
import
com.jeequan.jeepay.pay.model.MchAppConfigContext
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
...
@@ -77,7 +78,7 @@ public class AliJsapi extends YsfpayPaymentService {
...
@@ -77,7 +78,7 @@ public class AliJsapi extends YsfpayPaymentService {
//00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败
//00-交易成功, 02-用户支付中 , 12-交易重复, 需要发起查询处理 其他认为失败
if
(
"00"
.
equals
(
respCode
)){
if
(
"00"
.
equals
(
respCode
)){
//付款信息
//付款信息
JSONObject
payDataJSON
=
JSON
Object
.
parseObject
(
resJSON
.
getString
(
"payData"
));
JSONObject
payDataJSON
=
JSON
.
parseObject
(
resJSON
.
getString
(
"payData"
));
String
tradeNo
=
""
;
String
tradeNo
=
""
;
if
(
StringUtils
.
isNotBlank
(
payDataJSON
.
getString
(
"tradeNo"
))){
if
(
StringUtils
.
isNotBlank
(
payDataJSON
.
getString
(
"tradeNo"
))){
...
...
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/ctrl/payorder/AbstractPayOrderController.java
View file @
adba7f7e
...
@@ -267,7 +267,7 @@ public abstract class AbstractPayOrderController extends ApiController {
...
@@ -267,7 +267,7 @@ public abstract class AbstractPayOrderController extends ApiController {
if
(
mchAppConfigContext
.
getMchType
()
==
MchInfo
.
TYPE_NORMAL
){
//普通商户
if
(
mchAppConfigContext
.
getMchType
()
==
MchInfo
.
TYPE_NORMAL
){
//普通商户
if
(
mchAppConfigContext
==
null
||
mchAppConfigContext
.
getNormalMchParamsByIfCode
(
ifCode
)
==
null
){
if
(
mchAppConfigContext
.
getNormalMchParamsByIfCode
(
ifCode
)
==
null
){
throw
new
BizException
(
"商户应用参数未配置"
);
throw
new
BizException
(
"商户应用参数未配置"
);
}
}
}
else
if
(
mchAppConfigContext
.
getMchType
()
==
MchInfo
.
TYPE_ISVSUB
){
//特约商户
}
else
if
(
mchAppConfigContext
.
getMchType
()
==
MchInfo
.
TYPE_ISVSUB
){
//特约商户
...
...
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/mq/PayOrderReissueMQReceiver.java
View file @
adba7f7e
...
@@ -63,9 +63,6 @@ public class PayOrderReissueMQReceiver implements PayOrderReissueMQ.IMQReceiver
...
@@ -63,9 +63,6 @@ public class PayOrderReissueMQReceiver implements PayOrderReissueMQ.IMQReceiver
return
;
return
;
}
}
if
(
payOrder
==
null
)
{
return
;
}
ChannelRetMsg
channelRetMsg
=
channelOrderReissueService
.
processPayOrder
(
payOrder
);
ChannelRetMsg
channelRetMsg
=
channelOrderReissueService
.
processPayOrder
(
payOrder
);
//返回null 可能为接口报错等, 需要再次轮询
//返回null 可能为接口报错等, 需要再次轮询
...
...
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