Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
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
hujun
tl_estate
Commits
4cb9946c
Commit
4cb9946c
authored
Apr 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
1cd1dc6d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
38 additions
and
5 deletions
+38
-5
SquareService.php
application/api_broker/service/SquareService.php
+25
-1
StatementService.php
application/api_broker/service/StatementService.php
+2
-1
BComment.php
application/model/BComment.php
+9
-0
BSquare.php
application/model/BSquare.php
+1
-1
OBargainModel.php
application/model/OBargainModel.php
+1
-2
No files found.
application/api_broker/service/SquareService.php
View file @
4cb9946c
...
@@ -110,6 +110,18 @@ class SquareService
...
@@ -110,6 +110,18 @@ class SquareService
$agent
=
$this
->
redis
->
getRedisCache
(
2
,
$val
[
'agent_id'
])
;
$agent
=
$this
->
redis
->
getRedisCache
(
2
,
$val
[
'agent_id'
])
;
$res
[
$key
][
'name'
]
=
$agent
[
'name'
];
$res
[
$key
][
'name'
]
=
$agent
[
'name'
];
$res
[
$key
][
'image_path'
]
=
AGENTHEADERIMGURL
.
$agent
[
'img'
];
$res
[
$key
][
'image_path'
]
=
AGENTHEADERIMGURL
.
$agent
[
'img'
];
//部门标签
$res
[
$key
][
'district_lable_name'
]
=
'一部'
;
foreach
(
$this
->
getDistrictLable
()
as
$key1
=>
$val1
)
{
if
(
$res
[
$key1
][
'district_lable_id'
]
==
$val1
[
'id'
]){
$res
[
$key1
][
'district_lable_name'
]
=
$val1
[
'name'
];
continue
;
}
}
//评论数
$res
[
$key
][
'comment_num'
]
=
$this
->
getCommenNum
(
$val
[
'id'
]);
}
}
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
...
@@ -137,9 +149,9 @@ class SquareService
...
@@ -137,9 +149,9 @@ class SquareService
$res
[
$key
][
'img'
]
=
AGENTHEADERIMGURL
.
$agent
[
'img'
];
$res
[
$key
][
'img'
]
=
AGENTHEADERIMGURL
.
$agent
[
'img'
];
$get_params
=
[];
$get_params
=
[];
$list
=
[];
$field
=
'CommentExt.id,CommentExt.level,CommentExt.comment,CommentExt.agent_id_a,CommentExt.agent_id_b'
;
//
$field
=
'CommentExt.id,CommentExt.level,CommentExt.comment,CommentExt.agent_id_a,CommentExt.agent_id_b'
;
//
$get_params
[
'CommentExt.comment_id'
]
=
$val
[
'id'
];
$get_params
[
'CommentExt.comment_id'
]
=
$val
[
'id'
];
$get_params
[
'CommentExt.is_del'
]
=
0
;
$res
[
$key
][
'comment_ext'
][
'total'
]
=
$this
->
m_coment_ext
->
getSquareCommentExtListTotal
(
$field
,
$get_params
);
$res
[
$key
][
'comment_ext'
][
'total'
]
=
$this
->
m_coment_ext
->
getSquareCommentExtListTotal
(
$field
,
$get_params
);
$list
=
$this
->
m_coment_ext
->
getSquareCommentExtList
(
1
,
2
,
$field
,
$get_params
);
$list
=
$this
->
m_coment_ext
->
getSquareCommentExtList
(
1
,
2
,
$field
,
$get_params
);
...
@@ -336,4 +348,15 @@ class SquareService
...
@@ -336,4 +348,15 @@ class SquareService
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
}
}
/**
* 开盘广场列表 评论数
* @param $id
* @return int|string
*/
public
function
getCommenNum
(
$id
){
$get_params
[
'square_id'
]
=
$id
;
$get_params
[
'is_del'
]
=
0
;
$res
=
$this
->
m_coment
->
getCommenNum
(
$get_params
);
return
$res
;
}
}
}
\ No newline at end of file
application/api_broker/service/StatementService.php
View file @
4cb9946c
...
@@ -296,7 +296,7 @@ class StatementService
...
@@ -296,7 +296,7 @@ class StatementService
//todo 上周业绩
//todo 上周业绩
$where_
=
[];
$where_
=
[];
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1
4
day"
));
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-1
3
day"
));
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$end_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
// $where_["district_id"] = $district_id;
// $where_["district_id"] = $district_id;
$where_
[
"agent_id"
]
=
$conditions
[
"agent_id"
];
$where_
[
"agent_id"
]
=
$conditions
[
"agent_id"
];
...
@@ -305,6 +305,7 @@ class StatementService
...
@@ -305,6 +305,7 @@ class StatementService
$performanceSum
=
$this
->
bargainModel
->
getAddBargainNum
(
$where_
,
1
);
//1表示业绩 2表示实收
$performanceSum
=
$this
->
bargainModel
->
getAddBargainNum
(
$where_
,
1
);
//1表示业绩 2表示实收
$result
[
"director_last_week_performance_num"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
$result
[
"director_last_week_performance_num"
]
=
isset
(
$performanceSum
[
0
][
"num"
])
?
$performanceSum
[
0
][
"num"
]
:
0
;
big_log
(
$result
[
"director_last_week_performance_num"
]);
//todo 本周周业绩
//todo 本周周业绩
$where_
=
[];
$where_
=
[];
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
$start_time
=
date
(
"Y-m-d"
,
strtotime
(
"-7 day"
));
...
...
application/model/BComment.php
View file @
4cb9946c
...
@@ -67,4 +67,13 @@ class BComment extends Model
...
@@ -67,4 +67,13 @@ class BComment extends Model
return
$result
;
return
$result
;
}
}
public
function
getCommenNum
(
$params
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
where
(
$params
)
->
count
();
// dump($this->getLastSql());
return
$result
;
}
}
}
application/model/BSquare.php
View file @
4cb9946c
...
@@ -56,7 +56,7 @@ class BSquare extends Model
...
@@ -56,7 +56,7 @@ class BSquare extends Model
->
page
(
$pageNo
)
->
page
(
$pageNo
)
->
order
(
$order
)
->
order
(
$order
)
->
select
();
->
select
();
//dump($this->getLastSql());
//
dump($this->getLastSql());
return
$result
;
return
$result
;
}
}
...
...
application/model/OBargainModel.php
View file @
4cb9946c
...
@@ -786,8 +786,7 @@ class OBargainModel extends Model
...
@@ -786,8 +786,7 @@ class OBargainModel extends Model
->
join
(
$join
)
->
join
(
$join
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
/*echo $this->getLastSql();
big_log
(
$this
->
getLastSql
());
echo '------------------';*/
return
$return
;
return
$return
;
}
}
public
function
getAddBargainNumV2
(
$params
,
$type
)
public
function
getAddBargainNumV2
(
$params
,
$type
)
...
...
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