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
51e8932d
Commit
51e8932d
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
31fcf7f8
e09c9756
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
3 deletions
+18
-3
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+3
-1
Order.php
application/models/DAO/Order/Order.php
+3
-0
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+12
-2
No files found.
application/models/Business/Store/ShopkeeperService.php
View file @
51e8932d
...
@@ -53,6 +53,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -53,6 +53,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
// $storeStatisticsDao = \DAO\StoreStatisticsModel::getInstance();
// $storeStatisticsDao = \DAO\StoreStatisticsModel::getInstance();
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
();
$orderDao
=
\DAO\Order\OrderModel
::
getInstance
();
$favoritesStoreDao
=
\DAO\FavoritesStoreModel
::
getInstance
();
$favoritesStoreDao
=
\DAO\FavoritesStoreModel
::
getInstance
();
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$goodsCount
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'getOrderGoodsCountByStoreId'
),
array
(
$storeId
),
ApiConst
::
tenDaySecond
,
array
(
$storeId
));
$condition
[
'store_id'
]
=
$storeId
;
$condition
[
'store_id'
]
=
$storeId
;
//获取店铺信息
//获取店铺信息
$store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
->
storeDao
,
'getInfo'
),
array
(
$condition
),
ApiConst
::
tenDaySecond
,
array
(
$storeId
));
$store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$this
->
storeDao
,
'getInfo'
),
array
(
$condition
),
ApiConst
::
tenDaySecond
,
array
(
$storeId
));
...
@@ -64,7 +66,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -64,7 +66,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$data
[
'storeId'
]
=
$store
[
'store_id'
];
$data
[
'storeId'
]
=
$store
[
'store_id'
];
$data
[
'storeName'
]
=
$store
[
'store_name'
];
$data
[
'storeName'
]
=
$store
[
'store_name'
];
$data
[
'storeLabel'
]
=
$store
[
'store_label'
];
$data
[
'storeLabel'
]
=
$store
[
'store_label'
];
$data
[
'goodsCount'
]
=
ApiConst
::
zero
;
$data
[
'goodsCount'
]
=
$goodsCount
;
$data
[
'orderCount'
]
=
$storeStats
[
'orderCount'
];
$data
[
'orderCount'
]
=
$storeStats
[
'orderCount'
];
$data
[
'orderTotal'
]
=
$storeStats
[
'orderTotal'
];
$data
[
'orderTotal'
]
=
$storeStats
[
'orderTotal'
];
$data
[
'favCount'
]
=
$storeFavariteCount
[
'favCount'
];
$data
[
'favCount'
]
=
$storeFavariteCount
[
'favCount'
];
...
...
application/models/DAO/Order/Order.php
View file @
51e8932d
...
@@ -800,7 +800,10 @@ class OrderModel extends \DAO\AbstractModel
...
@@ -800,7 +800,10 @@ class OrderModel extends \DAO\AbstractModel
if
(
$deleteGetFavoritesCountByStoreId
)
{
if
(
$deleteGetFavoritesCountByStoreId
)
{
$favoritesStoreDao
=
\DAO\FavoritesStoreModel
::
getInstance
();
$favoritesStoreDao
=
\DAO\FavoritesStoreModel
::
getInstance
();
$favoritesStoreDao
->
deleteGetFavoritesCountByStoreId
(
$stroeId
);
$favoritesStoreDao
->
deleteGetFavoritesCountByStoreId
(
$stroeId
);
}
}
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderGoodsDao
->
deleteOrderGoodsCache
(
$memberId
,
$orderId
,
$stroeId
);
}
}
if
(
!
empty
(
$diliverymanId
)){
if
(
!
empty
(
$diliverymanId
)){
...
...
application/models/DAO/Order/OrderGoods.php
100755 → 100644
View file @
51e8932d
...
@@ -28,6 +28,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
...
@@ -28,6 +28,7 @@ class OrderGoodsModel extends \DAO\AbstractModel {
*/
*/
protected
$_primaryKey
=
'rec_id'
;
protected
$_primaryKey
=
'rec_id'
;
public
$orderGoodsGoodsNumCountField
=
" sum(goods_num) as goodsNum"
;
public
function
init
(){
public
function
init
(){
...
@@ -57,10 +58,16 @@ class OrderGoodsModel extends \DAO\AbstractModel {
...
@@ -57,10 +58,16 @@ class OrderGoodsModel extends \DAO\AbstractModel {
}
}
public
function
getOrderGoods
(
$where
,
$field
,
$db
=
DbNameConst
::
salveDBConnectName
){
public
function
getOrderGoods
(
$where
,
$field
,
$db
=
DbNameConst
::
salveDBConnectName
){
$this
->
setDb
(
$
db
);
$this
->
setDb
(
$
this
->
dbName
);
$list
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
$list
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
return
$list
;
return
$list
;
}
}
public
function
getOrderGoodsCountByStoreId
(
$storeId
){
$this
->
setDb
(
$this
->
dbName
);
$where
[
'storeId'
]
=
$storeId
;
$goodsCount
=
$this
->
db
->
select
(
$this
->
orderGoodsGoodsNumCountField
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchNum
();
return
$goodsCount
;
}
/**
/**
* 获取单条数据
* 获取单条数据
* @param $where
* @param $where
...
@@ -100,13 +107,16 @@ class OrderGoodsModel extends \DAO\AbstractModel {
...
@@ -100,13 +107,16 @@ class OrderGoodsModel extends \DAO\AbstractModel {
return
$this
->
getOrderGoods
(
$where
,
$field
);
return
$this
->
getOrderGoods
(
$where
,
$field
);
}
}
public
function
deleteOrderGoodsCache
(
$memberId
,
$orderIds
){
public
function
deleteOrderGoodsCache
(
$memberId
,
$orderIds
,
$storeId
=
false
){
if
(
$memberId
){
if
(
$memberId
){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$memberId
));
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$memberId
));
}
}
if
(
$orderIds
){
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
));
}
}
if
(
!
empty
(
$storeId
)){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsCountByStoreId'
),
array
(
$storeId
));
}
}
}
public
function
getIsRefundMoney
(
$orderGoodses
,
$promotionsId
){
public
function
getIsRefundMoney
(
$orderGoodses
,
$promotionsId
){
$isRefundMoney
=
ApiConst
::
zero
;
$isRefundMoney
=
ApiConst
::
zero
;
...
...
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