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
b6253f2e
Commit
b6253f2e
authored
Jun 25, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
https://git.yidian-inc.com:8021/bp/goods
into develop
parents
ae767423
cd3542c1
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
5 deletions
+14
-5
MarketingException.php
application/exception/custom/MarketingException.php
+2
-0
MarketingService.php
application/services/marketing/MarketingService.php
+11
-5
ShopService.php
application/services/shop/ShopService.php
+1
-0
No files found.
application/exception/custom/MarketingException.php
View file @
b6253f2e
...
...
@@ -19,5 +19,7 @@ class MarketingException extends BaseException
5
=>
'创建失败'
,
6
=>
'活动id不能为空'
,
7
=>
'更新失败'
,
8
=>
'开始时间不能为空'
,
9
=>
'结束时间不能为空'
,
];
}
\ No newline at end of file
application/services/marketing/MarketingService.php
View file @
b6253f2e
...
...
@@ -48,8 +48,8 @@ class MarketingService
public
static
function
addMarketing
(
$params
){
$marketingName
=
!
empty
(
$params
[
'marketing_name'
])
?
$params
[
'marketing_name'
]
:
''
;
$firstCommissionRate
=
!
empty
(
$params
[
'first_commission_
rate'
])
?
$params
[
'first_commission_rat
e'
]
:
''
;
$secondCommissionRate
=
!
empty
(
$params
[
'second_commission_
rate'
])
?
$params
[
'second_commission_rat
e'
]
:
''
;
$firstCommissionRate
=
!
empty
(
$params
[
'first_commission_
value'
])
?
$params
[
'first_commission_valu
e'
]
:
''
;
$secondCommissionRate
=
!
empty
(
$params
[
'second_commission_
value'
])
?
$params
[
'second_commission_valu
e'
]
:
''
;
$createUserEmail
=
!
empty
(
$params
[
'op_cur_user'
])
?
$params
[
'op_cur_user'
]
:
''
;
$startTime
=
!
empty
(
$params
[
'start_time'
])
?
$params
[
'start_time'
]
:
''
;
$endTime
=
!
empty
(
$params
[
'end_time'
])
?
$params
[
'end_time'
]
:
''
;
...
...
@@ -69,11 +69,17 @@ class MarketingService
// throw new MarketingException(['cus'=>4]);
// }
if
(
self
::
utf8Strlen
(
$marketingName
)
>
40
)
{
throw
new
MarketingException
([
'cus'
=>
1
]);
}
if
(
empty
(
$startTime
))
{
throw
new
MarketingException
([
'cus'
=>
8
]);
}
if
(
empty
(
$endTime
))
{
throw
new
MarketingException
([
'cus'
=>
9
]);
}
$detectParams
=
[
'businessId'
=>
1
,
...
...
@@ -96,8 +102,8 @@ class MarketingService
$colums
=
[
//'marketing_id' => $marketing_id,
'marketing_name'
=>
$marketingName
,
'first_commission_
rat
e'
=>
$firstCommissionRate
,
'second_commission_
rat
e'
=>
$secondCommissionRate
,
'first_commission_
valu
e'
=>
$firstCommissionRate
,
'second_commission_
valu
e'
=>
$secondCommissionRate
,
'create_user_email'
=>
$createUserEmail
,
'good_count'
=>
0
,
'start_time'
=>
$startTime
,
...
...
application/services/shop/ShopService.php
View file @
b6253f2e
...
...
@@ -57,6 +57,7 @@ class ShopService
if
(
!
empty
(
$sensitive
[
'data'
]))
{
throw
new
ShopException
([
'cus'
=>
4
]);
}
//判断店铺重复
if
(
!
self
::
isName
(
$name
))
{
throw
new
ShopException
([
'cus'
=>
6
]);
...
...
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