feat/task1-c-wallet
parent
ddfb8066cc
commit
f4d9a218e1
|
|
@ -61,7 +61,7 @@ class GoodsController extends CommonController
|
|||
$this->assign('home_seo_site_title', $goods[0]['title']);
|
||||
|
||||
// 商品访问统计
|
||||
M('Goods')->where(array('id'=>$id))->setInc('access_count');
|
||||
GoodsService::GoodsAccessCountInc(['goods_id'=>$id]);
|
||||
|
||||
// 左侧商品 看了又看
|
||||
$params = [
|
||||
|
|
|
|||
|
|
@ -507,5 +507,23 @@ class GoodsService
|
|||
}
|
||||
return DataReturn('处理成功', 0, $data);
|
||||
}
|
||||
|
||||
/**
|
||||
* 商品访问统计加1
|
||||
* @author Devil
|
||||
* @blog http://gong.gg/
|
||||
* @version 1.0.0
|
||||
* @date 2018-10-15
|
||||
* @desc description
|
||||
* @param [array] $params [输入参数]
|
||||
*/
|
||||
public static function GoodsAccessCountInc($params = [])
|
||||
{
|
||||
if(!empty($params['goods_id']))
|
||||
{
|
||||
return M('Goods')->where(array('id'=>intval($params['goods_id'])))->setInc('access_count');
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
?>
|
||||
42
shopxo.sql
42
shopxo.sql
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue