fixed
This commit is contained in:
@@ -33,12 +33,16 @@ class Feedback extends BaseHttpApi
|
||||
return Mmodel::catchJson(function (){
|
||||
$content = input('content');
|
||||
$wx_groupid = input('chatroom_id');//客户所在微信群id
|
||||
$followup_record_id = input('followup_record_id');//回访记录id
|
||||
if(empty($content)){
|
||||
return Tools::set_fail('反馈内容不能为空');
|
||||
}
|
||||
if(empty($wx_groupid)){
|
||||
return Tools::set_fail('群id不能为空');
|
||||
}
|
||||
if(empty($followup_record_id)){
|
||||
return Tools::set_fail('回访记录id不能为空');
|
||||
}
|
||||
|
||||
//得到3条反馈消息,AI去总结
|
||||
$str = $this->aiResult($content);
|
||||
@@ -50,10 +54,10 @@ class Feedback extends BaseHttpApi
|
||||
//查询是否有回访记录
|
||||
$ret = Db::table('fa_firmcustomerfollowuprecord')
|
||||
->where('rel_group',$wx_groupid)
|
||||
->order('id desc')
|
||||
->where('id',$followup_record_id)
|
||||
->find();
|
||||
if(empty($ret)){
|
||||
return Tools::set_fail('该客户无回访记录');
|
||||
return Tools::set_fail('本次反馈未找到对应回访记录,请确认回访记录和群id是否真实存在');
|
||||
}
|
||||
Db::table('fa_firmcustomerfeedback')
|
||||
->data([
|
||||
|
||||
Reference in New Issue
Block a user