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
73e3960c
Commit
73e3960c
authored
Jul 01, 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
2bd425f8
a239c555
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
2 deletions
+64
-2
GoodsSpu.php
application/models/goods/mysql/GoodsSpu.php
+8
-0
Goods.php
application/modules/Goods/controllers/Goods.php
+9
-0
Marketinggoods.php
application/modules/Marketing/controllers/Marketinggoods.php
+1
-1
GoodsService.php
application/services/goods/GoodsService.php
+34
-0
MarketingService.php
application/services/marketing/MarketingService.php
+12
-1
No files found.
application/models/goods/mysql/GoodsSpu.php
View file @
73e3960c
...
@@ -31,6 +31,14 @@ class GoodsSpu extends MysqlBase
...
@@ -31,6 +31,14 @@ class GoodsSpu extends MysqlBase
return
self
::
get
(
$colums
,
$where
);
return
self
::
get
(
$colums
,
$where
);
}
}
public
static
function
getRecords
(
$where
,
$colums
=
[])
{
if
(
empty
(
$colums
))
{
$colums
=
'*'
;
}
return
self
::
select
(
$colums
,
$where
);
}
public
static
function
getRecordMaster
(
$where
,
$colums
=
[])
public
static
function
getRecordMaster
(
$where
,
$colums
=
[])
{
{
if
(
empty
(
$colums
))
{
if
(
empty
(
$colums
))
{
...
...
application/modules/Goods/controllers/Goods.php
View file @
73e3960c
...
@@ -216,6 +216,15 @@ class GoodsController extends Base
...
@@ -216,6 +216,15 @@ class GoodsController extends Base
$this
->
success
([
"result"
=>
$data
]);
$this
->
success
([
"result"
=>
$data
]);
}
}
public
function
goods_spu_listAction
()
{
$params
=
$this
->
params
;
$data
=
GoodsService
::
getGoodsSpuList
(
$params
);
$this
->
success
([
"result"
=>
$data
]);
}
/**
/**
* 支付回调商品接口
* 支付回调商品接口
* @throws \App\Exception\custom\GoodsException
* @throws \App\Exception\custom\GoodsException
...
...
application/modules/Marketing/controllers/Marketinggoods.php
View file @
73e3960c
...
@@ -9,7 +9,7 @@ use Api\PhpServices\JwUser\JwUser;
...
@@ -9,7 +9,7 @@ use Api\PhpServices\JwUser\JwUser;
use
Api\PhpServices\Ksy\Ksyun
;
use
Api\PhpServices\Ksy\Ksyun
;
class
MarketinggoodsController
extends
Base
class
MarketinggoodsController
extends
Base
{
{
const
KS3_BASE_URL
=
'ks3-cn-beijing.ksyun.com'
;
/**
/**
* 获取全部生效营销活动商品列表
* 获取全部生效营销活动商品列表
*
*
...
...
application/services/goods/GoodsService.php
View file @
73e3960c
...
@@ -1155,6 +1155,40 @@ class GoodsService
...
@@ -1155,6 +1155,40 @@ class GoodsService
return
$list
;
return
$list
;
}
}
/**
* 获取 GoodsSpu 列表
* @param $params
* @return array
* @throws GoodsException
*/
public
static
function
getGoodsSpuList
(
$params
)
{
$where
=
[];
if
(
empty
(
$params
))
{
return
[];
}
if
(
!
empty
(
$params
[
'goods_spu_id'
]))
{
$where
[
'goods_spu_id'
]
=
$params
[
'goods_spu_id'
];
}
if
(
!
empty
(
$params
[
'life_account_id'
]))
{
$where
[
'life_account_id'
]
=
$params
[
'life_account_id'
];
}
if
(
!
empty
(
$params
[
'shop_id'
]))
{
$where
[
'shop_id'
]
=
$params
[
'shop_id'
];
}
if
(
!
empty
(
$params
[
'goods_name'
]))
{
$where
[
'goods_name'
]
=
$params
[
'goods_name'
];
}
$list
=
GoodsSpu
::
getRecords
(
$where
);
return
$list
;
}
/**
/**
* 获取图片地址,这里因为bucket可能不同,不保证图片顺序
* 获取图片地址,这里因为bucket可能不同,不保证图片顺序
* @param $picUrlStr
* @param $picUrlStr
...
...
application/services/marketing/MarketingService.php
View file @
73e3960c
...
@@ -101,7 +101,18 @@ class MarketingService
...
@@ -101,7 +101,18 @@ class MarketingService
}
}
if
(
!
empty
(
$params
[
'online_status'
]))
{
if
(
!
empty
(
$params
[
'online_status'
]))
{
$where
[
'online_status'
]
=
$params
[
'online_status'
];
if
(
is_array
(
$params
[
'online_status'
]))
{
foreach
(
$params
[
'online_status'
]
as
$key
=>
$valu
)
{
if
(
!
empty
(
$valu
))
{
$where
[
'online_status'
][
$key
]
=
$valu
;
}
else
{
$where
[
'online_status'
]
=
[
1
,
2
];
break
;
}
}
}
else
{
$where
[
'online_status'
]
=
$params
[
'online_status'
];
}
}
}
if
(
!
empty
(
$params
[
'goods_sku_id'
]))
{
if
(
!
empty
(
$params
[
'goods_sku_id'
]))
{
...
...
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