Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
4b268243
提交
4b268243
authored
6月 05, 2023
作者:
xiaowang
浏览文件
操作
浏览文件
下载
差异文件
Merge remote-tracking branch 'origin/master'
上级
fd1131c7
1fb14169
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
73 行增加
和
26 行删除
+73
-26
TokenCheckHandleInterceptor.java
...a/com/mmc/iuav/user/auth/TokenCheckHandleInterceptor.java
+34
-12
CompanyAuthServiceImpl.java
...om/mmc/iuav/user/service/impl/CompanyAuthServiceImpl.java
+2
-2
UserAccountServiceImpl.java
...om/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
+3
-0
application-prod.yml
.../cms-service-user/src/main/resources/application-prod.yml
+1
-1
CompanyAuthDao.xml
...service-user/src/main/resources/mapper/CompanyAuthDao.xml
+2
-1
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+1
-0
deployment.yaml
kustomization/base/deployment.yaml
+3
-1
increase_replicas.yaml
kustomization/overlays/dev/increase_replicas.yaml
+12
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+8
-7
increase_replicas.yaml
kustomization/overlays/prod/increase_replicas.yaml
+6
-1
kustomization.yaml
kustomization/overlays/prod/kustomization.yaml
+1
-1
没有找到文件。
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/auth/TokenCheckHandleInterceptor.java
浏览文件 @
4b268243
package
com
.
mmc
.
iuav
.
user
.
auth
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.util.PathUtil
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
...
...
@@ -18,6 +20,7 @@ import java.io.PrintWriter;
* @author: zj
* @Date: 2023/5/28 10:46
*/
@Slf4j
@Component
public
class
TokenCheckHandleInterceptor
implements
HandlerInterceptor
{
...
...
@@ -34,19 +37,38 @@ public class TokenCheckHandleInterceptor implements HandlerInterceptor {
if
(!
shouldFilter
(
requestURI
)){
return
true
;
}
if
(
request
.
getServerName
().
equals
(
"iuav.mmcuav.cn"
)
||
request
.
getServerName
().
equals
(
"test.iuav.mmcuav.cn"
)){
String
token
=
request
.
getHeader
(
"token"
);
if
(
StringUtils
.
isBlank
(
token
)){
exceptionProcess
(
response
);
return
false
;
}
String
tokenJson
=
stringRedisTemplate
.
opsForValue
().
get
(
token
);
if
(
StringUtils
.
isBlank
(
tokenJson
)){
exceptionProcess
(
response
);
return
false
;
}
return
true
;
String
token
=
request
.
getHeader
(
"token"
);
if
(
StringUtils
.
isBlank
(
token
)){
exceptionProcess
(
response
);
return
false
;
}
String
tokenJson
=
stringRedisTemplate
.
opsForValue
().
get
(
token
);
if
(
StringUtils
.
isBlank
(
tokenJson
)){
exceptionProcess
(
response
);
return
false
;
}
//
// String serverName = request.getServerName();
// String remoteHost = request.getRemoteHost();
// log.info("hostName: {}", hostName);
// log.info("serverName: {}", serverName);
// log.info("remoteHost: {}", remoteHost);
// log.info("forwardedFor: {}", forwardedFor);
// log.info("forwardedHost: {}", forwardedHost);
// if (hostName.equals("iuav.mmcuav.cn") || hostName.equals("test.iuav.mmcuav.cn") || hostName.equals("www.iuav.shop") || hostName.equals("test.iuav.shop")){
// String token = request.getHeader("token");
// if (StringUtils.isBlank(token)){
// exceptionProcess(response);
// return false;
// }
// String tokenJson = stringRedisTemplate.opsForValue().get(token);
// if (StringUtils.isBlank(tokenJson)){
// exceptionProcess(response);
// return false;
// }
// return true;
// }
//测试-打印请求信息
return
true
;
}
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/CompanyAuthServiceImpl.java
浏览文件 @
4b268243
...
...
@@ -11,6 +11,7 @@ import com.mmc.iuav.user.util.QccEntAuthUtil;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
/**
* @author: zj
...
...
@@ -27,6 +28,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
private
CompanyAuthDao
companyAuthDao
;
@Override
@Transactional
public
ResultBody
add
(
CompanyAuthVO
companyAuthVO
)
{
log
.
info
(
"用户:"
+
companyAuthVO
.
getUserAccountId
()+
" 企业认证:{}"
,
JSONObject
.
toJSONString
(
companyAuthVO
));
CompanyAuthDO
companyAuthDO
=
companyAuthDao
.
getCompanyAuth
(
companyAuthVO
.
getUserAccountId
());
...
...
@@ -34,9 +36,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
return
ResultBody
.
success
(
"已通过"
);
}
ResultBody
companyCheckRes
=
this
.
companyCheck
(
companyAuthVO
);
System
.
out
.
println
(
companyCheckRes
);
if
(!
companyCheckRes
.
getCode
().
equals
(
"200"
)){
return
companyCheckRes
;
}
companyAuthDO
=
new
CompanyAuthDO
(
companyAuthVO
);
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/UserAccountServiceImpl.java
浏览文件 @
4b268243
...
...
@@ -88,6 +88,9 @@ public class UserAccountServiceImpl implements UserAccountService {
@Override
public
UserAccountSimpleDTO
getUserSimpleInfo
(
Integer
userAccountId
)
{
UserAccountDO
userAccountDO
=
userServiceDao
.
getUserAccountById
(
userAccountId
);
if
(
userAccountDO
==
null
){
return
null
;
}
UserAccountSimpleDTO
userAccountSimpleDTO
=
userAccountDO
.
buildUserAccountSimpleDTO
();
CompanyAuthVO
companyAuthVO
=
companyAuthService
.
getCompanyAuthByUId
(
userAccountId
);
if
(
companyAuthVO
!=
null
)
{
...
...
csm-service/cms-service-user/src/main/resources/application-prod.yml
浏览文件 @
4b268243
...
...
@@ -50,7 +50,7 @@ wx:
id
:
wx18b7883acd204278
secret
:
28afe74ba373830237a8133a7431ee82
miniprogram-state
:
formal
env-version
:
formal
env-version
:
release
token-path
:
/userservlet/wechat/getAppletUserAccessToken
port
:
user
...
...
csm-service/cms-service-user/src/main/resources/mapper/CompanyAuthDao.xml
浏览文件 @
4b268243
...
...
@@ -26,6 +26,6 @@
<select
id=
"getCompanyAuth"
resultType=
"com.mmc.iuav.user.entity.CompanyAuthDO"
>
select id,user_account_id,company_name,credit_code,license_img,auth_status
from company_auth where user_account_id = #{userAccountId}
from company_auth where user_account_id = #{userAccountId}
and is_deleted = 0
</select>
</mapper>
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
4b268243
...
...
@@ -14,3 +14,4 @@ data-filter:
-
/userapp/temp-auth/getLoginInfo
-
/userapp/wx/getAppletQRCode
-
/userapp/wx/wxSendMessage
-
/userapp/user-account/feignListUserAccountIds
kustomization/base/deployment.yaml
浏览文件 @
4b268243
...
...
@@ -4,6 +4,8 @@ metadata:
name
:
cms-deployment
namespace
:
default
spec
:
minReadySeconds
:
240
revisionHistoryLimit
:
2
replicas
:
1
selector
:
matchLabels
:
...
...
@@ -18,7 +20,7 @@ spec:
image
:
REGISTRY/NAMESPACE/IMAGE:TAG
resources
:
limits
:
memory
:
4096
Mi
memory
:
1024
Mi
cpu
:
100m
ports
:
-
containerPort
:
35150
...
...
kustomization/overlays/dev/increase_replicas.yaml
0 → 100644
浏览文件 @
4b268243
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
cms-deployment
spec
:
replicas
:
2
strategy
:
type
:
RollingUpdate
rollingUpdate
:
maxSurge
:
1
maxUnavailable
:
1
\ No newline at end of file
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
4b268243
apiVersion
:
kustomize.config.k8s.io/v1beta1
kind
:
Kustomization
resources
:
-
../../base
-
../../base
#namePrefix: dev-
namespace
:
dev
commonLabels
:
...
...
@@ -9,12 +9,13 @@ commonLabels:
commonAnnotations
:
note
:
This is dev!
patches
:
-
path
:
./configMap.yaml
-
path
:
./service-patch.yaml
target
:
kind
:
Service
name
:
cms-svc
-
path
:
./increase_replicas.yaml
-
path
:
./configMap.yaml
-
path
:
./service-patch.yaml
target
:
kind
:
Service
name
:
cms-svc
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag
:
654ef1259bcb25094f1e2e61a32369080022dbd0
newTag
:
b90d96ef7a2c68fe49e89e0462cba4d37baf7716
kustomization/overlays/prod/increase_replicas.yaml
浏览文件 @
4b268243
...
...
@@ -3,7 +3,12 @@ kind: Deployment
metadata
:
name
:
cms-deployment
spec
:
replicas
:
1
replicas
:
2
strategy
:
type
:
RollingUpdate
rollingUpdate
:
maxSurge
:
1
maxUnavailable
:
1
# template:
# spec:
# nodeName: master
...
...
kustomization/overlays/prod/kustomization.yaml
浏览文件 @
4b268243
...
...
@@ -18,4 +18,4 @@ patches:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly/cms
newTag
:
f3feaca2b4ecd07343122ef2a7b3bfd8e40a9b19
newTag
:
a66259b9b10f0a79a0dbee5a83e733d47cb89011
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论