Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
goods
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
bp
goods
Commits
fa001575
Commit
fa001575
authored
Aug 31, 2021
by
pengfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update 团长分销-细化团长审核错误提示
parent
126a3371
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
MarketingException.php
application/exception/custom/MarketingException.php
+6
-1
ColonelService.php
application/services/marketing/ColonelService.php
+7
-7
No files found.
application/exception/custom/MarketingException.php
View file @
fa001575
...
@@ -22,6 +22,9 @@ class MarketingException extends BaseException
...
@@ -22,6 +22,9 @@ class MarketingException extends BaseException
const
COLONEL_TAKE_PLACE_PARAMS
=
31
;
const
COLONEL_TAKE_PLACE_PARAMS
=
31
;
const
COLONEL_TAKE_PLACE_FAILED
=
32
;
const
COLONEL_TAKE_PLACE_FAILED
=
32
;
const
COLONEL_APPLY_EXIST
=
33
;
const
COLONEL_APPLY_EXIST
=
33
;
const
COLONEL_AUDIT_STATUS_USE
=
34
;
const
COLONEL_ADD_FAILED
=
35
;
const
COLONEL_TAKE_PLACE_EDIT_FAILED
=
36
;
protected
$cus
=
[
protected
$cus
=
[
...
@@ -59,6 +62,8 @@ class MarketingException extends BaseException
...
@@ -59,6 +62,8 @@ class MarketingException extends BaseException
self
::
COLONEL_TAKE_PLACE_PARAMS
=>
'自提点信息不存在'
,
self
::
COLONEL_TAKE_PLACE_PARAMS
=>
'自提点信息不存在'
,
self
::
COLONEL_TAKE_PLACE_FAILED
=>
'自提点添加失败'
,
self
::
COLONEL_TAKE_PLACE_FAILED
=>
'自提点添加失败'
,
self
::
COLONEL_APPLY_EXIST
=>
'当前用户已提交团长申请'
,
self
::
COLONEL_APPLY_EXIST
=>
'当前用户已提交团长申请'
,
self
::
COLONEL_AUDIT_STATUS_USE
=>
'该团长已审核'
,
self
::
COLONEL_ADD_FAILED
=>
'团长入库失败'
,
self
::
COLONEL_TAKE_PLACE_EDIT_FAILED
=>
'修改团长自提点失败'
];
];
}
}
application/services/marketing/ColonelService.php
View file @
fa001575
...
@@ -150,7 +150,7 @@ class ColonelService
...
@@ -150,7 +150,7 @@ class ColonelService
// 审核状态数据检测
// 审核状态数据检测
$applyInfo
=
ColonelDistributorColonelApply
::
getRecord
([
'colonel_apply_id'
=>
$applyId
]);
$applyInfo
=
ColonelDistributorColonelApply
::
getRecord
([
'colonel_apply_id'
=>
$applyId
]);
if
(
empty
(
$applyInfo
)
||
$applyInfo
[
'audit_status'
]
!=
ColonelDistributorColonelApply
::
STATUS_AUDIT
)
{
if
(
empty
(
$applyInfo
)
||
$applyInfo
[
'audit_status'
]
!=
ColonelDistributorColonelApply
::
STATUS_AUDIT
)
{
throw
new
MarketingException
(
MarketingException
::
COLONEL_AUDIT_STATUS
);
throw
new
MarketingException
(
MarketingException
::
COLONEL_AUDIT_STATUS
_USE
);
}
}
try
{
try
{
ColonelDistributorColonelApply
::
beginTransaction
();
ColonelDistributorColonelApply
::
beginTransaction
();
...
@@ -162,16 +162,16 @@ class ColonelService
...
@@ -162,16 +162,16 @@ class ColonelService
// 审核成功
// 审核成功
if
(
$auditStatus
==
ColonelDistributorColonelApply
::
STATUS_PASS
)
{
if
(
$auditStatus
==
ColonelDistributorColonelApply
::
STATUS_PASS
)
{
if
(
!
self
::
handleAuditSuccess
((
array
)
$applyInfo
))
{
if
(
!
self
::
handleAuditSuccess
((
array
)
$applyInfo
))
{
throw
new
MarketingException
(
MarketingException
::
COLONEL_A
UDIT_STATUS
_FAILED
);
throw
new
MarketingException
(
MarketingException
::
COLONEL_A
DD
_FAILED
);
}
}
}
}
if
(
!
ColonelDistributorColonelApply
::
commit
())
{
if
(
!
ColonelDistributorColonelApply
::
commit
())
{
throw
new
MarketingException
(
MarketingException
::
CO
LONEL_AUDIT_STATUS_FAILED
);
throw
new
MarketingException
(
MarketingException
::
CO
MMIT_ERROR
);
}
}
return
true
;
return
true
;
}
catch
(
MarketingException
$e
)
{
}
catch
(
MarketingException
$e
)
{
ColonelDistributorColonelApply
::
rollback
();
ColonelDistributorColonelApply
::
rollback
();
throw
new
MarketingException
(
MarketingException
::
COLONEL_AUDIT_STATUS_FAILED
);
throw
new
MarketingException
(
$e
->
getCode
()
);
}
}
}
}
...
@@ -222,15 +222,15 @@ class ColonelService
...
@@ -222,15 +222,15 @@ class ColonelService
}
}
// 修改自提点id
// 修改自提点id
if
(
!
ColonelDistributorColonel
::
updateRecord
([
'take_place_id'
=>
$takePlaceId
],
$where
))
{
if
(
!
ColonelDistributorColonel
::
updateRecord
([
'take_place_id'
=>
$takePlaceId
],
$where
))
{
throw
new
MarketingException
(
MarketingException
::
COLONEL_TAKE_PLACE_FAILED
);
throw
new
MarketingException
(
MarketingException
::
COLONEL_TAKE_PLACE_
EDIT_
FAILED
);
}
}
if
(
!
ColonelDistributorColonel
::
commit
())
{
if
(
!
ColonelDistributorColonel
::
commit
())
{
throw
new
MarketingException
(
MarketingException
::
CO
LONEL_TAKE_PLACE_FAILED
);
throw
new
MarketingException
(
MarketingException
::
CO
MMIT_ERROR
);
}
}
return
(
int
)
$takePlaceId
;
return
(
int
)
$takePlaceId
;
}
catch
(
MarketingException
$e
)
{
}
catch
(
MarketingException
$e
)
{
ColonelDistributorColonel
::
rollback
();
ColonelDistributorColonel
::
rollback
();
throw
new
MarketingException
(
MarketingException
::
COLONEL_TAKE_PLACE_FAILED
);
throw
new
MarketingException
(
$e
->
getCode
()
);
}
}
}
}
...
...
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