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
70043eef
Commit
70043eef
authored
May 08, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feed喜报
parent
c693d2a0
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
81 additions
and
59 deletions
+81
-59
Feed.php
application/api_broker/controller/Feed.php
+49
-1
PushMessageService.php
application/api_broker/service/PushMessageService.php
+10
-12
Index.php
application/app/controller/Index.php
+0
-7
feed.html
application/app/view/index/feed.html
+0
-11
PushFeed.php
application/model/PushFeed.php
+20
-2
PushHistories.php
application/model/PushHistories.php
+0
-10
PushHistory.php
application/model/PushHistory.php
+0
-16
route.php
application/route.php
+2
-0
No files found.
application/api_broker/controller/Feed.php
View file @
70043eef
...
...
@@ -10,10 +10,57 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\model\PushFeed
;
class
Feed
extends
Basic
{
public
function
pushFeed
()
{
/**
* 成交喜报列表
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
feedList
()
{
$push
=
new
PushFeed
();
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
10
:
$this
->
params
[
'pageSize'
];
$field
=
'id,report_id,house_id,title,content,link,read_num,click_num,house_title,create_time'
;
$where
=
[];
$where
[
'type'
]
=
0
;
if
(
!
empty
(
$this
->
agentId
))
{
$where
[
0
]
=
[
'EXP'
,
'find_in_set('
.
$this
->
agentId
.
',agent_id)'
];
}
$data
[
'data'
]
=
$push
->
getList
(
$pageNo
,
$pageSize
,
'id DESC'
,
$field
,
$where
);
$data
[
'total'
]
=
$push
->
getTotal
(
$where
);
return
$this
->
response
(
200
,
""
,
$data
);
}
/**
* 点击数
*
* @return \think\Response
* @throws \think\Exception
*/
public
function
editFeedClick
()
{
$push
=
new
PushFeed
();
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
$this
->
response
(
101
,
'Id is null'
);
}
if
(
empty
(
$this
->
params
[
'read_num'
]))
{
$push
->
editNum
(
$this
->
params
[
'id'
],
'click_num'
);
}
else
{
$push
->
editNum
(
$this
->
params
[
'id'
],
'read_num'
);
}
return
$this
->
response
(
200
,
""
);
}
}
\ No newline at end of file
application/api_broker/service/PushMessageService.php
View file @
70043eef
...
...
@@ -17,8 +17,7 @@ use app\model\GHousesToAgents;
use
app\model\OrderModel
;
use
app\model\OReportModel
;
use
app\model\PushFeed
;
use
app\model\PushHistory
;
use
app\model\Users
;
class
PushMessageService
{
...
...
@@ -99,8 +98,7 @@ class PushMessageService
public
function
pushBargainMessage
(
$report_id
=
0
){
$report
=
new
OReportModel
();
$feed
=
new
PushFeed
();
$history
=
new
PushHistory
();
$field
=
'house_id,house_title,report_agent_name,report_store_id,user_id'
;
$field
=
'house_id,house_title,report_agent_name,report_store_id,user_id,report_agent_id'
;
$report_data
=
$report
->
getReportOrder
(
$field
,
[
'a.id'
=>
$report_id
]);
...
...
@@ -111,19 +109,19 @@ class PushMessageService
$url
=
$this
->
push
->
http_host
()
.
'/app/feed'
;
$feed
->
editData
([
'agent_id'
=>
0
,
'title'
=>
$title
,
'agent_id'
=>
-
1
,
'report_id'
=>
$report_id
,
'house_id'
=>
$report_data
[
'house_id'
],
'feed_content'
=>
$content
,
]);
$history
->
editData
([
'title'
=>
$title
,
'content'
=>
$content
,
'steel_phone'
=>
0
,
'type'
=>
0
,
'link'
=>
$url
,
'status'
=>
0
,
'user_id'
=>
$report_data
[
'report_agent_id'
],
'house_title'
=>
$report_data
[
'house_title'
],
'read_num'
=>
10
,
//不要问什么,就是产品要加的。PV
'click_num'
=>
10
,
//不要问什么,就是产品要加的。
'feed_id'
=>
$feed
->
id
,
'click_num'
=>
10
//不要问什么,就是产品要加的。
]);
$this
->
push
->
push_message_for_all
(
$title
,
$content
,
$url
);
...
...
application/app/controller/Index.php
View file @
70043eef
...
...
@@ -66,13 +66,6 @@ class Index
return
view
(
'index/more_chengjiao'
);
}
public
function
feed
()
{
return
view
(
'index/feed'
);
}
/**
* 楼盘详情
* @return \think\Response
...
...
application/app/view/index/feed.html
deleted
100644 → 0
View file @
c693d2a0
<!DOCTYPE html>
<html
lang=
"en"
>
<head>
<meta
charset=
"UTF-8"
>
<title>
Title
</title>
</head>
<body>
喜报feed
</body>
</html>
\ No newline at end of file
application/model/PushFeed.php
View file @
70043eef
...
...
@@ -11,6 +11,23 @@ namespace app\model;
class
PushFeed
extends
BaseModel
{
/**
* 修改单个字段步长
*
* @param $id
* @param $field
* @param int $way
* @param int $step
* @return int|true
* @throws \think\Exception
*/
public
function
editNum
(
$id
,
$field
,
$way
=
1
,
$step
=
1
)
{
$this
->
where
(
'id'
,
$id
);
if
(
$way
)
{
$result
=
$this
->
setInc
(
$field
,
$step
);
}
else
{
$result
=
$this
->
setDec
(
$field
,
$step
);
}
return
$result
;
}
}
\ No newline at end of file
application/model/PushHistories.php
deleted
100755 → 0
View file @
c693d2a0
<?php
namespace
app\model
;
use
think\Model
;
class
PushHistories
extends
Model
{
//
}
application/model/PushHistory.php
deleted
100644 → 0
View file @
c693d2a0
<?php
/**
* Created by PhpStorm.
* User: fuju
* Date: 2018/5/7
* Time: 17:54
*/
namespace
app\model
;
class
PushHistory
extends
BaseModel
{
}
\ No newline at end of file
application/route.php
View file @
70043eef
...
...
@@ -421,6 +421,8 @@ Route::group('broker', [
'getSupervise'
=>
[
'api_broker/Supervise/getSupervise'
,
[
'method'
=>
'get'
]
],
//监督执行列表
'sendSms'
=>
[
'api_broker/broker/sendSms'
,
[
'method'
=>
'post'
]
],
//发送短信
'qrCode'
=>
[
'api_broker/broker/qrCode'
,
[
'method'
=>
'get'
]
],
//生成二维码
'feedList'
=>
[
'api_broker/Feed/feedList'
,
[
'method'
=>
'get'
]
],
//首页feed喜报
'editFeedClick'
=>
[
'api_broker/Feed/editFeedClick'
,
[
'method'
=>
'post'
]
],
//feed流喜报点赞和页面浏览数量
...
...
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