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
99e283e3
Commit
99e283e3
authored
Sep 20, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
group
parent
a437d290
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
23 deletions
+27
-23
GroupSaleService.php
application/models/Business/Goods/GroupSaleService.php
+27
-23
No files found.
application/models/Business/Goods/GroupSaleService.php
View file @
99e283e3
...
@@ -27,10 +27,12 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -27,10 +27,12 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyPBundlingdForOrder
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyPBundlingdForOrder
);
}
}
$data
=
$groupList
[
0
];
$data
=
$groupList
[
0
];
if
(
$data
[
'goodsCountFlag'
]
===
false
){
$data
[
'state'
]
=
\Our\ApiConst
::
one
;
$data
[
'state'
]
=
0
;
if
(
!
(
$data
[
'bl_state'
]
==
\Our\ApiConst
::
one
&&
(
$data
[
'bl_quota_starttime'
]
<
time
()
&&
$data
[
'endTime'
]
>=
time
()))
||!
$data
[
'goodsCountFlag'
])
{
}
else
{
$data
[
'state'
]
=
\Our\ApiConst
::
zero
;
$data
[
'state'
]
=
$data
[
'bl_state'
];
}
if
(
$data
[
'bl_storage'
]
<=
\Our\ApiConst
::
zero
)
{
$data
[
'state'
]
=
\Our\ApiConst
::
zero
;
}
}
unset
(
$data
[
'blId'
]);
unset
(
$data
[
'blId'
]);
unset
(
$data
[
'store_name'
]);
unset
(
$data
[
'store_name'
]);
...
@@ -263,24 +265,26 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -263,24 +265,26 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$group
=
array
();
$group
=
array
();
if
(
$groupList
){
if
(
$groupList
){
foreach
(
$groupList
as
$k
=>
$v
){
foreach
(
$groupList
as
$k
=>
$v
){
$v
[
'groupId'
]
=
$v
[
'blId'
];
if
(
$v
[
'bl_quota_starttime'
]
<
TIMESTAMP
&&
$v
[
'endTime'
]
>=
TIMESTAMP
&&
$v
[
'bl_storage'
]
>
\Our\ApiConst
::
zero
)
{
$v
[
'image'
]
=
ImageUtil
::
getGoodsImgUrl
(
$v
[
'image'
],
\our\ImageConst
::
goodsGroupImg
);
$v
[
'groupId'
]
=
$v
[
'blId'
];
unset
(
$v
[
'goodsList'
]);
$v
[
'image'
]
=
ImageUtil
::
getGoodsImgUrl
(
$v
[
'image'
],
\our\ImageConst
::
goodsGroupImg
);
unset
(
$v
[
'bl_title'
]);
unset
(
$v
[
'goodsList'
]);
unset
(
$v
[
'store_id'
]);
unset
(
$v
[
'bl_title'
]);
unset
(
$v
[
'store_name'
]);
unset
(
$v
[
'store_id'
]);
unset
(
$v
[
'bl_state'
]);
unset
(
$v
[
'store_name'
]);
unset
(
$v
[
'bl_quota_starttime'
]);
unset
(
$v
[
'bl_state'
]);
unset
(
$v
[
'bl_image'
]);
unset
(
$v
[
'bl_quota_starttime'
]);
unset
(
$v
[
'bl_storage'
]);
unset
(
$v
[
'bl_image'
]);
unset
(
$v
[
'blId'
]);
unset
(
$v
[
'bl_storage'
]);
unset
(
$v
[
'goodsCountFlag'
]);
unset
(
$v
[
'blId'
]);
unset
(
$v
[
'is_transport'
]);
unset
(
$v
[
'goodsCountFlag'
]);
unset
(
$v
[
'transport_id'
]);
unset
(
$v
[
'is_transport'
]);
unset
(
$v
[
'snapshot_id'
]);
unset
(
$v
[
'transport_id'
]);
unset
(
$v
[
'goods_freight'
]);
unset
(
$v
[
'snapshot_id'
]);
unset
(
$v
[
'goods_free'
]);
unset
(
$v
[
'goods_freight'
]);
$group
[]
=
$v
;
unset
(
$v
[
'goods_free'
]);
$group
[]
=
$v
;
}
}
}
}
}
return
$group
;
return
$group
;
...
@@ -331,7 +335,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -331,7 +335,7 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$return
=
array
();
$return
=
array
();
if
(
$group
){
if
(
$group
){
foreach
(
$group
as
$k
=>
$v
){
foreach
(
$group
as
$k
=>
$v
){
if
(
$v
[
'bl_quota_starttime'
]
<
TIMESTAMP
&&
$v
[
'endTime'
]
>=
TIMESTAMP
){
if
(
$v
[
'bl_quota_starttime'
]
<
TIMESTAMP
&&
$v
[
'endTime'
]
>=
TIMESTAMP
&&
$v
[
'bl_storage'
]
>
\Our\ApiConst
::
zero
){
$v
[
'groupId'
]
=
$v
[
'blId'
];
$v
[
'groupId'
]
=
$v
[
'blId'
];
$v
[
'image'
]
=
ImageUtil
::
getGoodsImgUrl
(
$v
[
'image'
],
\Our\ImageConst
::
goodsGroupImg
);
$v
[
'image'
]
=
ImageUtil
::
getGoodsImgUrl
(
$v
[
'image'
],
\Our\ImageConst
::
goodsGroupImg
);
unset
(
$v
[
'goodsList'
]);
unset
(
$v
[
'goodsList'
]);
...
...
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