Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
cloud-platform
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
youjj
cloud-platform
Commits
700bc693
Commit
700bc693
authored
Jul 16, 2019
by
libin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
钱包
parent
6ce02a22
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
3 deletions
+15
-3
MyWaterBiz.java
...ava/com/github/wxiaoqi/security/admin/biz/MyWaterBiz.java
+8
-1
AppPermissionService.java
...aoqi/security/admin/rpc/service/AppPermissionService.java
+7
-2
No files found.
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/biz/MyWaterBiz.java
View file @
700bc693
...
@@ -9,6 +9,8 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
...
@@ -9,6 +9,8 @@ import com.github.wxiaoqi.security.common.biz.BaseBiz;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.math.BigDecimal
;
import
java.math.BigDecimal
;
import
java.text.ParseException
;
import
java.text.ParseException
;
...
@@ -107,5 +109,10 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
...
@@ -107,5 +109,10 @@ public class MyWaterBiz extends BaseBiz<MyWalletMapper, MyWallet>{
return
isToday
;
return
isToday
;
}
}
@Transactional
(
rollbackFor
=
Exception
.
class
,
propagation
=
Propagation
.
REQUIRED
)
public
int
createWalletByUserId
(
Integer
userId
){
MyWallet
myWallet
=
new
MyWallet
();
myWallet
.
setUserId
(
userId
);
return
mapper
.
insertSelective
(
myWallet
);
}
}
}
\ No newline at end of file
ace-modules/ace-admin/src/main/java/com/github/wxiaoqi/security/admin/rpc/service/AppPermissionService.java
View file @
700bc693
...
@@ -38,12 +38,10 @@ import org.springframework.stereotype.Service;
...
@@ -38,12 +38,10 @@ import org.springframework.stereotype.Service;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.client.RestTemplate
;
import
org.springframework.web.context.request.RequestAttributes
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.RequestContextHolder
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
org.springframework.web.context.request.ServletRequestAttributes
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
javax.servlet.http.HttpServletRequest
;
import
java.util.*
;
import
java.util.*
;
import
java.util.concurrent.TimeUnit
;
import
java.util.concurrent.TimeUnit
;
...
@@ -76,6 +74,9 @@ public class AppPermissionService {
...
@@ -76,6 +74,9 @@ public class AppPermissionService {
@Resource
@Resource
private
RegionFeign
regionFeign
;
private
RegionFeign
regionFeign
;
@Autowired
private
MyWaterBiz
walletBiz
;
private
BCryptPasswordEncoder
encoder
=
new
BCryptPasswordEncoder
(
12
);
private
BCryptPasswordEncoder
encoder
=
new
BCryptPasswordEncoder
(
12
);
@Autowired
@Autowired
private
RedisTemplate
userRedisTemplate
;
private
RedisTemplate
userRedisTemplate
;
...
@@ -264,6 +265,8 @@ public class AppPermissionService {
...
@@ -264,6 +265,8 @@ public class AppPermissionService {
insertUserMemberByUserIdAndPhone
(
userid
,
username
);
insertUserMemberByUserIdAndPhone
(
userid
,
username
);
//自动登录获取优惠卷
//自动登录获取优惠卷
authCoupn
(
userid
);
authCoupn
(
userid
);
//创建钱包
walletBiz
.
createWalletByUserId
(
appUserLogin
.
getId
());
// 登录结果要做做统一处理
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
// 到im注册,获取返回结果
// 到im注册,获取返回结果
...
@@ -794,6 +797,8 @@ public class AppPermissionService {
...
@@ -794,6 +797,8 @@ public class AppPermissionService {
relationBiz
.
bindByUserId
(
userid
,
small_id
);
relationBiz
.
bindByUserId
(
userid
,
small_id
);
//发送短信通知用户
//发送短信通知用户
thirdFeign
.
sendCode
(
username
,
password
,
SystemConfig
.
TEMPLATECODE
);
thirdFeign
.
sendCode
(
username
,
password
,
SystemConfig
.
TEMPLATECODE
);
//创建钱包
walletBiz
.
createWalletByUserId
(
appUserLogin
.
getId
());
// 登录结果要做做统一处理
// 登录结果要做做统一处理
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
JSONObject
data
=
autoLogin
(
userid
,
username
,
headimgurl
,
nickname
);
// 到im注册,获取返回结果
// 到im注册,获取返回结果
...
...
Write
Preview
Markdown
is supported
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