Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
Project
Project
Details
Activity
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
chenchuanwen
my-yaf-project
Commits
5875548d
Commit
5875548d
authored
Dec 11, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
goods
parent
307981a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+7
-2
No files found.
application/models/Business/Goods/GoodsCommonService.php
View file @
5875548d
...
@@ -182,8 +182,10 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -182,8 +182,10 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
}
elseif
(
$type
==
3
){
}
elseif
(
$type
==
3
){
if
(
$attrStr
||
$activities
){
if
(
$attrStr
||
$activities
){
$where
[]
=
'han_goods_common.goods_commonid in('
.
trim
(
$ids
,
','
)
.
')'
;
$where
[]
=
'han_goods_common.goods_commonid in('
.
trim
(
$ids
,
','
)
.
')'
;
$order
[]
=
[
'han_goods_common.goods_commonid'
,
'DESC'
];
}
else
{
}
else
{
$where
[]
=
'goods_commonid in('
.
trim
(
$ids
,
','
)
.
')'
;
$where
[]
=
'goods_commonid in('
.
trim
(
$ids
,
','
)
.
')'
;
$order
[]
=
[
'goods_commonid'
,
'DESC'
];
}
}
}
}
$saleSort
?
$ttl
=
\Our\ApiConst
::
oneHour
:
\Our\ApiConst
::
oneDaySecond
;
$saleSort
?
$ttl
=
\Our\ApiConst
::
oneHour
:
\Our\ApiConst
::
oneDaySecond
;
...
@@ -316,7 +318,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -316,7 +318,6 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$order
[]
=
[
'eval_score'
,
'DESC'
];
$order
[]
=
[
'eval_score'
,
'DESC'
];
break
;
break
;
}
}
$order
[]
=
[
'goods_commonid'
,
'DESC'
];
return
array
(
$where
,
$order
,
$attrStr
,
$saleSort
);
return
array
(
$where
,
$order
,
$attrStr
,
$saleSort
);
}
}
...
@@ -486,7 +487,11 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -486,7 +487,11 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$keyword
!==
''
&&
$where
[]
=
"goods_name like '%
{
$keyword
}
%'"
;
$keyword
!==
''
&&
$where
[]
=
"goods_name like '%
{
$keyword
}
%'"
;
list
(
$_where
,
$order
,
$attrStr
,
$saleSort
)
=
$this
->
getParam
(
$attrValue
,
$minPrice
,
$maxPrice
,
$goodsSort
);
list
(
$_where
,
$order
,
$attrStr
,
$saleSort
)
=
$this
->
getParam
(
$attrValue
,
$minPrice
,
$maxPrice
,
$goodsSort
);
$where
=
array_merge
(
$where
,
$_where
);
$where
=
array_merge
(
$where
,
$_where
);
if
(
$attrStr
||
$activities
){
$order
[]
=
[
'han_goods_common.goods_commonid'
,
'DESC'
];
}
else
{
$order
[]
=
[
'goods_commonid'
,
'DESC'
];
}
$commonDAO
=
\DAO\GoodsCommonModel
::
getInstance
();
$commonDAO
=
\DAO\GoodsCommonModel
::
getInstance
();
$saleSort
?
$ttl
=
\Our\ApiConst
::
oneHour
:
\Our\ApiConst
::
oneDaySecond
;
$saleSort
?
$ttl
=
\Our\ApiConst
::
oneHour
:
\Our\ApiConst
::
oneDaySecond
;
if
(
!
$activities
){
if
(
!
$activities
){
...
...
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