Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
iuav
cms
Commits
979208a8
提交
979208a8
authored
5月 20, 2023
作者:
余乾开
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'develop'
上级
6cd2fae0
4a2659c1
显示空白字符变更
内嵌
并排
正在显示
12 个修改的文件
包含
40 行增加
和
10 行删除
+40
-10
AppUserSucVO.java
...rc/main/java/com/mmc/iuav/user/model/vo/AppUserSucVO.java
+8
-0
UserAccountVO.java
...c/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
+0
-1
WxLoginVO.java
...l/src/main/java/com/mmc/iuav/user/model/vo/WxLoginVO.java
+0
-1
UserAccountController.java
...a/com/mmc/iuav/user/controller/UserAccountController.java
+4
-4
WxService.java
...er/src/main/java/com/mmc/iuav/user/service/WxService.java
+6
-0
AuthServiceImpl.java
.../java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
+5
-1
WxServiceImpl.java
...in/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
+6
-0
application-prod.yml
.../cms-service-user/src/main/resources/application-prod.yml
+0
-0
kustomization.yaml
kustomization/overlays/dev/kustomization.yaml
+1
-1
configMap.yaml
kustomization/overlays/prod/configMap.yaml
+2
-2
increase_replicas.yaml
kustomization/overlays/prod/increase_replicas.yaml
+7
-0
kustomization.yaml
kustomization/overlays/prod/kustomization.yaml
+1
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/AppUserSucVO.java
浏览文件 @
979208a8
...
@@ -22,4 +22,12 @@ public class AppUserSucVO implements Serializable {
...
@@ -22,4 +22,12 @@ public class AppUserSucVO implements Serializable {
private
Integer
userAccountId
;
private
Integer
userAccountId
;
@ApiModelProperty
(
value
=
"token"
)
@ApiModelProperty
(
value
=
"token"
)
private
String
token
;
private
String
token
;
@ApiModelProperty
(
value
=
"UID"
)
private
String
uid
;
@ApiModelProperty
(
value
=
"手机号"
)
private
String
phoneNum
;
@ApiModelProperty
(
value
=
"昵称"
)
private
String
nickName
;
@ApiModelProperty
(
value
=
"sessionKey"
)
private
String
sessionKey
;
}
}
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/UserAccountVO.java
浏览文件 @
979208a8
...
@@ -21,7 +21,6 @@ import java.util.Date;
...
@@ -21,7 +21,6 @@ import java.util.Date;
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@Builder
@Builder
@ApiModel
(
value
=
"com.mmc.iuav.user.model.vo.UserAccountVO"
,
description
=
"用户信息"
)
public
class
UserAccountVO
implements
Serializable
{
public
class
UserAccountVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7067111726018678883L
;
private
static
final
long
serialVersionUID
=
7067111726018678883L
;
@ApiModelProperty
(
value
=
"用户id"
)
@ApiModelProperty
(
value
=
"用户id"
)
...
...
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/WxLoginVO.java
浏览文件 @
979208a8
...
@@ -18,7 +18,6 @@ import java.io.Serializable;
...
@@ -18,7 +18,6 @@ import java.io.Serializable;
@Data
@Data
@AllArgsConstructor
@AllArgsConstructor
@NoArgsConstructor
@NoArgsConstructor
@ApiModel
(
value
=
"com.mmc.iuav.user.model.vo.WxLoginVO"
,
description
=
"登录参数"
)
public
class
WxLoginVO
implements
Serializable
{
public
class
WxLoginVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
2500957724470423989L
;
private
static
final
long
serialVersionUID
=
2500957724470423989L
;
@ApiModelProperty
(
value
=
"请求code"
)
@ApiModelProperty
(
value
=
"请求code"
)
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/UserAccountController.java
浏览文件 @
979208a8
...
@@ -33,8 +33,8 @@ public class UserAccountController {
...
@@ -33,8 +33,8 @@ public class UserAccountController {
@ApiOperation
(
value
=
"获取用户信息"
)
@ApiOperation
(
value
=
"获取用户信息"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountVO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountVO
.
class
)
})
@GetMapping
(
"info"
)
@GetMapping
(
"info"
)
public
UserAccountVO
info
(
@RequestParam
Integer
userAccountId
){
public
ResultBody
info
(
@RequestParam
Integer
userAccountId
){
return
userAccountService
.
getUserAccountById
(
userAccountId
);
return
ResultBody
.
success
(
userAccountService
.
getUserAccountById
(
userAccountId
)
);
}
}
@ApiOperation
(
value
=
"修改用户信息"
)
@ApiOperation
(
value
=
"修改用户信息"
)
...
@@ -44,14 +44,14 @@ public class UserAccountController {
...
@@ -44,14 +44,14 @@ public class UserAccountController {
return
userAccountService
.
update
(
userAccountVO
);
return
userAccountService
.
update
(
userAccountVO
);
}
}
@ApiOperation
(
value
=
"获取用户基本信息"
)
@ApiOperation
(
value
=
"获取用户基本信息"
,
hidden
=
true
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountSimpleDTO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountSimpleDTO
.
class
)
})
@GetMapping
(
"feignGetUserSimpleInfo"
)
@GetMapping
(
"feignGetUserSimpleInfo"
)
public
UserAccountSimpleDTO
feignGetUserSimpleInfo
(
@RequestParam
Integer
userAccountId
){
public
UserAccountSimpleDTO
feignGetUserSimpleInfo
(
@RequestParam
Integer
userAccountId
){
return
userAccountService
.
getUserSimpleInfo
(
userAccountId
);
return
userAccountService
.
getUserSimpleInfo
(
userAccountId
);
}
}
@ApiOperation
(
value
=
"根据用户地区查询后台用户id"
)
@ApiOperation
(
value
=
"根据用户地区查询后台用户id"
,
hidden
=
true
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountSimpleDTO
.
class
)
})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
UserAccountSimpleDTO
.
class
)
})
@GetMapping
(
"feignListUserAccountIds"
)
@GetMapping
(
"feignListUserAccountIds"
)
public
List
<
Integer
>
feignListUserAccountIds
(
@RequestParam
Integer
provinceCode
,
@RequestParam
(
required
=
false
)
Integer
cityCode
,
@RequestParam
(
required
=
false
)
Integer
districtCode
){
public
List
<
Integer
>
feignListUserAccountIds
(
@RequestParam
Integer
provinceCode
,
@RequestParam
(
required
=
false
)
Integer
cityCode
,
@RequestParam
(
required
=
false
)
Integer
districtCode
){
...
...
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/WxService.java
浏览文件 @
979208a8
...
@@ -20,4 +20,10 @@ public interface WxService {
...
@@ -20,4 +20,10 @@ public interface WxService {
* @return
* @return
*/
*/
String
pcLogin
(
WxLoginVO
wxLoginVO
);
String
pcLogin
(
WxLoginVO
wxLoginVO
);
/**
* 获取AccessToken
* @return
*/
String
getAccessToken
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
浏览文件 @
979208a8
...
@@ -40,6 +40,7 @@ public class AuthServiceImpl implements AuthService {
...
@@ -40,6 +40,7 @@ public class AuthServiceImpl implements AuthService {
public
ResultBody
appletLogin
(
WxLoginVO
wxLoginVO
)
{
public
ResultBody
appletLogin
(
WxLoginVO
wxLoginVO
)
{
String
unionId
;
String
unionId
;
String
openId
;
String
openId
;
String
sessionKey
;
if
(
wxLoginVO
.
getFromPort
().
toString
().
equals
(
WxConstant
.
APP
.
toString
()))
{
if
(
wxLoginVO
.
getFromPort
().
toString
().
equals
(
WxConstant
.
APP
.
toString
()))
{
//调用小程序登录接口,里面包含unionId
//调用小程序登录接口,里面包含unionId
String
appWxJson
=
wxService
.
appLogin
(
wxLoginVO
);
String
appWxJson
=
wxService
.
appLogin
(
wxLoginVO
);
...
@@ -54,6 +55,7 @@ public class AuthServiceImpl implements AuthService {
...
@@ -54,6 +55,7 @@ public class AuthServiceImpl implements AuthService {
}
}
unionId
=
json
.
getString
(
WxConstant
.
UNION_ID
);
unionId
=
json
.
getString
(
WxConstant
.
UNION_ID
);
openId
=
json
.
getString
(
WxConstant
.
OPEN_ID
);
openId
=
json
.
getString
(
WxConstant
.
OPEN_ID
);
sessionKey
=
json
.
getString
(
WxConstant
.
SESSION_KEY
);
}
else
if
(
wxLoginVO
.
getFromPort
().
equals
(
WxConstant
.
WEB
)){
}
else
if
(
wxLoginVO
.
getFromPort
().
equals
(
WxConstant
.
WEB
)){
//获取access_token接口,里面包含unionId
//获取access_token接口,里面包含unionId
String
pcWxJson
=
wxService
.
pcLogin
(
wxLoginVO
);
String
pcWxJson
=
wxService
.
pcLogin
(
wxLoginVO
);
...
@@ -68,6 +70,7 @@ public class AuthServiceImpl implements AuthService {
...
@@ -68,6 +70,7 @@ public class AuthServiceImpl implements AuthService {
}
}
unionId
=
json
.
getString
(
WxConstant
.
UNION_ID
);
unionId
=
json
.
getString
(
WxConstant
.
UNION_ID
);
openId
=
json
.
getString
(
WxConstant
.
OPEN_ID
);
openId
=
json
.
getString
(
WxConstant
.
OPEN_ID
);
sessionKey
=
json
.
getString
(
WxConstant
.
SESSION_KEY
);
}
else
{
}
else
{
return
ResultBody
.
error
(
ResultEnum
.
PARAM_ERROR
);
return
ResultBody
.
error
(
ResultEnum
.
PARAM_ERROR
);
}
}
...
@@ -90,6 +93,7 @@ public class AuthServiceImpl implements AuthService {
...
@@ -90,6 +93,7 @@ public class AuthServiceImpl implements AuthService {
map
.
put
(
JwtConstant
.
TOKEN_TYPE
,
JwtConstant
.
IUAV_TOKEN
);
map
.
put
(
JwtConstant
.
TOKEN_TYPE
,
JwtConstant
.
IUAV_TOKEN
);
String
token
=
JwtUtil
.
createJwt
(
map
);
String
token
=
JwtUtil
.
createJwt
(
map
);
return
ResultBody
.
success
(
AppUserSucVO
.
builder
().
token
(
token
).
userAccountId
(
userAccountVO
.
getId
()).
build
());
return
ResultBody
.
success
(
AppUserSucVO
.
builder
().
token
(
token
).
uid
(
userAccountVO
.
getUid
()).
phoneNum
(
userAccountVO
.
getPhoneNum
())
.
nickName
(
userAccountVO
.
getNickName
()).
userAccountId
(
userAccountVO
.
getId
()).
sessionKey
(
sessionKey
).
build
());
}
}
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/WxServiceImpl.java
浏览文件 @
979208a8
...
@@ -32,4 +32,10 @@ public class WxServiceImpl implements WxService {
...
@@ -32,4 +32,10 @@ public class WxServiceImpl implements WxService {
String
data
=
HttpsRequestUtil
.
httpsGet
(
url
,
null
);
String
data
=
HttpsRequestUtil
.
httpsGet
(
url
,
null
);
return
data
;
return
data
;
}
}
@Override
public
String
getAccessToken
()
{
//token有效期为7200s,需要保存起来
return
null
;
}
}
}
csm-service/cms-service-user/src/main/resources/application-
test
.yml
→
csm-service/cms-service-user/src/main/resources/application-
prod
.yml
浏览文件 @
979208a8
File moved
kustomization/overlays/dev/kustomization.yaml
浏览文件 @
979208a8
...
@@ -17,4 +17,4 @@ patches:
...
@@ -17,4 +17,4 @@ patches:
images
:
images
:
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
-
name
:
REGISTRY/NAMESPACE/IMAGE:TAG
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newName
:
mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag
:
85d0adbe8cda52581b8cbb2fb430a91820dff33a
newTag
:
cf8d6b7a592365bc3d490a400515248b17aead02
kustomization/overlays/prod/configMap.yaml
浏览文件 @
979208a8
...
@@ -3,4 +3,4 @@ kind: ConfigMap
...
@@ -3,4 +3,4 @@ kind: ConfigMap
metadata
:
metadata
:
name
:
cms-map
name
:
cms-map
data
:
data
:
SPRING_PROFILES_ACTIVE
:
dev
SPRING_PROFILES_ACTIVE
:
prod
\ No newline at end of file
\ No newline at end of file
kustomization/overlays/prod/increase_replicas.yaml
0 → 100644
浏览文件 @
979208a8
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
cms-deployment
spec
:
replicas
:
2
\ No newline at end of file
kustomization/overlays/prod/kustomization.yaml
浏览文件 @
979208a8
...
@@ -9,6 +9,7 @@ commonLabels:
...
@@ -9,6 +9,7 @@ commonLabels:
commonAnnotations
:
commonAnnotations
:
note
:
This is prod!
note
:
This is prod!
patches
:
patches
:
-
path
:
increase_replicas.yaml
-
path
:
configMap.yaml
-
path
:
configMap.yaml
-
path
:
service-patch.yaml
-
path
:
service-patch.yaml
target
:
target
:
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论