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
b149c438
Commit
b149c438
authored
Feb 12, 2019
by
liuyuzhengrace
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
在售商品分类缓存问题
parent
99d5ef87
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
1 deletion
+4
-1
GoodsCommonService.php
application/models/Business/Goods/GoodsCommonService.php
+4
-1
No files found.
application/models/Business/Goods/GoodsCommonService.php
View file @
b149c438
...
@@ -1383,6 +1383,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -1383,6 +1383,7 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$oldTemp
=
$storeOnlineGoodsClassDao
->
findByWhere
(
$goodsClass
);
$oldTemp
=
$storeOnlineGoodsClassDao
->
findByWhere
(
$goodsClass
);
if
(
!
$oldTemp
){
if
(
!
$oldTemp
){
$storeOnlineGoodsClassDao
->
insert
(
$goodsClass
);
$storeOnlineGoodsClassDao
->
insert
(
$goodsClass
);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\StoreOnlineGoodsClassRedisModel
::
getInstance
(),
array
(
&
$storeOnlineGoodsClassDao
,
'getStoreOnlineGoodsClassesByGcId'
),
array
(),
array
(
$goodsClass
[
'store_id'
]));
}
}
return
true
;
return
true
;
}
}
...
@@ -1394,16 +1395,18 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
...
@@ -1394,16 +1395,18 @@ class GoodsCommonServiceModel extends \Business\AbstractModel
$gcFrom
=
$goodsClass
[
'gc_from'
];
$gcFrom
=
$goodsClass
[
'gc_from'
];
$where
[
'gc_id_1'
]
=
$goodsClass
[
'gc_id_1'
];
$where
[
'gc_id_1'
]
=
$goodsClass
[
'gc_id_1'
];
$where
[
'gc_id_2'
]
=
$goodsClass
[
'gc_id_2'
];
$where
[
'gc_id_2'
]
=
$goodsClass
[
'gc_id_2'
];
//$where['gc_id_3'] = $goodsClass['gc_id_3'];
$where
[
'store_id'
]
=
$goodsClass
[
'store_id'
];
$where
[
'store_id'
]
=
$goodsClass
[
'store_id'
];
$where
[
'goods_state'
]
=
\Our\ApiConst
::
onlineGoodsState
;
$where
[
'goods_state'
]
=
\Our\ApiConst
::
onlineGoodsState
;
$where
[
'goods_verify'
]
=
\Our\ApiConst
::
onlineGoodsVerify
;
$where
[
'goods_verify'
]
=
\Our\ApiConst
::
onlineGoodsVerify
;
if
(
$gcFrom
==
\Our\ApiConst
::
one
){
if
(
$gcFrom
==
\Our\ApiConst
::
one
){
$where
[
'goods_class_t_id'
]
=
$goodsClass
[
'gc_id_3'
];
$where
[
'goods_class_t_id'
]
=
$goodsClass
[
'gc_id_3'
];
}
else
{
$where
[
'gc_id_3'
]
=
$goodsClass
[
'gc_id_3'
];
}
}
$tempOne
=
$goodsCommonDao
->
getOne
(
$where
,
'goods_commonid'
);
$tempOne
=
$goodsCommonDao
->
getOne
(
$where
,
'goods_commonid'
);
if
(
!
$tempOne
){
if
(
!
$tempOne
){
$storeOnlineGoodsClassDao
->
del
(
$goodsClass
);
$storeOnlineGoodsClassDao
->
del
(
$goodsClass
);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db6\StoreOnlineGoodsClassRedisModel
::
getInstance
(),
array
(
&
$storeOnlineGoodsClassDao
,
'getStoreOnlineGoodsClassesByGcId'
),
array
(),
array
(
$goodsClass
[
'store_id'
]));
}
}
}
}
}
}
...
...
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