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
14a4ba60
Commit
14a4ba60
authored
Dec 29, 2018
by
chenchuanwen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'zhz' of git.shenbd.com:qm-develop/shenbd
parents
252d622a
ccafa82a
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
151 additions
and
2 deletions
+151
-2
Goods.php
application/controllers/Goods.php
+1
-1
SmsTemplateConst.php
application/library/Our/SmsTemplateConst.php
+8
-0
StoreService.php
application/models/Business/Store/StoreService.php
+9
-1
QmStoreRegister.php
application/models/DAO/Store/QmStoreRegister.php
+63
-0
StorePayment.php
application/models/DAO/Store/StorePayment.php
+57
-0
SettingRedis.php
application/models/Redis/Db1/SettingRedis.php
+3
-0
pendingItemsInform.php
scripts/crontab/store/pendingItemsInform.php
+10
-0
No files found.
application/controllers/Goods.php
View file @
14a4ba60
...
...
@@ -42,7 +42,7 @@ class GoodsController extends \Our\Controller_AbstractIndex {
public
function
testAction
(){
//$info = $this->goodsService->recommend();
//\Business\Goods\GoodsCommonServiceModel::getInstance()->saleGoods();
\Business\
Goods\EvaluationServiceModel
::
getInstance
()
->
autoEvaluate
();
\Business\
Store\StoreServiceModel
::
getInstance
()
->
pendingItemsInform
();
}
public
function
getAttrsAction
(){
...
...
application/library/Our/SmsTemplateConst.php
View file @
14a4ba60
...
...
@@ -81,6 +81,14 @@ class SmsTemplateConst{
'storename'
,
'reason'
)
),
//目前共有${storeCount}家商户注册待审核,${weiCount}家微信支付待处理状态(需结合微信服务商状态)。
'storeWaitCheck'
=>
array
(
'templateId'
=>
'SMS_153996044'
,
'parameters'
=>
array
(
'storeCount'
,
'weiCount'
)
)
);
...
...
application/models/Business/Store/StoreService.php
View file @
14a4ba60
...
...
@@ -1230,7 +1230,15 @@ class StoreServiceModel extends \Business\AbstractModel{
public
function
updateStoreTotalDeposit
(){
\DAO\StoreModel
::
getInstance
()
->
updateStoreDeposit
();
}
public
function
pendingItemsInform
()
{
$storePaymentDao
=
\DAO\Store\StorePaymentModel
::
getInstance
();
$weiCount
=
$storePaymentDao
->
getStorePaymentCount
(
array
(
'payment_type'
=>
0
,
'status'
=>
0
));
$storeRegisterDao
=
\DAO\Store\QmStoreRegisterModel
::
getInstance
();
$storeCount
=
$storeRegisterDao
->
getWaitCheckCount
(
array
(
'state'
=>
0
));
$settingDAO
=
\DAO\SettingModel
::
getInstance
();
$phone
=
$settingDAO
->
getListCache
(
array
(
'pending_items_inform_tel'
))[
'pending_items_inform_tel'
];
\DAO\ShortMessageModel
::
getInstance
()
->
sendMessageSmsForPlatform
(
$phone
,
'storeWaitCheck'
,
array
(
'storeCount'
=>
$storeCount
,
'weiCount'
=>
$weiCount
));
}
/**
*/
private
static
$_instance
=
null
;
...
...
application/models/DAO/Store/QmStoreRegister.php
0 → 100644
View file @
14a4ba60
<?php
namespace
DAO\Store
;
class
QmStoreRegisterModel
extends
\DAO\AbstractModel
{
/**
* 表名
*
* @var string
*/
protected
$_tableName
=
'han_qm_store_register'
;
/**
* 主键
*
* @var string
*/
protected
$_primaryKey
=
'register_id'
;
public
function
init
()
{
}
public
function
getStoreRegisterCount
(
$where
)
{
return
$this
->
getCountByWhere
(
$where
);
}
public
function
getWaitCheckCount
(
$where
)
{
$this
->
setDb
(
$this
->
dbName
);
$result
=
$this
->
db
->
select
(
'count(DISTINCT han_qm_store_register.register_id) AS count'
)
->
from
(
$this
->
_tableName
)
->
join
(
'han_qm_store_register_file'
,
'han_qm_store_register.register_id = han_qm_store_register_file.register_id'
,
'inner'
)
->
where
(
$where
)
->
fetchAll
();
return
$result
?
$result
[
0
][
'count'
]
:
0
;
}
/**
* 类实例
*
* @var \DAO\UserModel
*/
private
static
$_instance
=
null
;
/**
* 获取类实例
*
* @return \DAO\UserModel
*/
public
static
function
getInstance
(
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
)
{
if
(
!
(
self
::
$_instance
instanceof
self
))
{
self
::
$_instance
=
new
self
(
$dbName
);
}
return
self
::
$_instance
;
}
}
application/models/DAO/Store/StorePayment.php
0 → 100644
View file @
14a4ba60
<?php
namespace
DAO\Store
;
class
StorePaymentModel
extends
\DAO\AbstractModel
{
/**
* 表名
*
* @var string
*/
protected
$_tableName
=
'han_store_payment'
;
/**
* 主键
*
* @var string
*/
protected
$_primaryKey
=
'payment_id'
;
public
function
init
()
{
}
public
function
getStorePaymentCount
(
$where
)
{
return
$this
->
getCountByWhere
(
$where
);
}
/**
* 类实例
*
* @var \DAO\UserModel
*/
private
static
$_instance
=
null
;
/**
* 获取类实例
*
* @return \DAO\UserModel
*/
public
static
function
getInstance
(
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
)
{
if
(
!
(
self
::
$_instance
instanceof
self
))
{
self
::
$_instance
=
new
self
(
$dbName
);
}
return
self
::
$_instance
;
}
}
application/models/Redis/Db1/SettingRedis.php
100755 → 100644
View file @
14a4ba60
...
...
@@ -80,6 +80,9 @@ class SettingRedisModel extends \Redis\Db1\AbstractModel {
public
function
tableKeyExists
(
$h
){
return
$this
->
exists
(
$this
->
calcKey
(
$h
));
}
public
function
tableHGAll
(
$h
){
return
$this
->
hGetAll
(
$this
->
calcKey
(
$h
));
}
/**
* 类实例
*
...
...
scripts/crontab/store/pendingItemsInform.php
0 → 100644
View file @
14a4ba60
<?php
/**
* 待办事务提醒
* 执行时间:8:50~11:00~15:00~17:30
*/
define
(
"APPLICATION_PATH"
,
realpath
(
dirname
(
__FILE__
)
.
'/../../../'
));
//指向public的上一级
require
APPLICATION_PATH
.
'/scripts/crontab/common.php'
;
\Business\Store\StoreServiceModel
::
getInstance
()
->
pendingItemsInform
();
echo
'发送成功'
;
\ No newline at end of file
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