Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
data-server
Project
Project
Details
Activity
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
licc
data-server
Commits
05dc73bc
Commit
05dc73bc
authored
4 years ago
by
codezwjava
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
用户升级条件变更
parent
3896dacb
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
271 additions
and
205 deletions
+271
-205
UsersMapper.java
...mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
+14
-0
UsersMapper.xml
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
+18
-1
UserLevelServiceImpl.java
...a/cn/wisenergy/service/app/impl/UserLevelServiceImpl.java
+239
-204
No files found.
wisenergy-mapper/src/main/java/cn/wisenergy/mapper/UsersMapper.java
View file @
05dc73bc
...
...
@@ -200,4 +200,18 @@ public interface UsersMapper extends BaseMapper<User> {
* @return
*/
User
randOneGetUserByUserId
(
Integer
id
);
/**
* 根据邀请码获取所有的下级用户
* @param userId
* @return
*/
List
<
User
>
getListByIntvitedCode
(
String
userId
);
/**
* 根据当前用户的推荐人邀请码获取推荐人的用户信息(上级用户信息)
* @param beInvitedCode
* @return
*/
User
getuserByBeInvitedCode
(
String
beInvitedCode
);
}
This diff is collapsed.
Click to expand it.
wisenergy-mapper/src/main/resources/mapper/UsersMapper.xml
View file @
05dc73bc
...
...
@@ -178,7 +178,7 @@
from
<include
refid=
"table"
/>
<where>
invite_code
=
#{beInvitedCode}
invite_code
=
#{beInvitedCode}
</where>
</select>
...
...
@@ -394,4 +394,21 @@
ORDER BY RAND() LIMIT 1
</select>
<select
id=
"getListByIntvitedCode"
resultType=
"cn.wisenergy.model.app.User"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
where be_invited_code = #{intiveCode}
</select>
<select
id=
"getuserByBeInvitedCode"
resultType=
"cn.wisenergy.model.app.User"
>
select
<include
refid=
"cols_all"
/>
from
<include
refid=
"table"
/>
where
invite_code = #{be_invited_code}
</select>
</mapper>
This diff is collapsed.
Click to expand it.
wisenergy-service/src/main/java/cn/wisenergy/service/app/impl/UserLevelServiceImpl.java
View file @
05dc73bc
This diff is collapsed.
Click to expand it.
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