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
8f058a82
Commit
8f058a82
authored
Sep 13, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券问题
parent
4109360f
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
1 deletion
+3
-1
CouponService.php
application/models/Business/Coupon/CouponService.php
+2
-0
StoreMember.php
application/models/DAO/StoreMember.php
+1
-1
No files found.
application/models/Business/Coupon/CouponService.php
100755 → 100644
View file @
8f058a82
...
@@ -90,6 +90,8 @@ class CouponServiceModel extends \Business\AbstractModel{
...
@@ -90,6 +90,8 @@ class CouponServiceModel extends \Business\AbstractModel{
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyCouponId
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyCouponId
);
}
}
$coupon
=
$couponDao
->
findById
(
$where
[
'couponId'
]);
$coupon
=
$couponDao
->
findById
(
$where
[
'couponId'
]);
$coupon
[
'cash_money'
]
=
$coupon
[
'cash_money'
]
?
(
$coupon
[
'cash_money'
]
/
\Our\ApiConst
::
hundred
)
:
\Our\ApiConst
::
zero
;
$coupon
[
'order_amount'
]
=
$coupon
[
'order_amount'
]
?
(
$coupon
[
'order_amount'
]
/
\Our\ApiConst
::
hundred
)
:
\Our\ApiConst
::
zero
;
if
(
!
$coupon
||
$coupon
[
'is_del'
]
==
1
||
time
()
>
$coupon
[
'end_time'
]
||
time
()
<
$coupon
[
'start_time'
]){
if
(
!
$coupon
||
$coupon
[
'is_del'
]
==
1
||
time
()
>
$coupon
[
'end_time'
]
||
time
()
<
$coupon
[
'start_time'
]){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
couponNotExist
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
couponNotExist
);
}
}
...
...
application/models/DAO/StoreMember.php
100755 → 100644
View file @
8f058a82
...
@@ -60,7 +60,7 @@ class StoreMemberModel extends \DAO\AbstractModel{
...
@@ -60,7 +60,7 @@ class StoreMemberModel extends \DAO\AbstractModel{
foreach
(
$datas
as
$key
=>
$data
){
foreach
(
$datas
as
$key
=>
$data
){
$sql
.=
\Our\Common
::
format
(
" (store_id=
{
0
}
and member_id =
{
1
}
and type=
{
2
}
),"
,
$data
[
'storeId'
],
$data
[
'memberId'
],
$data
[
'type'
]);
$sql
.=
\Our\Common
::
format
(
" (store_id=
{
0
}
and member_id =
{
1
}
and type=
{
2
}
),"
,
$data
[
'storeId'
],
$data
[
'memberId'
],
$data
[
'type'
]);
}
}
$sql
=
substr
(
$sql
,
0
,
strlen
(
$sql
)
-
1
);
$sql
=
trim
(
$sql
,
','
);
$sql
.=
";"
;
$sql
.=
";"
;
$res
=
$this
->
db
->
insert
(
$this
->
_tableName
)
->
query
(
$sql
);
$res
=
$this
->
db
->
insert
(
$this
->
_tableName
)
->
query
(
$sql
);
return
$res
;
return
$res
;
...
...
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