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
1e032787
Commit
1e032787
authored
Feb 16, 2019
by
chenchuanwen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of tui.shenbd.com:api-project-dev/api.shenbd.com into ccw
parents
04b9cc44
c1079899
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
5 deletions
+23
-5
Index.php
application/controllers/Index.php
+18
-3
ShopkeeperService.php
application/models/Business/Store/ShopkeeperService.php
+5
-2
No files found.
application/controllers/Index.php
View file @
1e032787
...
@@ -130,17 +130,32 @@ class IndexController extends \Our\Controller_Abstract {
...
@@ -130,17 +130,32 @@ class IndexController extends \Our\Controller_Abstract {
}
}
public
function
getSendHtmlAction
(){
public
function
getSendHtmlAction
(){
$req
=
$this
->
getRequest
()
->
getQuery
();
$req
=
$this
->
getRequest
()
->
getQuery
();
if
(
empty
(
$req
[
'
params
'
]
)){
if
(
empty
(
$req
[
'
cacheKey
'
]
)){
echo
'error'
;
exit
;
echo
'error'
;
exit
;
}
}
$params
=
base64_decode
(
$req
[
'params'
]);
$this
->
memberDb0Redis
=
\Redis\Db0\MemberRedisModel
::
getInstance
();
$res
=
$this
->
memberDb0Redis
->
tableCacheGet
(
$req
[
'cacheKey'
]);
$params
=
unserialize
(
$res
);
$params
=
base64_decode
(
$params
);
$params
=
\Our\Common
::
paramToJson
(
$params
);
$params
=
\Our\Common
::
paramToJson
(
$params
);
$shareService
=
\Business\User\ShareServiceModel
::
getInstance
();
$shareService
=
\Business\User\ShareServiceModel
::
getInstance
();
$params
[
'id'
]
=
$params
[
'storeId'
];
$params
[
'id'
]
=
$params
[
'storeId'
];
$params
[
'qrCode'
]
=
$shareService
->
getQrUrl
(
$params
);
$params
[
'qrCode'
]
=
$shareService
->
getQrUrl
(
$params
);
$this
->
_view
->
assign
(
"params"
,
$params
);
$this
->
_view
->
assign
(
"params"
,
$params
);
}
}
// public function getSendHtmlAction(){
// $req=$this->getRequest()->getQuery();
// if(empty($req['params'] )){
// echo 'error';exit;
// }
// $params=base64_decode($req['params']);
// $params=\Our\Common::paramToJson($params);
// $shareService=\Business\User\ShareServiceModel::getInstance();
// $params['id']=$params['storeId'];
// $params['qrCode']=$shareService->getQrUrl($params);
// $this->_view->assign("params", $params);
//
// }
public
function
getOpenHtmlAction
(){
public
function
getOpenHtmlAction
(){
$req
=
$this
->
getRequest
()
->
getQuery
();
$req
=
$this
->
getRequest
()
->
getQuery
();
if
(
empty
(
$req
[
'params'
]
)){
if
(
empty
(
$req
[
'params'
]
)){
...
...
application/models/Business/Store/ShopkeeperService.php
100755 → 100644
View file @
1e032787
...
@@ -70,14 +70,17 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
...
@@ -70,14 +70,17 @@ class ShopkeeperServiceModel extends \Business\AbstractModel
$storeFavariteCount
=
$favoritesStoreDao
->
getFavoritesCountByStoreIdCache
(
$storeId
);
$storeFavariteCount
=
$favoritesStoreDao
->
getFavoritesCountByStoreIdCache
(
$storeId
);
$todayTotalOnline
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$orderDao
,
'getOrderOrderTotalOnlineByStoreId'
),
array
(
$storeId
,
true
),
ApiConst
::
oneDaySecond
,
array
(
$storeId
));
$todayTotalOnline
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$orderDao
,
'getOrderOrderTotalOnlineByStoreId'
),
array
(
$storeId
,
true
),
ApiConst
::
oneDaySecond
,
array
(
$storeId
));
$orderTotalOnline
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$storeStaticDao
,
'getByStoreId'
),
array
(
$storeId
),
ApiConst
::
oneDaySecond
,
array
(
$storeId
));;
$orderTotalOnline
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$storeStaticDao
,
'getByStoreId'
),
array
(
$storeId
),
ApiConst
::
oneDaySecond
,
array
(
$storeId
));;
$commonDAO
=
\DAO\GoodsCommonModel
::
getInstance
();
$count
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsCommonRedisModel
::
getInstance
(),
array
(
&
$commonDAO
,
'getCount'
),
array
(
array
(
'store_id'
=>
$storeId
)),
\Our\ApiConst
::
oneDaySecond
);
$orderTotalOnline
=
$orderTotalOnline
[
'orderTotalOnline'
]
?
$orderTotalOnline
[
'orderTotalOnline'
]
:
ApiConst
::
zero
;
$orderTotalOnline
=
$orderTotalOnline
[
'orderTotalOnline'
]
?
$orderTotalOnline
[
'orderTotalOnline'
]
:
ApiConst
::
zero
;
$goodsCount
=
$totalOrderCount
[
'orderGoodsCount'
];
$goodsCount
=
$totalOrderCount
[
'orderGoodsCount'
];
$orderTotal
=
$totalOrderCount
[
'orderTotal'
];
$orderTotal
=
$totalOrderCount
[
'orderTotal'
];
$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'
]
=
$goodsCount
?
$goodsCount
:
ApiConst
::
zero
;
// $data['goodsCount'] = $goodsCount?$goodsCount:ApiConst::zero;
$data
[
'goodsCount'
]
=
(
int
)
$data
[
'goodsCount'
];
//$data['goodsCount']=(int)$data['goodsCount'];
$data
[
'goodsCount'
]
=
$count
;
$data
[
'orderCount'
]
=
$storeStats
[
'orderCount'
];
$data
[
'orderCount'
]
=
$storeStats
[
'orderCount'
];
$data
[
'orderTotal'
]
=
$orderTotal
?
$orderTotal
:
ApiConst
::
zero
;
$data
[
'orderTotal'
]
=
$orderTotal
?
$orderTotal
:
ApiConst
::
zero
;
$data
[
'orderTotal'
]
=
(
int
)
$data
[
'orderTotal'
];
$data
[
'orderTotal'
]
=
(
int
)
$data
[
'orderTotal'
];
...
...
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