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
9b111407
Commit
9b111407
authored
Sep 15, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'feature-deliver210913' into develop
parents
f7b14705
e5186ec3
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
47 deletions
+99
-47
TakePlace.php
application/models/marketing/mysql/TakePlace.php
+8
-0
Marketinggoods.php
application/modules/Marketing/controllers/Marketinggoods.php
+1
-1
BusinessCircleService.php
application/services/marketing/BusinessCircleService.php
+1
-1
TagService.php
application/services/marketing/TagService.php
+11
-1
TakePlaceService.php
application/services/marketing/TakePlaceService.php
+78
-44
No files found.
application/models/marketing/mysql/TakePlace.php
View file @
9b111407
...
...
@@ -34,4 +34,12 @@ class TakePlace extends MysqlBase
$exist
=
self
::
getRecord
([
'take_place_name'
=>
$takePlaceName
],
[
'take_place_id'
]);
return
!
empty
(
$exist
);
}
public
static
function
save
(
$data
,
$where
=
[])
{
if
(
empty
(
$where
))
{
return
self
::
insert
(
$data
,
[]);
}
return
self
::
update
(
$data
,
$where
);
}
}
application/modules/Marketing/controllers/Marketinggoods.php
View file @
9b111407
...
...
@@ -12,7 +12,7 @@ use App\Services\goods\GoodsService;
class
MarketinggoodsController
extends
Base
{
const
KS3_BASE_URL
=
'ks3-cn-beijing.ksyun.com'
;
const
KS3_BASE_URL
=
'ks3-cn-beijing.ksyun
cs
.com'
;
/**
* 获取全部生效营销活动商品列表
*
...
...
application/services/marketing/BusinessCircleService.php
View file @
9b111407
...
...
@@ -93,6 +93,6 @@ class BusinessCircleService
unset
(
$where
[
'LIMIT'
]);
unset
(
$where
[
'ORDER'
]);
$count
=
BusinessCircle
::
count
(
"*"
,
$where
);
return
[
'
resul
t'
=>
$list
,
'count'
=>
$count
];
return
[
'
lis
t'
=>
$list
,
'count'
=>
$count
];
}
}
\ No newline at end of file
application/services/marketing/TagService.php
View file @
9b111407
...
...
@@ -9,6 +9,7 @@ namespace App\Services\marketing;
use
App\Exception\custom\MarketingException
;
use
App\Models\marketing\mysql\Tag
;
use
App\Models\marketing\mysql\TakePlace
;
class
TagService
{
...
...
@@ -65,7 +66,16 @@ class TagService
$tagId
=
$params
[
"tag_id"
];
$data
=
[];
$data
[
"is_delete"
]
=
empty
(
$params
[
"is_delete"
])
?
0
:
$params
[
"is_delete"
];
return
Tag
::
save
(
$data
,
[
"tag_id"
=>
$tagId
]);
$deleteRes
=
Tag
::
save
(
$data
,
[
"tag_id"
=>
$tagId
]);
if
(
!
empty
(
$data
[
"is_delete"
]))
{
$takePlaceIds
=
TakePlace
::
getRecords
([
"tag_id"
=>
$tagId
],
[
"take_place_id"
]);
if
(
!
empty
(
$takePlaceIds
))
{
$ids
=
array_column
(
$takePlaceIds
,
"take_place_id"
);
TakePlace
::
save
([
"tag_id"
=>
0
],
[
"take_place_id"
=>
$ids
]);
}
}
return
$deleteRes
;
}
/**
...
...
application/services/marketing/TakePlaceService.php
View file @
9b111407
This diff is collapsed.
Click to expand it.
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