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
ee64dc27
Commit
ee64dc27
authored
Sep 07, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into lyz
parents
6fc2a7a8
8b7ae5c9
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
24 additions
and
13 deletions
+24
-13
ApiConst.php
application/library/Our/ApiConst.php
+1
-1
NameConst.php
application/library/Our/NameConst.php
+1
-1
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+12
-2
RefundService.php
application/models/Business/Order/RefundService.php
+3
-2
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+1
-1
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+6
-6
No files found.
application/library/Our/ApiConst.php
View file @
ee64dc27
...
...
@@ -11,7 +11,7 @@ class ApiConst
const
randLengh
=
8
;
//10天数秒
const
tenDaySecond
=
86400
;
const
tenDaySecond
=
86400
0
;
//const tenDaySecond = 300;
//一天
const
oneDaySecond
=
86400
;
...
...
application/library/Our/NameConst.php
100755 → 100644
View file @
ee64dc27
...
...
@@ -156,7 +156,7 @@ class NameConst {
const
rightBracket
=
']'
;
const
elasticName
=
'elastic.master'
;
const
shopkeeper
=
'
orders
'
;
const
shopkeeper
=
'
shenbdindex
'
;
const
cancelUnPayedOrderTimePrefix
=
'cancelUnPayedOrderTime'
;
const
cancelUnReceivedOrderTimePrefix
=
'cancelUnReceivedOrderTime'
;
...
...
application/models/Business/Goods/GoodsCommonService.php
View file @
ee64dc27
...
...
@@ -350,14 +350,24 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
//商品图片表
$goodsImagesInstance
=
\DAO\GoodsImagesModel
::
getInstance
();
$image
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsImagesRedisModel
::
getInstance
(),
array
(
&
$goodsImagesInstance
,
'getListByCommonId'
),
array
(
$goodsCommonId
,
'attr_name,attr_value,goods_image'
),
\Our\ApiConst
::
oneDaySecond
,
array
(
$goodsCommonId
));
$attrImage
=
[];
$images
=
[];
$haveImg
=
false
;
$goodsImageGroup
=
unserialize
(
$commonInfo
[
'goods_image_group'
]);
if
(
$goodsImageGroup
)
{
$haveImg
=
true
;
foreach
(
$goodsImageGroup
as
$v
)
{
$images
[]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$v
,
\Our\ImageConst
::
goodsDetailImgSize
);
}
}
$attrImage
=
[];
if
(
$image
&&
is_array
(
$image
)){
$i
=
0
;
foreach
(
$image
as
$k
=>
$v
){
$image
[
$k
][
'goods_image'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$v
[
'goods_image'
],
\Our\ImageConst
::
SpecSelectGoodsImgSize
);
$attrImage
[
$v
[
'attr_name'
]][
$v
[
'attr_value'
]][]
=
$image
[
$k
][
'goods_image'
];
if
(
$i
<
5
){
if
(
$i
<
5
&&
!
$haveImg
){
$images
[]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$v
[
'goods_image'
],
\Our\ImageConst
::
goodsDetailImgSize
);
}
$i
+=
1
;
...
...
application/models/Business/Order/RefundService.php
View file @
ee64dc27
...
...
@@ -398,14 +398,15 @@ class RefundServiceModel extends \Business\AbstractModel
$refundArrayUnLine
=
Common
::
convertUnderline
(
$refundArray
);
$state
=
$refundReturnDao
->
addRefundReturn
(
$refundArray
,
$orderInfo
,
$orderGoods
);
if
(
$state
)
{
$orderDao
->
deleteOrderCache
(
$memberId
,
$refund
[
'orderId'
],
$refund
[
'storeId'
],
true
);
$refundReturnDao
->
deleteRefundCache
(
$memberId
);
$refundStateName
=
$refundReturnDao
->
getRefundTextStatus
(
$refundArrayUnLine
);
$orderGoodsDao
->
update
(
array
(
'rec_id'
=>
$orderGoods
[
'recId'
]),
array
(
'refund_state_name'
=>
$refundStateName
,
'refund_id'
=>
$state
));
$orderLogDao
->
addRefundOrderLog
(
$orderInfo
[
'orderId'
],
$refundArray
[
'refund_type'
],
DescribeConst
::
buyer
,
$orderInfo
[
'buyerName'
],
$orderInfo
[
'orderState'
]);
if
(
$orderInfo
[
'orderState'
]
==
ApiConst
::
orderStateWaitRecieve
)
{
$orderDao
->
editOrderLock
(
$orderInfo
[
'orderId'
]);
}
$orderDao
->
deleteOrderCache
(
$memberId
,
$orderInfo
[
'orderId'
],
$orderInfo
[
'storeId'
],
true
);
$refundReturnDao
->
deleteRefundCache
(
$memberId
);
return
$state
;
}
else
{
ErrorModel
::
throwException
(
CodeConfigModel
::
refundRefuseByStore
);
...
...
application/models/Business/Store/ShopkeeperService.php
View file @
ee64dc27
...
...
@@ -529,7 +529,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
{
$elasticsTool
=
ElasticsToolModel
::
getInstance
(
'orders'
);
//
$elasticsTool->deleteIndex();
$elasticsTool
->
deleteIndex
();
$indexsFiled
=
array
(
'goodsName'
=>
array
(
'type'
=>
'string'
,
...
...
application/models/DAO/Order/OrderGoods.php
View file @
ee64dc27
...
...
@@ -108,14 +108,14 @@ class OrderGoodsModel extends \DAO\AbstractModel {
}
public
function
deleteOrderGoodsCache
(
$memberId
,
$orderIds
,
$storeId
=
false
){
if
(
$memberId
){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$memberId
));
}
//
if($memberId){
//
return \Our\RedisHelper::delCachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$this, 'getOrderGoodsByOrderIds'), array($memberId));
//
}
if
(
$orderIds
){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$orderIds
));
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$orderIds
)
,
array
(
$orderIds
)
);
}
if
(
!
empty
(
$storeId
)){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsCountByStoreId'
),
array
(
$storeId
));
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsCountByStoreId'
),
array
(
$storeId
)
,
array
(
$storeId
)
);
}
}
public
function
getIsRefundMoney
(
$orderGoodses
,
$promotionsId
){
...
...
@@ -140,7 +140,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
public
function
getRefundOrderGoodsIds
(
$orderGoods
){
$orderGoods
=
array_values
(
$orderGoods
);
for
(
$i
=
ApiConst
::
zero
;
$i
<
count
(
$orderGoods
);
$i
++
){
if
(
$orderGoods
[
$i
][
'
isRefund'
]
==
ApiConst
::
refundSuccess
){
if
(
$orderGoods
[
$i
][
'
refundId'
]
==
ApiConst
::
zero
){
unset
(
$orderGoods
[
$i
]);
}
}
...
...
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