dever 3 years ago
parent
commit
58fb083231
2 changed files with 13 additions and 1 deletions
  1. 11 0
      database/inbox.php
  2. 2 1
      lib/Data.php

+ 11 - 0
database/inbox.php

@@ -104,6 +104,17 @@ return array
 			'list'		=> true,
 			'list'		=> true,
 		),
 		),
 
 
+		'link'		=> array
+		(
+			'type' 		=> 'varchar-30',
+			'name' 		=> '链接-选填,如有链接,则点击消息跳转至该链接',
+			'default' 	=> '',
+			'desc' 		=> '链接',
+			'match' 	=> 'option',
+			'search'	=> 'fulltext',
+			'update'	=> 'text',
+		),
+
 		'project_id'		=> array
 		'project_id'		=> array
 		(
 		(
 			'type' 		=> 'int-11',
 			'type' 		=> 'int-11',

+ 2 - 1
lib/Data.php

@@ -35,7 +35,7 @@ class Data
         # 这个是兼容历史版本
         # 这个是兼容历史版本
         //$where .= ' (and a.type <= 10 || a.scope = 2)';
         //$where .= ' (and a.type <= 10 || a.scope = 2)';
         # 读取outbox里的数据
         # 读取outbox里的数据
-        $sql = 'select a.name,a.content,a.id,a.type,a.uid,a.project_id,a.scope,a.param from '.$outbox.' as a where not exists(select oid from '.$inbox.' where a.id = oid and uid = '.$uid.')' . $where . ' ';
+        $sql = 'select a.name,a.content,a.link,a.id,a.type,a.uid,a.project_id,a.scope,a.param from '.$outbox.' as a where not exists(select oid from '.$inbox.' where a.project_id = project_id and a.id = oid and uid = '.$uid.')' . $where . ' ';
 
 
         $state = Dever::db('message/inbox')->query($sql);
         $state = Dever::db('message/inbox')->query($sql);
         $outbox = $state->fetchAll();
         $outbox = $state->fetchAll();
@@ -52,6 +52,7 @@ class Data
                 $insert['add_name'] = $v['name'];
                 $insert['add_name'] = $v['name'];
                 $insert['add_scope'] = $v['scope'];
                 $insert['add_scope'] = $v['scope'];
                 $insert['add_content'] = $v['content'];
                 $insert['add_content'] = $v['content'];
+                $insert['add_link'] = $v['link'];
                 $insert['add_param'] = $v['param'];
                 $insert['add_param'] = $v['param'];
                 Dever::load('message/inbox-insert', $insert);
                 Dever::load('message/inbox-insert', $insert);
             }
             }