|
@@ -1112,6 +1112,10 @@ $resArray['money'] = $money; //返回给前端的计算结果
|
|
|
$mt_user_greet_content = Db::name('user_greet_content');
|
|
|
foreach ($lists as &$v) {
|
|
|
$info = $mt_user_greet_content->where(['user_id' => $v['id'], 'is_default' => 1])->find();
|
|
|
+ if(!$info){
|
|
|
+ $this->add_girl_greet($v['id']);
|
|
|
+ $info = $mt_user_greet_content->where(['user_id' => $v['id'], 'is_default' => 1])->find();
|
|
|
+ }
|
|
|
if ($info) {
|
|
|
if ($info['type'] == 0) {
|
|
|
$v['greet_content'] = $info['content'];
|
|
@@ -1132,6 +1136,36 @@ $resArray['money'] = $money; //返回给前端的计算结果
|
|
|
$this->success('success',$return_data);
|
|
|
}
|
|
|
|
|
|
+ private function add_girl_greet($user_id){
|
|
|
+ $girl_greet = [
|
|
|
+ [
|
|
|
+ 'user_id' => $user_id,
|
|
|
+ 'title' => '默认',
|
|
|
+ 'content' => '你好,想认识你,可以聊聊吗?',
|
|
|
+ 'is_default' => 1,
|
|
|
+ 'createtime' => time(),
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'user_id' => $user_id,
|
|
|
+ 'title' => '默认',
|
|
|
+ 'content' => '听说主动打招呼的人运气都不会太差,所以我来试试!',
|
|
|
+ 'createtime' => time(),
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'user_id' => $user_id,
|
|
|
+ 'title' => '默认',
|
|
|
+ 'content' => '嗨!看到你的资料觉得挺有意思的,认识一下?',
|
|
|
+ 'createtime' => time(),
|
|
|
+ ],
|
|
|
+ [
|
|
|
+ 'user_id' => $user_id,
|
|
|
+ 'title' => '默认',
|
|
|
+ 'content' => '我猜你收到很多消息,但我的这条一定最特别!',
|
|
|
+ 'createtime' => time(),
|
|
|
+ ],
|
|
|
+ ];
|
|
|
+ Db::name('user_greet_content')->insertAll($girl_greet);
|
|
|
+ }
|
|
|
|
|
|
//查询免费体验视频通话用户信息
|
|
|
public function getfreevideouserinfo() {
|