Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
huhu-partner
Project
Overview
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
guanchen
huhu-partner
Commits
1c2cd56d
Commit
1c2cd56d
authored
Jun 27, 2019
by
guanchen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修复bug
添加config方法到启东类
parent
1965dae1
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
6 deletions
+27
-6
PartnerApplication.java
...main/java/com/lanren/huhu/partner/PartnerApplication.java
+8
-1
WebLogAspect.java
...ain/java/com/lanren/huhu/partner/aspect/WebLogAspect.java
+1
-1
UserManager.java
...ain/java/com/lanren/huhu/partner/manager/UserManager.java
+18
-4
No files found.
src/main/java/com/lanren/huhu/partner/PartnerApplication.java
View file @
1c2cd56d
...
@@ -4,12 +4,14 @@ import org.slf4j.Logger;
...
@@ -4,12 +4,14 @@ import org.slf4j.Logger;
import
org.slf4j.LoggerFactory
;
import
org.slf4j.LoggerFactory
;
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.boot.builder.SpringApplicationBuilder
;
import
org.springframework.boot.web.servlet.support.SpringBootServletInitializer
;
/**
/**
* @author houseme
* @author houseme
*/
*/
@SpringBootApplication
@SpringBootApplication
public
class
PartnerApplication
{
public
class
PartnerApplication
extends
SpringBootServletInitializer
{
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
PartnerApplication
.
class
);
private
static
Logger
logger
=
LoggerFactory
.
getLogger
(
PartnerApplication
.
class
);
...
@@ -32,4 +34,9 @@ public class PartnerApplication {
...
@@ -32,4 +34,9 @@ public class PartnerApplication {
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
}
}
@Override
protected
SpringApplicationBuilder
configure
(
SpringApplicationBuilder
builder
)
{
return
builder
.
sources
(
PartnerApplication
.
class
);
}
}
}
src/main/java/com/lanren/huhu/partner/aspect/WebLogAspect.java
View file @
1c2cd56d
...
@@ -23,7 +23,7 @@ import java.util.Map;
...
@@ -23,7 +23,7 @@ import java.util.Map;
* @author houseme
* @author houseme
* @date 2017/9/8 上午11:54
* @date 2017/9/8 上午11:54
* Project snacks
* Project snacks
* Package com.
yinguo.snacks
.aspect
* Package com.
lanren.huhu.partner
.aspect
* File
* File
*/
*/
@Aspect
@Aspect
...
...
src/main/java/com/lanren/huhu/partner/manager/UserManager.java
View file @
1c2cd56d
...
@@ -93,8 +93,14 @@ public class UserManager {
...
@@ -93,8 +93,14 @@ public class UserManager {
while
(
true
)
{
while
(
true
)
{
logger
.
info
(
"now loop uid is {}"
,
loopUserId
);
logger
.
info
(
"now loop uid is {}"
,
loopUserId
);
ParentPartner
parentPartner
=
getParentPartner
(
loopUserId
);
ParentPartner
parentPartner
=
getParentPartner
(
loopUserId
);
/**
* 有上级合伙人
*/
if
(
null
!=
parentPartner
)
{
if
(
null
!=
parentPartner
)
{
UserAgent
userAgent
=
userAgentService
.
getOneByUserId
(
parentPartner
.
getUserId
());
UserAgent
userAgent
=
userAgentService
.
getOneByUserId
(
parentPartner
.
getUserId
());
/**
* 找到了第一个是代理商的合伙人
*/
if
(
null
!=
userAgent
)
{
if
(
null
!=
userAgent
)
{
/**
/**
* 然后开始 无限找 这个人的上级代理商
* 然后开始 无限找 这个人的上级代理商
...
@@ -113,15 +119,23 @@ public class UserManager {
...
@@ -113,15 +119,23 @@ public class UserManager {
loogAgentId
=
loopUserAgent
.
getAgentId
();
loogAgentId
=
loopUserAgent
.
getAgentId
();
}
}
}
}
/**
* 找完 "第一个是代理商的合伙人" 的 全部上级代理后 退出while循环
*/
logger
.
info
(
"loop find parent agent end"
);
logger
.
info
(
"loop find parent agent end"
);
break
;
break
;
}
else
{
}
else
{
break
;
/**
* 这个人不是代理商 继续往上找
*/
loopUserId
=
parentPartner
.
getUserId
();
}
}
}
else
{
}
else
{
logger
.
info
(
"parent is {} "
,
parentPartner
.
getUserId
());
/**
user
.
getPartnerList
().
add
(
parentPartner
);
* 没有上级合伙人 打印结束信息 跳出循环
loopUserId
=
parentPartner
.
getUserId
();
*/
logger
.
info
(
"loop end with userId: {}"
,
loopUserId
);
break
;
}
}
}
}
logger
.
info
(
"setAgentList for user: {} end"
,
user
.
getUserId
());
logger
.
info
(
"setAgentList for user: {} end"
,
user
.
getUserId
());
...
...
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