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
e0816322
Commit
e0816322
authored
Aug 30, 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
5daef990
ec008b10
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
61 additions
and
11 deletions
+61
-11
CartService.php
application/models/Business/Cart/CartService.php
+6
-0
AdvService.php
application/models/Business/Common/AdvService.php
+10
-8
StoreService.php
application/models/Business/Store/StoreService.php
+2
-2
AdvMobile.php
application/models/DAO/Adv/AdvMobile.php
+5
-0
QmStoreClass.php
application/models/DAO/QmStoreClass.php
+1
-0
Store.php
application/models/DAO/Store.php
+1
-0
LinkMySQL.php
application/models/Mysql/LinkMySQL.php
+1
-1
AdvMobileRedis.php
application/models/Redis/Db9/AdvMobileRedis.php
+35
-0
No files found.
application/models/Business/Cart/CartService.php
View file @
e0816322
...
...
@@ -491,11 +491,17 @@ class CartServiceModel extends \Business\AbstractModel{
$memberCartKey
=
\Our\NameConst
::
memberCartStorePrefix
.
$memberId
;
$cartRedis
=
\Redis\Db7\CartRedisModel
::
getInstance
();
$cartRedis
->
tableDel
(
$memberCartKey
);
$FavoritesInstance
=
\DAO\FavoritesModel
::
getInstance
();
foreach
(
$cartList
as
$cart
){
$memberStoreCartsKey
=
\Our\NameConst
::
memberStoreCartsPrefix
.
$memberId
.
\Our\NameConst
::
underline
.
$cart
[
'store_id'
];
$cartRedis
=
\Redis\Db7\CartRedisModel
::
getInstance
();
$cartRedis
->
tableDel
(
$memberStoreCartsKey
);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db4\FavoritesRedisModel
::
getInstance
(),
array
(
&
$FavoritesInstance
,
'getOne'
),
array
(
'*'
,
array
(
'member_id'
=>
$memberId
,
'goods_commonid'
=>
$cart
[
'goods_commonid'
])),
array
(
$memberId
));
}
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db4\FavoritesRedisModel
::
getInstance
(),
array
(
&
$FavoritesInstance
,
'getList'
),
array
(),
array
(
$memberId
));
//更新个人中心首页数量
//\DAO\MemberModel::getInstance()->_changeNum(\Our\NameConst::goodsCollection,$memberId,count($cartList));
\Redis\Db1\MemberCenterRedisModel
::
getInstance
()
->
tableHDel
(
$memberId
,
\Our\NameConst
::
goodsCollection
);
$cartDao
->
db
->
doCommit
();
return
false
;
}
...
...
application/models/Business/Common/AdvService.php
View file @
e0816322
...
...
@@ -147,17 +147,19 @@ class AdvServiceModel extends \Business\AbstractModel{
public
function
getStoreAdvs
(
$where
,
$position
){
$advMobileDao
=
\DAO\Adv\AdvMobileModel
::
getInstance
();
$advMobileSql
=
"store_id =
{
0
}
and position =
{
1
}
and state =
{
2
}
and
start_time <
{
3
}
and end_time >=
{
4
}
and is_use =
{
5
}
"
;
$advMobileSql
=
\Our\Common
::
format
(
$advMobileSql
,
$where
[
'storeId'
],
$position
,
\Our\ApiConst
::
one
,
time
(),
time
(),
\Our\ApiConst
::
one
);
$advMobileField
=
'href,src'
;
$advMobileList
=
$advMobileDao
->
getList
(
$advMobileSql
,
$advMobileField
,
array
(
'adv_id'
=>
\Our\NameConst
::
desc
));
$advMobileSql
=
"store_id =
{
0
}
and position =
{
1
}
and state =
{
2
}
and
is_use =
{
3
}
"
;
$advMobileSql
=
\Our\Common
::
format
(
$advMobileSql
,
$where
[
'storeId'
],
$position
,
\Our\ApiConst
::
one
,
\Our\ApiConst
::
one
);
$advMobileField
=
'href,src
,end_time,start_time
'
;
$advMobileList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db9\AdvMobileRedisModel
::
getInstance
(),
array
(
&
$advMobileDao
,
'getList'
),
array
(
$advMobileSql
,
$advMobileField
,
array
(
'adv_id'
=>
\Our\NameConst
::
desc
)),
\Our\ApiConst
::
oneHour
,
array
(
$where
[
'storeId'
]
));
if
(
$advMobileList
){
$advs
=
array
();
foreach
(
$advMobileList
as
$adv
){
$temp
=
array
();
$temp
[
'imageUrl'
]
=
\Our\Common
::
getStaticFile
(
$adv
[
'src'
],
\Our\ImageConst
::
advSrcImagePath
);
$temp
[
'href'
]
=
$adv
[
'href'
];
$advs
[]
=
$temp
;
if
(
$adv
[
'start_time'
]
<=
TIMESTAMP
&&
$adv
[
'end_time'
]
>
TIMESTAMP
){
$temp
=
array
();
$temp
[
'imageUrl'
]
=
\Our\Common
::
getStaticFile
(
$adv
[
'src'
],
\Our\ImageConst
::
advSrcImagePath
);
$temp
[
'href'
]
=
$adv
[
'href'
];
$advs
[]
=
$temp
;
}
}
}
else
{
$storeAdvPositionDao
=
\DAO\Adv\StoreAdvPositionModel
::
getInstance
();
...
...
application/models/Business/Store/StoreService.php
View file @
e0816322
...
...
@@ -542,7 +542,7 @@ class StoreServiceModel extends \Business\AbstractModel{
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyGcId
);
}
//获取当前分类对应的全部店铺
$allStores
=
$this
->
getOnlineStoresByGcId
(
$gcId
);
$allStores
=
$this
->
getOnlineStoresByGcId
(
$gcId
,
$condition
);
foreach
(
$allStores
as
&
$store
){
$store
[
'isPurchased'
]
=
\Our\ApiConst
::
zero
;
}
...
...
@@ -687,7 +687,7 @@ class StoreServiceModel extends \Business\AbstractModel{
}
public
function
getStoreClassesByStoreIds
(
$storeIds
,
$gcId
){
$signStoreClassSql
=
' store_id in ('
.
implode
(
','
,
$storeIds
)
.
') and gc_parent_id ='
.
$gcId
;
$signStoreClassSql
=
' store_id in ('
.
implode
(
','
,
$storeIds
)
.
') and
is_charged=1 and
gc_parent_id ='
.
$gcId
;
$qmStoreClassDao
=
\DAO\QmStoreClassModel
::
getInstance
();
$signClassStores
=
$qmStoreClassDao
->
selectByWhere
(
$signStoreClassSql
,
'store_id,gc_id'
);
//$signClassStores = $storeGoodsClassDao->selectByWhere($signStoreClassSql,'store_id,gc_id');
...
...
application/models/DAO/Adv/AdvMobile.php
View file @
e0816322
...
...
@@ -43,9 +43,14 @@ class AdvMobileModel extends \DAO\AbstractModel{
}
}
$result
=
$this
->
db
->
fetchAll
();
echo
$this
->
db
->
getLastSql
();
return
$result
;
}
public
function
deleteStoreAdvMobileCache
(
$storeId
){
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db9\AdvMobileRedisModel
::
getInstance
(),
array
(
&
$this
,
'getList'
),
array
(),
array
(
$storeId
));
}
public
function
delAdvMobile
(
$store
){
$advRedis
=
\Redis\Db9\AdvRedisModel
::
getInstance
();
$storeMiddleAdvsKey
=
\Our\NameConst
::
storeMiddleAdvsPrefix
.
$store
;
...
...
application/models/DAO/QmStoreClass.php
View file @
e0816322
...
...
@@ -33,6 +33,7 @@ class QmStoreClassModel extends \DAO\AbstractModel{
}
else
{
$result
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
}
return
$result
;
}
...
...
application/models/DAO/Store.php
View file @
e0816322
...
...
@@ -200,6 +200,7 @@ class StoreModel extends \DAO\AbstractModel
}
else
{
$result
=
$this
->
db
->
select
(
$field
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
}
echo
$this
->
db
->
getLastSql
();
return
$result
;
}
...
...
application/models/Mysql/LinkMySQL.php
View file @
e0816322
...
...
@@ -767,7 +767,7 @@ class LinkMySQLModel{
public
function
doRollback
()
{
$bFlag
=
mysqli_rollback
(
$this
->
_connection
);
mysqli_autocommit
(
$this
->
_connection
,
TRUE
);
mysqli_autocommit
(
$this
->
_connection
,
TRUE
);
$this
->
bTransactionInProgress
=
FALSE
;
return
$bFlag
;
}
...
...
application/models/Redis/Db9/AdvMobileRedis.php
0 → 100644
View file @
e0816322
<?php
namespace
Redis\Db9
;
/**
* User: liuyuzhen
* Date: 2018/8/30
* Time: 10:20
* Description:
*/
class
AdvMobileRedisModel
extends
\Redis\Db9\AbstractModel
{
/**
* 表名
*
* @var string
*/
protected
$_tableName
=
'han_adv_mobile'
;
/**
* 类实例
*
*/
private
static
$_instance
=
null
;
/**
* 获取类实例
*/
public
static
function
getInstance
()
{
if
(
!
(
self
::
$_instance
instanceof
self
))
{
self
::
$_instance
=
new
self
();
}
return
self
::
$_instance
;
}
}
\ 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