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
f2a74387
Commit
f2a74387
authored
Sep 03, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update: SHQBD-1181
parent
2257dfc5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
6 deletions
+11
-6
MarketingException.php
application/exception/custom/MarketingException.php
+4
-2
PindanActivityColonelConfigService.php
...services/marketing/PindanActivityColonelConfigService.php
+7
-4
No files found.
application/exception/custom/MarketingException.php
View file @
f2a74387
...
...
@@ -25,6 +25,7 @@ class MarketingException extends BaseException
const
COLONEL_ADD_FAILED
=
35
;
const
COLONEL_TAKE_PLACE_EDIT_FAILED
=
36
;
const
COLONEL_APPLY_EXIST
=
37
;
const
COLONEL_DATE_ERROR
=
38
;
protected
$cus
=
[
0
=>
'活动名称不能为空'
,
...
...
@@ -60,10 +61,11 @@ class MarketingException extends BaseException
self
::
COLONEL_TAKE_PLACE_EXIST
=>
'自提点名称已存在'
,
self
::
COLONEL_TAKE_PLACE_PARAMS
=>
'自提点信息不存在'
,
self
::
COLONEL_TAKE_PLACE_FAILED
=>
'自提点添加失败'
,
self
::
COLONEL_APPLY_EXIST
=>
'当前用户已提交团长申请
'
,
33
=>
'分润金额+手续费不能大于售价金额
'
,
self
::
COLONEL_AUDIT_STATUS_USE
=>
'该团长已审核'
,
self
::
COLONEL_ADD_FAILED
=>
'团长入库失败'
,
self
::
COLONEL_TAKE_PLACE_EDIT_FAILED
=>
'修改团长自提点失败'
,
33
=>
'分润金额+手续费不能大于售价金额'
,
self
::
COLONEL_APPLY_EXIST
=>
'当前用户已提交团长申请'
,
self
::
COLONEL_DATE_ERROR
=>
'当前日期的配置不能修改'
,
];
}
application/services/marketing/PindanActivityColonelConfigService.php
View file @
f2a74387
...
...
@@ -19,6 +19,10 @@ class PindanActivityColonelConfigService
public
static
function
editColonelConfig
(
$params
=
[])
{
$date
=
$params
[
"date"
];
$today
=
date
(
"Y-m-d"
);
if
(
$date
<=
$today
)
{
throw
new
MarketingException
([
'cus'
=>
MarketingException
::
COLONEL_DATE_ERROR
]);
}
$type
=
empty
(
$params
[
"type"
])
?
ColonelDistributorConfig
::
TYPE_COLONEL
:
$params
[
"type"
];
$configList
=
$params
[
"config"
];
$marketingId
=
$params
[
"marketing_id"
];
...
...
@@ -31,15 +35,14 @@ class PindanActivityColonelConfigService
throw
new
MarketingException
([
'cus'
=>
MarketingException
::
COLONEL_LEVEL_SIX
]);
}
$idRes
=
ColonelDistributorConfig
::
getRecord
([
"date"
=>
$date
,
"type"
=>
$type
,
"marketing_id"
=>
$marketingId
],
[
"colonel_config_id"
]);
if
(
!
empty
(
$idRes
))
{
$idRes
=
ColonelDistributorConfig
::
getRecordMaster
([
"date"
=>
$date
,
"type"
=>
$type
,
"marketing_id"
=>
$marketingId
],
[
"colonel_config_id"
]);
if
(
!
empty
(
$idRes
[
0
][
"colonel_config_id"
]))
{
ColonelDistributorConfig
::
save
([
"marketing_id"
=>
$marketingId
,
"date"
=>
$date
,
"type"
=>
$type
,
"data"
=>
$configList
,
],
[
"colonel_config_id"
=>
$idRes
[
"colonel_config_id"
]]);
],
[
"colonel_config_id"
=>
$idRes
[
0
][
"colonel_config_id"
]]);
}
else
{
ColonelDistributorConfig
::
save
([
"marketing_id"
=>
$marketingId
,
...
...
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