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
78d23518
Commit
78d23518
authored
Sep 29, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw
parents
3c90cc9a
d6b59222
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
39 additions
and
18 deletions
+39
-18
Store.php
application/controllers/Store.php
+2
-2
DescribeConst.php
application/library/Our/DescribeConst.php
+5
-3
CouponService.php
application/models/Business/Coupon/CouponService.php
+11
-3
OrderService.php
application/models/Business/Order/OrderService.php
+5
-1
Coupon.php
application/models/DAO/Coupon/Coupon.php
+16
-4
GoodsBrowse.php
application/models/DAO/GoodsBrowse.php
+0
-5
No files found.
application/controllers/Store.php
View file @
78d23518
...
...
@@ -10,10 +10,10 @@ class StoreController extends \Our\Controller_AbstractIndex {
$this
->
memberId
=
$this
->
sess
->
get
(
'member_id'
);
}
/**
* 获取店铺首页头部
(公用)
* 获取店铺首页头部
*/
public
function
getStoreInfoAction
(){
$address
=
\Business\User\AddressServiceModel
::
getInstance
()
->
getMyAddress
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
);
$address
=
\Business\User\AddressServiceModel
::
getInstance
()
->
getMyAddress
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
,
false
);
$storeInfo
=
$this
->
storeService
->
getStoreInfo
(
$this
->
req
[
\Our\NameConst
::
data
],
$this
->
memberId
,
$address
);
$storeInfo
[
'share'
]
=
\Business\Common\CommonServiceModel
::
getInstance
()
->
getShareInfo
(
\Our\ApiConst
::
shareStore
,
$this
->
req
[
\Our\NameConst
::
data
][
'storeId'
]);
$this
->
success
(
$storeInfo
);
...
...
application/library/Our/DescribeConst.php
View file @
78d23518
...
...
@@ -109,21 +109,23 @@ 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}送券'
;
const
couponTitleFullForGift
=
'满{0}送礼品'
;
const
couponDiscount
=
'{0}折'
;
const
couponGoodsName
=
'指定商品'
;
//平台介入
const
unagreeSellerProccess
=
'对商家处理不满意'
;
//添加日志的角色
...
...
application/models/Business/Coupon/CouponService.php
View file @
78d23518
...
...
@@ -54,7 +54,11 @@ class CouponServiceModel extends \Business\AbstractModel{
if
(
$orderAmount
>
0
){
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponDiscount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
}
}
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
){
$temp
[
'title'
]
=
\Our\DescribeConst
::
specialCoupon
;
...
...
@@ -112,7 +116,11 @@ class CouponServiceModel extends \Business\AbstractModel{
if
(
$orderAmount
>
0
){
$result
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
{
$result
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$result
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponDiscount
,
$coupon
[
'discount'
]);
}
else
{
$result
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
}
}
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
){
$result
[
'title'
]
=
\Our\DescribeConst
::
specialCoupon
;
...
...
@@ -346,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 @
78d23518
...
...
@@ -1018,7 +1018,11 @@ class OrderServiceModel extends \Business\AbstractModel
if
(
$orderAmount
>
0
){
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponDiscount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
}
}
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
)
{
$temp
[
'title'
]
=
\Our\DescribeConst
::
specialCoupon
;
...
...
application/models/DAO/Coupon/Coupon.php
View file @
78d23518
...
...
@@ -214,7 +214,11 @@ class CouponModel extends \DAO\AbstractModel {
if
(
$orderAmount
>
0
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponDiscount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
}
}
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullForCoupon
,
$orderAmount
);
...
...
@@ -258,14 +262,18 @@ 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
){
if
(
$orderAmount
>
0
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponDiscount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
}
}
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
){
$temp
[
'title'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponFullForCoupon
,
$orderAmount
);
...
...
@@ -306,7 +314,11 @@ class CouponModel extends \DAO\AbstractModel {
if
(
$orderAmount
>
0
){
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscount
,
$orderAmount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
if
(
in_array
(
$coupon
[
'type'
],
array
(
\Our\ApiConst
::
goodsCoupon
,
\Our\ApiConst
::
goodsClassCoupon
))){
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponDiscount
,
$coupon
[
'discount'
]);
}
else
{
$temp
[
'subTitle'
]
=
\Our\Common
::
format
(
\Our\DescribeConst
::
couponTitleFullDiscountNoAmoutLimit
,
$coupon
[
'discount'
]);
}
}
}
else
if
(
$coupon
[
'coupon_type'
]
==
\Our\ApiConst
::
fullForCouponCouponType
){
$temp
[
'title'
]
=
\Our\DescribeConst
::
specialCoupon
;
...
...
application/models/DAO/GoodsBrowse.php
View file @
78d23518
...
...
@@ -91,11 +91,6 @@ class GoodsBrowseModel extends \DAO\AbstractModel {
public
function
getDistinctDate
(
$member_id
,
$startTime
,
$endTime
,
$order
){
$this
->
setDb
();
$data
=
$this
->
db
->
select
(
'DISTINCT browsedate'
)
->
from
(
$this
->
_tableName
)
->
where
(
"member_id=
{
$member_id
}
"
)
->
where
(
"browsedate BETWEEN
{
$startTime
}
AND
{
$endTime
}
"
)
->
order
(
$order
[
0
],
$order
[
1
])
->
fetchAll
();
if
(
$data
)
{
foreach
(
$data
as
&
$v
)
{
$v
[
'browsedate'
]
=
(
int
)
$v
[
'browsedate'
];
}
}
return
$data
;
}
public
function
delete
(
$where
){
...
...
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