Commit 0d9f8eaa authored by zhuwei's avatar zhuwei

1

parent dfd4efc6
......@@ -48,7 +48,7 @@ class ClinchMap extends Basic
{
header('Access-Control-Allow-Origin:*');
//成交数
$result['bargain_num'] = $this->getCityBargainInfo();
$result['bargain_num'] = $this->getShopBargainNum();
//城市 当月成交 总成交
$result['city_bargain_info'] = $this->getCityBargainInfo();
......@@ -153,16 +153,18 @@ class ClinchMap extends Basic
*/
public function getPerformanceInfo()
{
$time_arr = [date('Y-m', strtotime('-1 month'))=>['type'=>'1'],
date('Y-m', strtotime('-2 month'))=>['type'=>'2'],
date('Y-m', strtotime('-3 month'))=>['type'=>'3'],
date('Y-m', strtotime('-4 month'))=>['type'=>'4'],
date('Y-m', strtotime('-5 month'))=>['type'=>'5'],
date('Y-m', strtotime('-6 month'))=>['type'=>'6'],
date('Y-m', strtotime('-7 month'))=>['type'=>'7'],
date('Y-m', strtotime('-8 month'))=>['type'=>'8'],
date('Y-m', strtotime('-9 month'))=>['type'=>'9'],
date('Y-m', strtotime('-10 month'))=>['type'=>'10']];
$time_arr = [
['time'=>date('Y-m', strtotime('-1 month')),'type'=>1],
['time'=>date('Y-m', strtotime('-2 month')),'type'=>2],
['time'=>date('Y-m', strtotime('-3 month')),'type'=>3],
['time'=>date('Y-m', strtotime('-4 month')),'type'=>4],
['time'=>date('Y-m', strtotime('-5 month')),'type'=>5],
['time'=>date('Y-m', strtotime('-6 month')),'type'=>6],
['time'=>date('Y-m', strtotime('-7 month')),'type'=>7],
['time'=>date('Y-m', strtotime('-8 month')),'type'=>8],
['time'=>date('Y-m', strtotime('-9 month')),'type'=>9],
['time'=>date('Y-m', strtotime('-10 month')),'type'=>10],
];
foreach ($time_arr as $key => $v) {
$start_time = date('Y-m-d', strtotime(date('Y-m-01') . "-{$v['type']} month"));// 计算出本月第一天再减一个月
$last_num = $v['type'] - 1;
......@@ -187,16 +189,18 @@ class ClinchMap extends Basic
*/
public function getUserInfo()
{
$time_arr = [date('Y-m', strtotime('-1 month'))=>['type'=>'1'],
date('Y-m', strtotime('-2 month'))=>['type'=>'2'],
date('Y-m', strtotime('-3 month'))=>['type'=>'3'],
date('Y-m', strtotime('-4 month'))=>['type'=>'4'],
date('Y-m', strtotime('-5 month'))=>['type'=>'5'],
date('Y-m', strtotime('-6 month'))=>['type'=>'6'],
date('Y-m', strtotime('-7 month'))=>['type'=>'7'],
date('Y-m', strtotime('-8 month'))=>['type'=>'8'],
date('Y-m', strtotime('-9 month'))=>['type'=>'9'],
date('Y-m', strtotime('-10 month'))=>['type'=>'10']];
$time_arr = [
['time'=>date('Y-m', strtotime('-1 month')),'type'=>1],
['time'=>date('Y-m', strtotime('-2 month')),'type'=>2],
['time'=>date('Y-m', strtotime('-3 month')),'type'=>3],
['time'=>date('Y-m', strtotime('-4 month')),'type'=>4],
['time'=>date('Y-m', strtotime('-5 month')),'type'=>5],
['time'=>date('Y-m', strtotime('-6 month')),'type'=>6],
['time'=>date('Y-m', strtotime('-7 month')),'type'=>7],
['time'=>date('Y-m', strtotime('-8 month')),'type'=>8],
['time'=>date('Y-m', strtotime('-9 month')),'type'=>9],
['time'=>date('Y-m', strtotime('-10 month')),'type'=>10],
];
$redis = RedisExt::getRedis();
foreach ($time_arr as $key => $v) {
if (!$redis->get($this->redis_user_prefix.$key)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment