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
45212853
Commit
45212853
authored
Oct 09, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券标题修改
parent
dcf8da90
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
23 deletions
+5
-23
DescribeConst.php
application/library/Our/DescribeConst.php
+3
-3
CouponService.php
application/models/Business/Coupon/CouponService.php
+1
-7
OrderService.php
application/models/Business/Order/OrderService.php
+0
-3
Coupon.php
application/models/DAO/Coupon/Coupon.php
+1
-10
No files found.
application/library/Our/DescribeConst.php
View file @
45212853
...
...
@@ -109,17 +109,17 @@ class DescribeConst
const
specialCoupon
=
'指定券'
;
const
giftCoupon
=
'礼品券'
;
const
couponFullAvailable
=
'满{0}可用'
;
const
couponFullAvailable
=
'满{0}
元
可用'
;
const
couponFullDiscount
=
'满{0}享{1}折'
;
const
couponFullForCoupon
=
'满{0}送指订券'
;
const
couponFullForGift
=
'满{0}送礼品券'
;
const
noLimitGoodsCouponName
=
'元无门槛'
;
const
noLimitGoodsCouponName
=
'
{0}
元无门槛'
;
const
available
=
'可用'
;
const
minus
=
'减'
;
const
couponTitleFullAvailAbleNoAmountLimit
=
'全场减{0}'
;
//无门槛减免券
const
couponTitleFullAvailAble
=
'满{0}减{1}'
;
const
couponTitleFullAvailAble
=
'满{0}减{1}
元
'
;
const
couponTitleFullDiscountNoAmoutLimit
=
'全场{0}折'
;
const
couponTitleFullDiscount
=
'满{0}享{1}折'
;
const
couponTitleFullForCoupon
=
'满{0}送券'
;
...
...
application/models/Business/Coupon/CouponService.php
View file @
45212853
...
...
@@ -67,9 +67,6 @@ class CouponServiceModel extends \Business\AbstractModel{
$temp
[
'title'
]
=
\Our\DescribeConst
::
giftCoupon
;
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullForGift
,
$orderAmount
);
}
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'subTitle'
]
=
\Our\DescribeConst
::
couponGoodsName
.
$temp
[
'subTitle'
];
}
$temp
[
'storeId'
]
=
$coupon
[
'store_id'
];
if
(
$temp
[
'storeId'
]){
$storeInfo
=
$storeDao
->
get
(
$temp
[
'storeId'
],
false
);
//\Our\RedisHelper::cachedFunction(\Redis\Db6\StoreRedisModel::getInstance(),array(&$storeDao, 'getInfoById'),array($temp['storeId'],'store_name'),\Our\ApiConst::oneHour);
...
...
@@ -132,9 +129,6 @@ class CouponServiceModel extends \Business\AbstractModel{
$result
[
'title'
]
=
\Our\DescribeConst
::
giftCoupon
;
$result
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullForGift
,
$orderAmount
);
}
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$result
[
'subTitle'
]
=
\Our\DescribeConst
::
couponGoodsName
.
$result
[
'subTitle'
];
}
$result
[
'useMemo'
]
=
$coupon
[
'use_memo'
];
$result
[
'isGet'
]
=
\Our\ApiConst
::
zero
;
$result
[
'couponType'
]
=
intval
(
$coupon
[
'type'
]);
...
...
@@ -360,7 +354,7 @@ class CouponServiceModel extends \Business\AbstractModel{
$couponTitles
=
array
();
foreach
(
$couponTitleArray
as
$coupon
){
if
(
$coupon
[
'type'
]
==
\Our\ApiConst
::
noLimitCouponType
){
$couponTitles
[]
=
$coupon
[
'title'
]
.
\Our\DescribeConst
::
noLimitGoodsCouponName
;
$couponTitles
[]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
noLimitGoodsCouponName
,
$coupon
[
'title'
])
;
}
else
if
(
$coupon
[
'type'
]
==
\Our\ApiConst
::
fullMinusCouponType
){
$couponTitles
[]
=
str_replace
(
\Our\DescribeConst
::
available
,
\Our\DescribeConst
::
minus
.
$coupon
[
'title'
],
$coupon
[
'subTitle'
]);
}
else
{
...
...
application/models/Business/Order/OrderService.php
View file @
45212853
...
...
@@ -1031,9 +1031,6 @@ class OrderServiceModel extends \Business\AbstractModel
$temp
[
'title'
]
=
\Our\DescribeConst
::
specialCoupon
;
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullForGift
,
$orderAmount
);
}
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'subTitle'
]
=
\Our\DescribeConst
::
couponGoodsName
.
$temp
[
'subTitle'
];
}
$temp
[
'storeId'
]
=
$coupon
[
'store_id'
];
if
(
$temp
[
'storeId'
])
{
$storeInfo
=
$storeDao
->
get
(
$temp
[
'storeId'
],
false
);
...
...
application/models/DAO/Coupon/Coupon.php
View file @
45212853
...
...
@@ -225,9 +225,6 @@ class CouponModel extends \DAO\AbstractModel {
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForGiftCouponType
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullForGift
,
$orderAmount
);
}
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'title'
]
=
\Our\DescribeConst
::
couponGoodsName
.
$temp
[
'title'
];
}
$result
[]
=
$temp
;
}
return
$result
;
...
...
@@ -265,7 +262,7 @@ class CouponModel extends \DAO\AbstractModel {
$temp
[
'gift_goods_ids'
]
=
isset
(
$coupon
[
'gift_goods_ids'
])
?
$coupon
[
'gift_goods_ids'
]
:
\Our\NameConst
::
emptyString
;
$orderAmount
=
intval
(
$coupon
[
'order_amount'
]);
if
(
$coupon
[
'type'
]
==
\Our\ApiConst
::
noLimitCoupon
){
//无门槛优惠券
$temp
[
'title'
]
=
intval
(
$coupon
[
'cash_money'
])
.
\Our\DescribeConst
::
noLimitGoodsCouponName
;
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
noLimitGoodsCouponName
,
intval
(
$coupon
[
'cash_money'
]))
;
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullMinusCouponType
){
//满额减免券
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullAvailAble
,
$orderAmount
,
intval
(
$coupon
[
'cash_money'
]));
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
discountCouponType
){
...
...
@@ -283,9 +280,6 @@ class CouponModel extends \DAO\AbstractModel {
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForGiftCouponType
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullForGift
,
$orderAmount
);
}
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'title'
]
=
\Our\DescribeConst
::
couponGoodsName
.
$temp
[
'title'
];
}
$result
[
$coupon
[
'id'
]]
=
$temp
;
}
...
...
@@ -333,9 +327,6 @@ class CouponModel extends \DAO\AbstractModel {
$temp
[
'title'
]
=
\Our\DescribeConst
::
giftCoupon
;
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullForGift
,
$orderAmount
);
}
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'subTitle'
]
=
\Our\DescribeConst
::
couponGoodsName
.
$temp
[
'subTitle'
];
}
$temp
[
'title'
]
=
$temp
[
'title'
]
.
''
;
if
(
$timeFlag
){
$temp
[
'startTime'
]
=
$coupon
[
'start_time'
];
...
...
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