Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
head_group
xyqb-user2
Commits
8a788eb9
Commit
8a788eb9
authored
Nov 02, 2021
by
李健华
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'KA-24' into 'master'
修改获取微信信息方法 See merge request
!10
parents
cecbe143
200499d8
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
22 additions
and
2 deletions
+22
-2
change-log.md
change-log.md
+8
-0
IWeChatUserRepository.java
.../cn/quantgroup/xyqb/repository/IWeChatUserRepository.java
+2
-0
WechatServiceImpl.java
...uantgroup/xyqb/service/wechat/impl/WechatServiceImpl.java
+12
-2
No files found.
change-log.md
View file @
8a788eb9
##KA-24/2021-10-14
###修改获取微信信息方法
```
package
cn
.
quantgroup
.
xyqb
.
service
.
wechat
.
impl
.
WechatServiceImpl
;
function
queryByUserId
2021
-
10
-
14
修改
findByUserIdAndAppName
为
findFirstByUserIdAndAppNameOrderByCreatedAtDesc
,
原因是存在有多个数据情况
```
##KA-20/2021-09-29
##KA-20/2021-09-29
###极光登陆返回用户是否已注册
###极光登陆返回用户是否已注册
```
```
...
...
src/main/java/cn/quantgroup/xyqb/repository/IWeChatUserRepository.java
View file @
8a788eb9
...
@@ -21,6 +21,8 @@ public interface IWeChatUserRepository extends JpaRepository<WechatUserInfo, Lon
...
@@ -21,6 +21,8 @@ public interface IWeChatUserRepository extends JpaRepository<WechatUserInfo, Lon
WechatUserInfo
findByUserIdAndAppName
(
Long
userId
,
String
appName
);
WechatUserInfo
findByUserIdAndAppName
(
Long
userId
,
String
appName
);
WechatUserInfo
findFirstByUserIdAndAppNameOrderByCreatedAtDesc
(
Long
userId
,
String
appName
);
long
countByOpenIdAndAppName
(
String
openId
,
String
appName
);
long
countByOpenIdAndAppName
(
String
openId
,
String
appName
);
/**
/**
...
...
src/main/java/cn/quantgroup/xyqb/service/wechat/impl/WechatServiceImpl.java
View file @
8a788eb9
...
@@ -221,16 +221,26 @@ public class WechatServiceImpl implements IWechatService {
...
@@ -221,16 +221,26 @@ public class WechatServiceImpl implements IWechatService {
*
*
* @param userId - 用户标识
* @param userId - 用户标识
* @return
* @return
* @TODO 2021-10-14 修改 findByUserIdAndAppName 为 findFirstByUserIdAndAppNameOrderByCreatedAtDesc, 原因是存在有多个数据情况
*
*/
*/
@Override
@Override
public
WechatUserInfo
queryByUserId
(
Long
userId
)
{
public
WechatUserInfo
queryByUserId
(
Long
userId
)
{
return
weChatUserRepository
.
find
ByUserIdAndAppName
(
userId
,
"xyqb"
);
return
weChatUserRepository
.
find
FirstByUserIdAndAppNameOrderByCreatedAtDesc
(
userId
,
"xyqb"
);
}
}
/**
*
* @param userId
* @param appName
* @return
* @TODO 2021-10-14 修改 findByUserIdAndAppName 为 findFirstByUserIdAndAppNameOrderByCreatedAtDesc, 原因是存在有多个数据情况
*/
public
WechatUserInfo
queryByUserId
(
Long
userId
,
String
appName
){
public
WechatUserInfo
queryByUserId
(
Long
userId
,
String
appName
){
if
(
appName
==
null
||
""
.
equals
(
appName
.
trim
())){
if
(
appName
==
null
||
""
.
equals
(
appName
.
trim
())){
appName
=
"xyqb"
;
appName
=
"xyqb"
;
}
}
return
weChatUserRepository
.
find
ByUserIdAndAppName
(
userId
,
appName
);
return
weChatUserRepository
.
find
FirstByUserIdAndAppNameOrderByCreatedAtDesc
(
userId
,
appName
);
}
}
...
...
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