Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
C
cms-ci-test
概览
概览
详情
活动
周期分析
版本库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
test-ci
cms-ci-test
Commits
8cd1268d
提交
8cd1268d
authored
6月 08, 2023
作者:
zhenjie
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
用户注册生成钱包
上级
3edc123e
隐藏空白字符变更
内嵌
并排
正在显示
9 个修改的文件
包含
98 行增加
和
7 行删除
+98
-7
WalletUsersVO.java
...c/main/java/com/mmc/iuav/user/model/vo/WalletUsersVO.java
+25
-0
UserApplication.java
...user/src/main/java/com/mmc/iuav/user/UserApplication.java
+7
-0
PayClient.java
...ser/src/main/java/com/mmc/iuav/user/client/PayClient.java
+34
-0
BackUserAccountController.java
...m/mmc/iuav/user/controller/BackUserAccountController.java
+6
-1
AuthServiceImpl.java
.../java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
+7
-0
application-dev.yml
...e/cms-service-user/src/main/resources/application-dev.yml
+6
-2
application-local.yml
...cms-service-user/src/main/resources/application-local.yml
+6
-2
application-prod.yml
.../cms-service-user/src/main/resources/application-prod.yml
+6
-2
not-check.yml
...service/cms-service-user/src/main/resources/not-check.yml
+1
-0
没有找到文件。
cms-common/cms-common-model/src/main/java/com/mmc/iuav/user/model/vo/WalletUsersVO.java
0 → 100644
浏览文件 @
8cd1268d
package
com
.
mmc
.
iuav
.
user
.
model
.
vo
;
import
io.swagger.annotations.ApiModelProperty
;
import
lombok.AllArgsConstructor
;
import
lombok.Builder
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
/**
* @author: zj
* @Date: 2023/6/8 15:19
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
@Builder
public
class
WalletUsersVO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
7932918047614895003L
;
@ApiModelProperty
(
value
=
"repo_account_id"
)
@NotNull
(
message
=
"账号id"
)
private
Integer
repoAccountId
;
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/UserApplication.java
浏览文件 @
8cd1268d
...
@@ -2,6 +2,8 @@ package com.mmc.iuav.user;
...
@@ -2,6 +2,8 @@ package com.mmc.iuav.user;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.SpringApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.boot.autoconfigure.SpringBootApplication
;
import
org.springframework.context.annotation.Bean
;
import
org.springframework.web.client.RestTemplate
;
/**
/**
* @author:zhenjie
* @author:zhenjie
...
@@ -12,4 +14,9 @@ public class UserApplication {
...
@@ -12,4 +14,9 @@ public class UserApplication {
public
static
void
main
(
String
[]
args
)
{
public
static
void
main
(
String
[]
args
)
{
SpringApplication
.
run
(
UserApplication
.
class
,
args
);
SpringApplication
.
run
(
UserApplication
.
class
,
args
);
}
}
@Bean
public
RestTemplate
restTemplate
(){
return
new
RestTemplate
();
}
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/client/PayClient.java
0 → 100644
浏览文件 @
8cd1268d
package
com
.
mmc
.
iuav
.
user
.
client
;
import
com.alibaba.fastjson2.JSONObject
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.model.vo.WalletUsersVO
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
import
org.springframework.http.*
;
import
org.springframework.stereotype.Component
;
import
org.springframework.web.client.RestTemplate
;
/**
* @author: zj
* @Date: 2023/6/8 15:16
*/
@Component
public
class
PayClient
{
@Value
(
"${iuav.pay.uri}"
)
private
String
payAppUri
;
@Autowired
private
RestTemplate
restTemplate
;
public
ResultBody
createWallet
(
Integer
userAccountId
){
WalletUsersVO
walletUsersVO
=
new
WalletUsersVO
();
walletUsersVO
.
setRepoAccountId
(
userAccountId
);
HttpHeaders
headers
=
new
HttpHeaders
();
headers
.
setContentType
(
MediaType
.
APPLICATION_JSON
);
HttpEntity
<
String
>
entity
=
new
HttpEntity
<>(
JSONObject
.
toJSONString
(
walletUsersVO
),
headers
);
ResponseEntity
<
ResultBody
>
responseEntity
=
restTemplate
.
exchange
(
payAppUri
+
"/payment/repocash/walletUsers"
,
HttpMethod
.
POST
,
entity
,
ResultBody
.
class
);
return
responseEntity
.
getBody
();
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/controller/BackUserAccountController.java
浏览文件 @
8cd1268d
...
@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Create;
...
@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Create;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.group.Update
;
import
com.mmc.iuav.group.UpdatePassword
;
import
com.mmc.iuav.group.UpdatePassword
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.user.client.PayClient
;
import
com.mmc.iuav.user.model.dto.BaseAccountDTO
;
import
com.mmc.iuav.user.model.dto.BaseAccountDTO
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.LoginSuccessDTO
;
import
com.mmc.iuav.user.model.dto.UserAccountSimpleDTO
;
import
com.mmc.iuav.user.model.dto.UserAccountSimpleDTO
;
...
@@ -15,6 +16,7 @@ import io.swagger.annotations.*;
...
@@ -15,6 +16,7 @@ import io.swagger.annotations.*;
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
org.springframework.web.client.RestTemplate
;
import
springfox.documentation.annotations.ApiIgnore
;
import
springfox.documentation.annotations.ApiIgnore
;
import
javax.servlet.http.HttpServletRequest
;
import
javax.servlet.http.HttpServletRequest
;
...
@@ -86,10 +88,13 @@ public class BackUserAccountController extends BaseController{
...
@@ -86,10 +88,13 @@ public class BackUserAccountController extends BaseController{
return
userAccountService
.
feignAuthUserPwd
(
id
,
authPwd
);
return
userAccountService
.
feignAuthUserPwd
(
id
,
authPwd
);
}
}
@Autowired
private
PayClient
payClient
;
@ApiOperation
(
value
=
"test"
)
@ApiOperation
(
value
=
"test"
)
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@ApiResponses
({
@ApiResponse
(
code
=
200
,
message
=
"OK"
,
response
=
ResultBody
.
class
)})
@PostMapping
(
"listTest"
)
@PostMapping
(
"listTest"
)
public
ResultBody
listTest
(
HttpServletRequest
request
)
{
public
ResultBody
listTest
(
HttpServletRequest
request
)
{
return
ResultBody
.
success
();
return
ResultBody
.
success
(
payClient
.
createWallet
(
999
)
);
}
}
}
}
csm-service/cms-service-user/src/main/java/com/mmc/iuav/user/service/impl/AuthServiceImpl.java
浏览文件 @
8cd1268d
...
@@ -9,6 +9,7 @@ import com.mmc.iuav.http.BizException;
...
@@ -9,6 +9,7 @@ import com.mmc.iuav.http.BizException;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultBody
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.response.ResultEnum
;
import
com.mmc.iuav.user.auth.PwdUtil
;
import
com.mmc.iuav.user.auth.PwdUtil
;
import
com.mmc.iuav.user.client.PayClient
;
import
com.mmc.iuav.user.constant.WxConstant
;
import
com.mmc.iuav.user.constant.WxConstant
;
import
com.mmc.iuav.user.dao.CompanyAuthDao
;
import
com.mmc.iuav.user.dao.CompanyAuthDao
;
import
com.mmc.iuav.user.entity.CompanyAuthDO
;
import
com.mmc.iuav.user.entity.CompanyAuthDO
;
...
@@ -27,6 +28,7 @@ import org.apache.commons.lang.StringUtils;
...
@@ -27,6 +28,7 @@ import org.apache.commons.lang.StringUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.security.NoSuchAlgorithmException
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.HashMap
;
import
java.util.HashMap
;
...
@@ -53,6 +55,10 @@ public class AuthServiceImpl implements AuthService {
...
@@ -53,6 +55,10 @@ public class AuthServiceImpl implements AuthService {
@Autowired
@Autowired
private
CompanyAuthDao
companyAuthDao
;
private
CompanyAuthDao
companyAuthDao
;
@Autowired
private
PayClient
payClient
;
@Transactional
@Override
@Override
public
ResultBody
appletLogin
(
WxLoginVO
wxLoginVO
)
{
public
ResultBody
appletLogin
(
WxLoginVO
wxLoginVO
)
{
String
unionId
;
String
unionId
;
...
@@ -106,6 +112,7 @@ public class AuthServiceImpl implements AuthService {
...
@@ -106,6 +112,7 @@ public class AuthServiceImpl implements AuthService {
userAccountDO
.
setSource
(
wxLoginVO
.
getSource
());
userAccountDO
.
setSource
(
wxLoginVO
.
getSource
());
userAccountService
.
insertUserAccount
(
userAccountDO
);
userAccountService
.
insertUserAccount
(
userAccountDO
);
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
userAccountVO
=
userAccountDO
.
buildUserAccountVO
();
payClient
.
createWallet
(
userAccountDO
.
getId
());
}
else
{
}
else
{
uid
=
userAccountVO
.
getUid
();
uid
=
userAccountVO
.
getUid
();
CompanyAuthDO
companyAuthDO
=
companyAuthDao
.
getCompanyAuth
(
userAccountVO
.
getId
());
CompanyAuthDO
companyAuthDO
=
companyAuthDao
.
getCompanyAuth
(
userAccountVO
.
getId
());
...
...
csm-service/cms-service-user/src/main/resources/application-dev.yml
浏览文件 @
8cd1268d
...
@@ -59,4 +59,8 @@ third-party:
...
@@ -59,4 +59,8 @@ third-party:
app-code
:
524b1864a88f47458c1061bae3811570
app-code
:
524b1864a88f47458c1061bae3811570
qcc
:
qcc
:
app-key
:
5015e664848d406ab1ca4b505c3da803
app-key
:
5015e664848d406ab1ca4b505c3da803
secret-key
:
7C4DB8CCECC148175E46392CC0A1B410
secret-key
:
7C4DB8CCECC148175E46392CC0A1B410
\ No newline at end of file
iuav
:
pay
:
uri
:
http://payment-svc:8088
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/application-local.yml
浏览文件 @
8cd1268d
...
@@ -31,4 +31,8 @@ third-party:
...
@@ -31,4 +31,8 @@ third-party:
app-code
:
524b1864a88f47458c1061bae3811570
app-code
:
524b1864a88f47458c1061bae3811570
qcc
:
qcc
:
app-key
:
5015e664848d406ab1ca4b505c3da803
app-key
:
5015e664848d406ab1ca4b505c3da803
secret-key
:
7C4DB8CCECC148175E46392CC0A1B410
secret-key
:
7C4DB8CCECC148175E46392CC0A1B410
\ No newline at end of file
iuav
:
pay
:
uri
:
http://127.0.0.1:8088
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/application-prod.yml
浏览文件 @
8cd1268d
...
@@ -59,4 +59,8 @@ third-party:
...
@@ -59,4 +59,8 @@ third-party:
app-code
:
524b1864a88f47458c1061bae3811570
app-code
:
524b1864a88f47458c1061bae3811570
qcc
:
qcc
:
app-key
:
5015e664848d406ab1ca4b505c3da803
app-key
:
5015e664848d406ab1ca4b505c3da803
secret-key
:
7C4DB8CCECC148175E46392CC0A1B410
secret-key
:
7C4DB8CCECC148175E46392CC0A1B410
\ No newline at end of file
iuav
:
pay
:
uri
:
http://payment-svc:8088
\ No newline at end of file
csm-service/cms-service-user/src/main/resources/not-check.yml
浏览文件 @
8cd1268d
...
@@ -16,3 +16,4 @@ data-filter:
...
@@ -16,3 +16,4 @@ data-filter:
-
/userapp/wx/getAppletQRCode
-
/userapp/wx/getAppletQRCode
-
/userapp/wx/wxSendMessage
-
/userapp/wx/wxSendMessage
-
/userapp/user-account/feignListUserAccountIds
-
/userapp/user-account/feignListUserAccountIds
-
/userapp/back-user/listTest
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论