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
f3ec6e8e
Commit
f3ec6e8e
authored
Sep 11, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
评价经纪人
parent
e12984d1
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
110 additions
and
1 deletion
+110
-1
Broker.php
application/api/controller/Broker.php
+58
-0
BrokerValidate.php
application/api/validate/BrokerValidate.php
+41
-0
Evaluate.php
application/model/Evaluate.php
+10
-1
route.php
application/route.php
+1
-0
No files found.
application/api/controller/Broker.php
View file @
f3ec6e8e
...
@@ -381,6 +381,64 @@ class Broker extends Basic
...
@@ -381,6 +381,64 @@ class Broker extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
* 评价经纪人
* 评分分为 专业,态度,着装
* @return \think\Response
* @throws \Exception
*/
public
function
appraiserV2
()
{
$params
=
$this
->
params
;
$data
[
'status'
]
=
101
;
$data
[
'data'
]
=
[];
$data
[
'msg'
]
=
''
;
$params
[
'user_id'
]
=
$this
->
userId
;
$checkResult
=
$this
->
validate
(
$params
,
"BrokerValidate.appraiserV2"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
if
(
!
is_numeric
(
$params
[
'type'
]))
{
$params
[
'type'
]
=
0
;
}
$id_arr
=
[];
if
(
isset
(
$params
[
'sign_name'
]))
{
$evaluate_sign
=
new
EvaluateSign
();
foreach
(
$params
[
'sign_name'
]
as
$v
)
{
$sign_data
=
[
'sign_name'
=>
$v
,
'point_obj'
=>
0
,
'is_del'
=>
0
,
];
$id_arr
[]
=
$evaluate_sign
->
editEvaluationSignData
(
$sign_data
);
}
}
$evaluate
=
new
Evaluate
();
$params
[
'evaluate_sign'
]
=
$id_arr
;
$id
=
$evaluate
->
editEvaluationData
(
$params
,
$this
->
userId
);
if
(
$id
)
{
//去除未推送消息
$m_push
=
new
OPushMessageModel
();
$where
[
'user_id'
]
=
$this
->
userId
;
$where
[
'operation_id'
]
=
$params
[
'agents_id'
];
$where
[
'house_id'
]
=
$params
[
'house_id'
];
$m_push
->
updateData
([
'status'
=>
1
],
$where
);
$data
[
'data'
]
=
[
'id'
=>
$id
];
$data
[
'status'
]
=
200
;
$data
[
'msg'
]
=
'评价成功'
;
}
else
{
$data
[
'msg'
]
=
'评价失败'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
/**
* 查询评论和成交记录
* 查询评论和成交记录
*
*
...
...
application/api/validate/BrokerValidate.php
0 → 100755
View file @
f3ec6e8e
<?php
namespace
app\api\validate
;
use
think\Validate
;
class
BrokerValidate
extends
Validate
{
protected
$rule
=
[
'agent_id'
=>
'require|number|gt:0'
,
'house_id'
=>
'require|number|gt:0'
,
'user_id'
=>
'require|number|gt:0'
,
'source'
=>
'require|number|gt:0'
,
];
protected
$message
=
[
'agent_id.require'
=>
'agent_id为必填字段'
,
'agent_id.number'
=>
'agent_id只能为数字'
,
'agent_id.gt'
=>
'agent_id必须大于0'
,
'house_id.require'
=>
'house_id为必填字段'
,
'house_id.number'
=>
'house_id只能为数字'
,
'house_id.gt'
=>
'house_id必须大于0'
,
'user_id.require'
=>
'user_id异常'
,
'user_id.number'
=>
'user_id异常'
,
'user_id.gt'
=>
'user_id异常'
,
'source.require'
=>
'source为必填字段'
,
'source.number'
=>
'source只能为数字'
,
'source.gt'
=>
'source必须大于0'
,
];
protected
$scene
=
[
'appraiserV2'
=>
[
'agent_id'
,
'house_id'
,
'user_id'
,
'source'
],
];
}
\ No newline at end of file
application/model/Evaluate.php
View file @
f3ec6e8e
...
@@ -221,9 +221,18 @@ class Evaluate extends Model
...
@@ -221,9 +221,18 @@ class Evaluate extends Model
if
(
!
empty
(
$data
[
'record_id'
]))
{
if
(
!
empty
(
$data
[
'record_id'
]))
{
$save_data
[
'record_id'
]
=
$data
[
'record_id'
];
$save_data
[
'record_id'
]
=
$data
[
'record_id'
];
}
}
if
(
!
empty
(
$data
[
'evaluate_grade'
]))
{
if
(
!
empty
(
$data
[
'evaluate_grade'
]))
{
//专业
$save_data
[
'evaluate_grade'
]
=
$data
[
'evaluate_grade'
];
$save_data
[
'evaluate_grade'
]
=
$data
[
'evaluate_grade'
];
}
}
if
(
!
empty
(
$data
[
'evaluate_grade_attitude'
]))
{
//态度
$save_data
[
'evaluate_grade_attitude'
]
=
$data
[
'evaluate_grade_attitude'
];
}
if
(
!
empty
(
$data
[
'evaluate_grade_clothing'
]))
{
//着装
$save_data
[
'evaluate_grade_clothing'
]
=
$data
[
'evaluate_grade_clothing'
];
}
if
(
!
empty
(
$data
[
'evaluate_content'
]))
{
if
(
!
empty
(
$data
[
'evaluate_content'
]))
{
$save_data
[
'evaluate_content'
]
=
$data
[
'evaluate_content'
];
$save_data
[
'evaluate_content'
]
=
$data
[
'evaluate_content'
];
}
}
...
...
application/route.php
View file @
f3ec6e8e
...
@@ -615,6 +615,7 @@ Route::group('api', [
...
@@ -615,6 +615,7 @@ Route::group('api', [
'brokerDetail'
=>
[
'api/broker/brokerDetail'
,
[
'method'
=>
'get'
]],
//经纪人详情
'brokerDetail'
=>
[
'api/broker/brokerDetail'
,
[
'method'
=>
'get'
]],
//经纪人详情
//post broker
//post broker
'appraiser'
=>
[
'api/broker/appraiser'
,
[
'method'
=>
'post'
]],
//评价经纪人
'appraiser'
=>
[
'api/broker/appraiser'
,
[
'method'
=>
'post'
]],
//评价经纪人
'appraiserV2'
=>
[
'api/broker/appraiserV2'
,
[
'method'
=>
'post'
]],
//评价经纪人
'recordCallNum'
=>
[
'api/broker/recordCallNum'
,
[
'method'
=>
'post'
]],
//记录拨打经纪人号码
'recordCallNum'
=>
[
'api/broker/recordCallNum'
,
[
'method'
=>
'post'
]],
//记录拨打经纪人号码
'recordCallNumShare'
=>
[
'api/broker/recordCallNumShare'
,
[
'method'
=>
'post'
]],
//记录拨打经纪人号码
'recordCallNumShare'
=>
[
'api/broker/recordCallNumShare'
,
[
'method'
=>
'post'
]],
//记录拨打经纪人号码
...
...
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