Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
loveisland
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
刘小敏
loveisland
Commits
0780700f
Commit
0780700f
authored
Jul 07, 2026
by
刘小敏
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix(agent): 防止重复申请代理商
parent
7cb64f71
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
Agent.php
addons/shopro/controller/user/Agent.php
+8
-0
No files found.
addons/shopro/controller/user/Agent.php
View file @
0780700f
...
@@ -25,6 +25,14 @@ class Agent extends Common
...
@@ -25,6 +25,14 @@ class Agent extends Common
$userId
=
$user
->
id
??
0
;
$userId
=
$user
->
id
??
0
;
custom_log
(
'[agent.apply] 收到代理申请请求, user_id='
.
$userId
,
$userId
,
'share'
);
custom_log
(
'[agent.apply] 收到代理申请请求, user_id='
.
$userId
,
$userId
,
'share'
);
// 校验是否已有代理商记录
$existAgent
=
AgentModel
::
where
(
'user_id'
,
$userId
)
->
find
();
if
(
$existAgent
)
{
$statusText
=
(
new
AgentModel
)
->
statusList
()[
$existAgent
->
status
]
??
$existAgent
->
status
;
custom_log
(
'[agent.apply] 已存在代理商记录, agent_id='
.
$existAgent
->
id
.
', status='
.
$existAgent
->
status
,
$userId
,
'share'
,
'warning'
);
$this
->
error
(
"您已是代理商,当前状态:
{
$statusText
}
"
);
}
// 校验消费累计条件
// 校验消费累计条件
$commissionConfig
=
new
\addons\shopro\service\commission\Config
();
$commissionConfig
=
new
\addons\shopro\service\commission\Config
();
$becomeAgentEvent
=
$commissionConfig
->
getBecomeAgentEvent
();
$becomeAgentEvent
=
$commissionConfig
->
getBecomeAgentEvent
();
...
...
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