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
8c094d6b
Commit
8c094d6b
authored
Aug 03, 2021
by
luhongguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update:拼单查询
parent
63c82645
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
4 deletions
+45
-4
Goods.php
application/modules/Goods/controllers/Goods.php
+12
-4
MarketingPindanGoodsService.php
application/services/goods/MarketingPindanGoodsService.php
+33
-0
No files found.
application/modules/Goods/controllers/Goods.php
View file @
8c094d6b
...
@@ -15,6 +15,7 @@ use \Validate\GoodsOnlineOfflineValidate;
...
@@ -15,6 +15,7 @@ use \Validate\GoodsOnlineOfflineValidate;
use
\Validate\PaySuccessGoodsCallbackValidate
;
use
\Validate\PaySuccessGoodsCallbackValidate
;
use
\Validate\GoodsInitShopValidate
;
use
\Validate\GoodsInitShopValidate
;
use
\App\Services\goods\ElasticGoodService
;
use
\App\Services\goods\ElasticGoodService
;
use
\App\Services\goods\MarketingPindanGoodsService
;
class
GoodsController
extends
Base
class
GoodsController
extends
Base
...
@@ -246,10 +247,6 @@ class GoodsController extends Base
...
@@ -246,10 +247,6 @@ class GoodsController extends Base
$this
->
success
([
"result"
=>
$data
]);
$this
->
success
([
"result"
=>
$data
]);
}
}
/**
/**
* 支付回调商品接口
* 支付回调商品接口
* @throws \App\Exception\custom\GoodsException
* @throws \App\Exception\custom\GoodsException
...
@@ -276,4 +273,15 @@ class GoodsController extends Base
...
@@ -276,4 +273,15 @@ class GoodsController extends Base
$shopId
=
GoodsService
::
initShop
(
$params
);
$shopId
=
GoodsService
::
initShop
(
$params
);
$this
->
success
([
"result"
=>
[
"shop_id"
=>
$shopId
]]);
$this
->
success
([
"result"
=>
[
"shop_id"
=>
$shopId
]]);
}
}
/**
* 拼单商品后台搜商品
* @throws Exception
*/
public
function
pindan_goodsAction
()
{
$params
=
$this
->
params
;
$list
=
MarketingPindanGoodsService
::
getPindanGoodsList
(
$params
);
$this
->
success
(
$list
);
}
}
}
\ No newline at end of file
application/services/goods/MarketingPindanGoodsService.php
View file @
8c094d6b
...
@@ -336,4 +336,37 @@ class MarketingPindanGoodsService
...
@@ -336,4 +336,37 @@ class MarketingPindanGoodsService
$data
[
"price"
]
=
$goodsSnapshot
[
"price"
]
/
100
;
$data
[
"price"
]
=
$goodsSnapshot
[
"price"
]
/
100
;
return
$data
;
return
$data
;
}
}
/**
* 拼单商品后台搜商品
* @param $params
* @return array
*/
public
static
function
getPindanGoodsList
(
$params
)
{
$params
[
'page'
]
=
!
empty
(
$params
[
'page'
])
?
$params
[
'page'
]
:
1
;
$limit
=
!
empty
(
$params
[
'page_size'
])
?
$params
[
'page_size'
]
:
20
;
$page
=
(
$params
[
'page'
]
-
1
)
*
$limit
;
$where
=
$data
=
[];
if
(
!
empty
(
$params
[
"ota_id"
]))
{
$where
[
"ota_id"
]
=
$params
[
"ota_id"
];
}
if
(
!
empty
(
$params
[
"goods_name"
]))
{
$where
[
"goods_name[~]"
]
=
$params
[
"goods_name"
];
}
$where
[
'LIMIT'
]
=
[
$page
,
$limit
];
$where
[
'ORDER'
]
=
[
"update_time"
=>
"DESC"
];
$list
=
PindanGoodsSku
::
select
(
"*"
,
$where
);
$count
=
PindanGoodsSku
::
count
(
"*"
,
$where
);
if
(
!
empty
(
$list
))
{
foreach
(
$list
as
$key
=>
$item
)
{
$list
[
$key
][
"original_price"
]
=
$item
[
"original_price"
]
/
100
;
$list
[
$key
][
"price"
]
=
$item
[
"price"
]
/
100
;
}
}
return
[
"list"
=>
$list
,
"count"
=>
$count
];
}
}
}
\ No newline at end of file
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