Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
90b762e5
提交
90b762e5
authored
4月 23, 2024
作者:
刘明祎-运维用途
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
规范--反转equals使用
上级
26f423de
隐藏空白字符变更
内嵌
并排
正在显示
10 个修改的文件
包含
23 行增加
和
22 行删除
+23
-22
HttpsRequestUtil.java
...til/src/main/java/com/mmc/iuav/http/HttpsRequestUtil.java
+1
-1
BCryptPasswordEncoder.java
...in/java/com/mmc/iuav/user/auth/BCryptPasswordEncoder.java
+1
-0
UserReportServiceImpl.java
...mc/iuav/user/service/data/impl/UserReportServiceImpl.java
+1
-1
SealManageServiceImpl.java
...mmc/iuav/user/service/fdd/impl/SealManageServiceImpl.java
+4
-4
UserFddAuthServiceImpl.java
...mc/iuav/user/service/fdd/impl/UserFddAuthServiceImpl.java
+2
-2
MessageServiceImpl.java
...va/com/mmc/iuav/user/service/impl/MessageServiceImpl.java
+2
-2
RealNameAuthServiceImpl.java
...m/mmc/iuav/user/service/impl/RealNameAuthServiceImpl.java
+6
-6
WxServiceImpl.java
...in/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
+2
-2
XzServiceImpl.java
...va/com/mmc/iuav/user/service/xzsz/impl/XzServiceImpl.java
+3
-3
QccEntAuthUtil.java
.../src/main/java/com/mmc/iuav/user/util/QccEntAuthUtil.java
+1
-1
没有找到文件。
cms-common/cms-common-util/src/main/java/com/mmc/iuav/http/HttpsRequestUtil.java
浏览文件 @
90b762e5
...
...
@@ -189,7 +189,7 @@ public class HttpsRequestUtil {
String
ret
=
""
;
while
(
ret
!=
null
)
{
ret
=
br
.
readLine
();
if
(
ret
!=
null
&&
!
ret
.
trim
().
equals
(
""
))
{
if
(
ret
!=
null
&&
!
""
.
equals
(
ret
.
trim
()
))
{
str_return
=
str_return
+
new
String
(
ret
.
getBytes
(
"ISO-8859-1"
),
"utf-8"
);
}
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/auth/BCryptPasswordEncoder.java
浏览文件 @
90b762e5
...
...
@@ -98,6 +98,7 @@ public class BCryptPasswordEncoder implements PasswordEncoder {
return
BCrypt
.
hashpw
(
rawPassword
.
toString
(),
salt
);
}
public
boolean
matches
(
CharSequence
rawPassword
,
String
encodedPassword
)
{
if
(
rawPassword
==
null
)
{
throw
new
IllegalArgumentException
(
"rawPassword cannot be null"
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/data/impl/UserReportServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -59,7 +59,7 @@ public class UserReportServiceImpl implements UserReportService {
@Override
public
Integer
getUserActiveCount
()
{
ResultBody
resultBody
=
wxService
.
getUserPortrait
();
if
(
resultBody
!=
null
&&
resultBody
.
getCode
().
equals
(
"200"
))
{
if
(
resultBody
!=
null
&&
"200"
.
equals
(
resultBody
.
getCode
()
))
{
JSONObject
result
=
JSONObject
.
parseObject
(
resultBody
.
getResult
().
toString
());
JSONArray
jsonArray
;
//当去微信拿不到日活量时会报空指针就返回null代表没拿到数据,要重新请求
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/fdd/impl/SealManageServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -53,7 +53,7 @@ public class SealManageServiceImpl implements SealManageService {
@Override
public
ResultBody
uploadSeal
(
SealVO
sealVO
,
LoginSuccessDTO
loginSuccessDTO
)
{
ResultBody
resultBody
=
this
.
checkAuthStatus
(
sealVO
.
getPort
(),
loginSuccessDTO
);
if
(!
resultBody
.
getCode
().
equals
(
"200"
))
{
if
(!
"200"
.
equals
(
resultBody
.
getCode
()
))
{
return
resultBody
;
}
UserFddDO
userFddInfo
=
(
UserFddDO
)
resultBody
.
getResult
();
...
...
@@ -122,7 +122,7 @@ public class SealManageServiceImpl implements SealManageService {
@Override
public
ResultBody
removeSeal
(
String
signatureId
,
Integer
port
,
LoginSuccessDTO
loginSuccessDTO
)
{
ResultBody
resultBody
=
checkAuthStatus
(
port
,
loginSuccessDTO
);
if
(!
resultBody
.
getCode
().
equals
(
"200"
))
{
if
(!
"200"
.
equals
(
resultBody
.
getCode
()
))
{
return
resultBody
;
}
UserFddDO
userFddInfo
=
(
UserFddDO
)
resultBody
.
getResult
();
...
...
@@ -184,7 +184,7 @@ public class SealManageServiceImpl implements SealManageService {
@Transactional
(
rollbackFor
=
Exception
.
class
)
public
ResultBody
defaultSeal
(
String
signatureId
,
Integer
port
,
LoginSuccessDTO
loginSuccessDTO
)
{
ResultBody
resultBody
=
checkAuthStatus
(
port
,
loginSuccessDTO
);
if
(!
resultBody
.
getCode
().
equals
(
"200"
))
{
if
(!
"200"
.
equals
(
resultBody
.
getCode
()
))
{
return
resultBody
;
}
UserFddDO
userFddInfo
=
(
UserFddDO
)
resultBody
.
getResult
();
...
...
@@ -207,7 +207,7 @@ public class SealManageServiceImpl implements SealManageService {
@Override
public
ResultBody
getSealInfo
(
String
signatureId
,
Integer
port
,
LoginSuccessDTO
loginSuccessDTO
)
{
ResultBody
resultBody
=
checkAuthStatus
(
port
,
loginSuccessDTO
);
if
(!
resultBody
.
getCode
().
equals
(
"200"
))
{
if
(!
"200"
.
equals
(
resultBody
.
getCode
()
))
{
return
resultBody
;
}
UserFddDO
userFddInfo
=
(
UserFddDO
)
resultBody
.
getResult
();
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/fdd/impl/UserFddAuthServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -200,13 +200,13 @@ public class UserFddAuthServiceImpl implements UserFddAuthService {
return
ResultBody
.
error
(
ResultEnum
.
NOT_FOUND
);
}
//修改认证状态
if
(
authenticationType
.
equals
(
"2"
))
{
if
(
"2"
.
equals
(
authenticationType
))
{
userFddAuthDao
.
updateCompanyCertStatus
(
customerId
,
status
);
}
else
{
userFddAuthDao
.
updatePersonCertStatus
(
customerId
,
status
);
}
//通过需要申请证书
if
((
"2"
.
equals
(
authenticationType
)
&&
status
.
equals
(
"4"
))
||
(
authenticationType
.
equals
(
"1"
)
&&
status
.
equals
(
"2"
)))
{
if
((
"2"
.
equals
(
authenticationType
)
&&
"4"
.
equals
(
status
))
||
(
"1"
.
equals
(
authenticationType
)
&&
"2"
.
equals
(
status
)))
{
fddService
.
getApplyCert
(
verifyInfoDO
.
getCustomerId
(),
verifyInfoDO
.
getTransactionNo
());
}
return
ResultBody
.
success
();
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/MessageServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -347,7 +347,7 @@ public class MessageServiceImpl implements MessageService {
MessageTimeVO
messageTimeVO1
=
messageDao
.
selectUserMessageTimeType
(
id
);
// 增加聊天时长
String
timeValue
=
redisTemplate
.
opsForValue
().
get
(
"Message"
+
userAccountId
);
if
(
timeValue
==
null
||
timeValue
.
equals
(
""
))
{
if
(
timeValue
==
null
||
""
.
equals
(
timeValue
))
{
redisTemplate
.
setValueSerializer
(
RedisSerializer
.
json
());
redisTemplate
.
opsForValue
().
set
(
"Message"
+
userAccountId
,
userAccountId
.
toString
(),
messageTimeVO1
.
getChatDuration
()
*
24
*
60
*
60
,
TimeUnit
.
SECONDS
);
return
ResultBody
.
success
(
"成功购买"
+
messageTimeVO1
.
getChatDuration
()+
"天聊天功能"
);
...
...
@@ -375,7 +375,7 @@ public class MessageServiceImpl implements MessageService {
}
// 增加聊天时长
String
timeValue
=
redisTemplate
.
opsForValue
().
get
(
"Message"
+
userAccountId
);
if
(
timeValue
==
null
||
timeValue
.
equals
(
""
))
{
if
(
timeValue
==
null
||
""
.
equals
(
timeValue
))
{
redisTemplate
.
setValueSerializer
(
RedisSerializer
.
json
());
redisTemplate
.
opsForValue
().
set
(
"Message"
+
userAccountId
,
userAccountId
.
toString
(),
messageTimeVO1
.
getChatDuration
()
*
24
*
60
*
60
,
TimeUnit
.
SECONDS
);
return
ResultBody
.
success
(
"成功购买"
+
messageTimeVO1
.
getChatDuration
()+
"天聊天功能"
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/RealNameAuthServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -73,7 +73,7 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
String
faceMsg
=
JSONObject
.
parseObject
(
faceResult
.
toString
()).
getString
(
"code"
);
String
backMsg
=
JSONObject
.
parseObject
(
backResult
.
toString
()).
getString
(
"code"
);
// 都解析通过
if
(
faceMsg
.
equals
(
"200"
)
&&
backMsg
.
equals
(
"200"
))
{
if
(
"200"
.
equals
(
faceMsg
)
&&
"200"
.
equals
(
backMsg
))
{
// 处理正面
JSONObject
faceResultJson
=
JSONObject
.
parseObject
(
JSONObject
.
parseObject
(
faceResult
.
toString
()).
getString
(
"result"
));
...
...
@@ -96,9 +96,9 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
realNameAuthDO
.
setIssue
(
backResultJson
.
getString
(
"issue"
));
realNameAuthDO
.
setUnionId
(
realNameAuthVO
.
getUnionId
());
if
(
faceResultJson
.
getString
(
"sex"
).
equals
(
"男"
))
{
if
(
"男"
.
equals
(
faceResultJson
.
getString
(
"sex"
)
))
{
realNameAuthDO
.
setSex
(
1
);
}
else
if
(
faceResultJson
.
getString
(
"sex"
).
equals
(
"女"
))
{
}
else
if
(
"女"
.
equals
(
faceResultJson
.
getString
(
"sex"
)
))
{
realNameAuthDO
.
setSex
(
2
);
}
else
{
realNameAuthDO
.
setSex
(
0
);
...
...
@@ -116,7 +116,7 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
realNameAuthDO
.
setBirthday
(
this
.
getDate
(
faceResultJson
.
getString
(
"birth"
),
"yyyyMMdd"
));
realNameAuthDO
.
setStartDate
(
this
.
getDate
(
backResultJson
.
getString
(
"start_date"
),
"yyyyMMdd"
));
if
(
backResultJson
.
getString
(
"end_date"
).
equals
(
"长期"
))
{
if
(
"长期"
.
equals
(
backResultJson
.
getString
(
"end_date"
)
))
{
realNameAuthDO
.
setEndDate
(
null
);
}
else
{
realNameAuthDO
.
setEndDate
(
this
.
getDate
(
backResultJson
.
getString
(
"end_date"
),
"yyyyMMdd"
));
...
...
@@ -168,7 +168,7 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
RealNameAuthDO
realNameAuthDO
=
realNameAuthDao
.
getRealNameAuthById
(
id
);
if
(
realNameAuthDO
!=
null
)
{
UserAccountDO
userAccountById
=
userServiceDao
.
getUserAccountById
(
realNameAuthDO
.
getUserAccountId
());
if
(
realNameAuthDO
.
getUnionId
()
==
null
||
realNameAuthDO
.
getUnionId
().
equals
(
""
)){
if
(
realNameAuthDO
.
getUnionId
()
==
null
||
""
.
equals
(
realNameAuthDO
.
getUnionId
()
)){
realNameAuthDO
.
setUnionId
(
userAccountById
.
getUnionId
());
realNameAuthDao
.
updateRealNameAuth
(
realNameAuthDO
);
}
...
...
@@ -197,7 +197,7 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
RealNameAuthDO
realNameAuthDO
=
realNameAuthDao
.
userDetail
(
userAccountId
);
if
(
realNameAuthDO
!=
null
)
{
UserAccountDO
userAccountById
=
userServiceDao
.
getUserAccountById
(
realNameAuthDO
.
getUserAccountId
());
if
(
realNameAuthDO
.
getUnionId
()
==
null
||
realNameAuthDO
.
getUnionId
().
equals
(
""
)){
if
(
realNameAuthDO
.
getUnionId
()
==
null
||
""
.
equals
(
realNameAuthDO
.
getUnionId
()
)){
realNameAuthDO
.
setUnionId
(
userAccountById
.
getUnionId
());
realNameAuthDao
.
updateRealNameAuth
(
realNameAuthDO
);
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -329,7 +329,7 @@ public class WxServiceImpl implements WxService {
String
url
=
"https://api.weixin.qq.com/wxa/generate_urllink?access_token="
+
accessToken
;
String
res
=
HttpHelper
.
httpPost
(
url
,
param
.
toString
());
JSONObject
result
=
JSONObject
.
parseObject
(
res
);
if
(
result
.
getString
(
"errcode"
).
equals
(
"0"
))
{
if
(
"0"
.
equals
(
result
.
getString
(
"errcode"
)
))
{
return
result
.
getString
(
"url_link"
);
}
return
res
;
...
...
@@ -350,7 +350,7 @@ public class WxServiceImpl implements WxService {
JSONObject
result
=
JSONObject
.
parseObject
(
res
);
log
.
info
(
"param: id:{},code:{}"
,
id
,
code
);
log
.
info
(
"getUserPhoneNumber: "
+
result
.
toString
());
if
(
result
.
getString
(
"errcode"
).
equals
(
"0"
))
{
if
(
"0"
.
equals
(
result
.
getString
(
"errcode"
)
))
{
String
phone_info
=
result
.
getString
(
"phone_info"
);
JSONObject
phoneInfoObject
=
JSONObject
.
parseObject
(
phone_info
);
return
phoneInfoObject
.
getString
(
"purePhoneNumber"
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/xzsz/impl/XzServiceImpl.java
浏览文件 @
90b762e5
...
...
@@ -134,7 +134,7 @@ public class XzServiceImpl implements XzService {
if
(
jsonObject1
.
get
(
"data"
)
!=
null
)
{
// 添加认证签约结果
JSONObject
signedResult
=
this
.
getSignedResult
(
xzAuthVO
);
if
(
signedResult
.
get
(
"msg"
).
equals
(
"success"
))
{
if
(
"success"
.
equals
(
signedResult
.
get
(
"msg"
)
))
{
// log.info("Signed result: {}", signedResult);
List
<
JSONObject
>
jsonObjects
=
JSONArray
.
parseArray
(
signedResult
.
get
(
"data"
).
toString
(),
JSONObject
.
class
);
// log.info("jsonObjects : {}", com.alibaba.fastjson2.JSONObject.toJSONString(jsonObjects));
...
...
@@ -185,7 +185,7 @@ public class XzServiceImpl implements XzService {
public
String
xzAuthNotify
(
JSONObject
notify
)
{
log
.
info
(
"xzAuthNotify获取到的推送结果:{}"
,
notify
.
toString
());
// 认证成功,修改认证状态
if
(
notify
.
get
(
"code"
).
toString
().
equals
(
"0"
))
{
if
(
"0"
.
equals
(
notify
.
get
(
"code"
).
toString
()
))
{
XzAuthDO
authDO
=
notify
.
get
(
"data"
,
XzAuthDO
.
class
);
Integer
userAccountId
=
(
Integer
)
com
.
alibaba
.
fastjson2
.
JSONObject
.
parseObject
(
authDO
.
getCustomParams
()).
get
(
"userAccountId"
);
if
(
userAccountId
!=
null
)
{
...
...
@@ -301,7 +301,7 @@ public class XzServiceImpl implements XzService {
.
frontLogNo
(
frontLogNo
)
.
build
());
System
.
out
.
println
(
jsonObject
.
toString
());
if
(
jsonObject
.
get
(
"isSuccess"
).
toString
().
equals
(
"T"
))
{
if
(
"T"
.
equals
(
jsonObject
.
get
(
"isSuccess"
).
toString
()
))
{
return
ResultBody
.
success
(
jsonObject
.
get
(
"data"
));
}
else
{
return
ResultBody
.
error
(
jsonObject
.
get
(
"errorMessage"
).
toString
());
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/util/QccEntAuthUtil.java
浏览文件 @
90b762e5
...
...
@@ -108,7 +108,7 @@ public class QccEntAuthUtil {
String
response
=
HttpsRequestUtil
.
httpsRequest
(
url
,
method
,
headers
,
bodys
);
log
.
info
(
"response11111111111111: "
+
response
);
//获取response的body
if
(
response
.
equals
(
"Invalid Result - invalid business license"
)){
if
(
"Invalid Result - invalid business license"
.
equals
(
response
)){
return
null
;
}
return
response
;
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论