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
4f209fbf
Commit
4f209fbf
authored
Aug 23, 2018
by
zhz
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev
parents
ff0d75c7
524ba214
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
8 deletions
+24
-8
Shopkeeper.php
application/controllers/Shopkeeper.php
+0
-3
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+3
-3
Goods.php
application/models/DAO/Goods.php
+5
-2
Member.php
application/models/DAO/Member.php
+2
-0
Order.php
application/models/DAO/Order/Order.php
+3
-0
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+4
-0
StoreStatisticsDay.php
application/models/DAO/Store/StoreStatisticsDay.php
+7
-0
No files found.
application/controllers/Shopkeeper.php
View file @
4f209fbf
...
...
@@ -31,9 +31,6 @@ class ShopkeeperController extends \Our\Controller_AbstractApi {
public
function
indexAction
()
{
$result
=
$this
->
shopkeeperService
->
getShopkeeper
(
$this
->
memberId
);
$this
->
success
(
$result
);
if
(
$result
){
$this
->
success
(
array
(),
\Our\DescribeConst
::
successMessage
,
\Our\DescribeConst
::
successMessage
);
}
}
/**
...
...
application/models/Business/Store/ShopkeeperService.php
View file @
4f209fbf
...
...
@@ -45,7 +45,6 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
public
function
getStatistics
(
$memberId
)
{
$storeId
=
$this
->
_getStoreByMemberId
(
$memberId
);
$storeStatisticsDayDao
=
\DAO\Store\StoreStatisticsDayModel
::
getInstance
();
$storeStatisticsDao
=
\DAO\StoreStatisticsModel
::
getInstance
();
$condition
[
'store_id'
]
=
$storeId
;
...
...
@@ -54,7 +53,8 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
//获取店铺数据统计
$storeStats
=
$storeStatisticsDao
->
find
(
$condition
);
//获取店铺今日销售额和订单量
$storeTodayStats
=
$storeStatisticsDayDao
->
getById
(
$storeId
);
$today
=
date
(
'Y-m-d'
,
TIMESTAMP
);
$storeTodayStats
=
$storeStatisticsDayDao
->
getByStoreIdAndGmtCreate
(
$storeId
,
$today
);
$data
[
'storeId'
]
=
$store
[
'store_id'
];
$data
[
'storeName'
]
=
$store
[
'store_name'
];
$data
[
'storeLabel'
]
=
$store
[
'store_label'
];
...
...
@@ -96,7 +96,7 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
public
function
getShopkeeper
(
$memberId
)
{
$data
=
$this
->
getStatistics
(
$memberId
);
$data
[
'storeClassStats'
]
=
$this
->
getSalaList
(
$data
[
'storeId'
]);
//
$data['storeClassStats'] = $this->getSalaList($data['storeId']);
return
$data
;
}
...
...
application/models/DAO/Goods.php
View file @
4f209fbf
...
...
@@ -3,6 +3,7 @@
namespace
DAO
;
use
Our\ApiConst
;
use
Our\Common
;
use
Our\CommonExtension
;
...
...
@@ -379,8 +380,10 @@ class GoodsModel extends \DAO\AbstractModel {
//ccw
public
function
convert
(
$goodses
,
$extentField
=
false
){
foreach
(
$goodses
as
&
$goods
){
if
(
!
empty
(
$extentField
)
||
empty
(
$goods
[
'refundStateName'
])){
$goods
[
'refundStateName'
]
=
$extentField
;
if
(
$goods
[
'refundId'
]
==
ApiConst
::
zero
){
if
((
!
empty
(
$extentField
)
||
empty
(
$goods
[
'refundStateName'
]))
){
$goods
[
'refundStateName'
]
=
$extentField
;
}
}
$goods
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$goods
[
'goodsImage'
],
\Our\ApiConst
::
goodsSmallSize
);
if
(
$goods
[
'goodsSpec'
]){
...
...
application/models/DAO/Member.php
View file @
4f209fbf
...
...
@@ -335,6 +335,8 @@ class MemberModel extends \DAO\AbstractModel
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
wrongMobileFormat
);
}
$member
=
$this
->
getOneByWhereWithField
(
array
(
'member_mobile'
=>
$mobile
),
'member_id'
);
\Our\Log
::
getInstance
()
->
write
(
$this
->
db
->
getLastSql
());
\Our\Log
::
getInstance
()
->
write
(
json_encode
(
$member
,
true
));
if
(
$member
)
{
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
registerMobileExist
);
}
...
...
application/models/DAO/Order/Order.php
View file @
4f209fbf
...
...
@@ -708,7 +708,10 @@ class OrderModel extends \DAO\AbstractModel
}
if
(
!
empty
(
$orderId
)){
$this
->
deleteFindByOrderIdCache
(
$orderId
);
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderGoodsDao
->
deleteOrderGoodsCache
(
$orderId
);
}
}
//任务脚本方法
public
function
getOrdersByOrderState
(
$orderState
,
$timeField
=
'add_time'
,
$timeLimit
=
ApiConst
::
orderStateWaitConfirmBeyond
,
$field
=
'*'
,
$shippingTypes
=
false
)
...
...
application/models/DAO/Order/OrderGoods.php
View file @
4f209fbf
...
...
@@ -99,6 +99,10 @@ class OrderGoodsModel extends \DAO\AbstractModel {
}
return
$this
->
getOrderGoods
(
$where
,
$field
);
}
public
function
deleteOrderGoodsCache
(
$orderIds
){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$orderIds
));
}
public
function
getIsRefundMoney
(
$orderGoodses
,
$promotionsId
){
$isRefundMoney
=
ApiConst
::
zero
;
foreach
(
$orderGoodses
as
$orderGood
){
...
...
application/models/DAO/Store/StoreStatisticsDay.php
View file @
4f209fbf
...
...
@@ -44,6 +44,12 @@ class StoreStatisticsDayModel extends \DAO\AbstractModel {
return
$data
;
}
public
function
getByStoreIdAndGmtCreate
(
$storeId
,
$gmtCreate
){
$where
[
'store_id'
]
=
$storeId
;
$where
[
'gmt_create'
]
=
$gmtCreate
;
$res
=
$this
->
find
(
$where
);
return
$res
;
}
public
function
getById
(
$id
){
$where
[
'id'
]
=
$id
;
...
...
@@ -160,6 +166,7 @@ class StoreStatisticsDayModel extends \DAO\AbstractModel {
return
self
::
$_instance
;
}
/**
* 获取字段
* @return array
...
...
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