Merge pull request #25 from a54552239/dev

v2.8.17
This commit is contained in:
vilson 2022-05-21 21:08:12 +08:00 committed by GitHub
commit f5ab338aa4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
20 changed files with 1251 additions and 105 deletions

View File

@ -53,7 +53,7 @@ function setCurrentMember($data)
if (!$data) {
Cache::rm($key);
}else{
Cache::set($key, $data);
Cache::set($key, $data, 3600 * 24 * 7);
}
return session('member', $data);
}

View File

@ -0,0 +1,110 @@
<?php
namespace app\common\Model;
use think\Db;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\Exception;
use think\exception\DbException;
use think\exception\PDOException;
use think\facade\Hook;
class Events extends CommonModel
{
protected $pk = 'id';
public function myList($projectCode, $memberCode = '', $page = 1, $pageSize = 10, $sortType = '', $sort = 'desc')
{
if ($page < 1) {
$page = 1;
}
$offset = ($page - 1) * $pageSize;
$limit = $pageSize;
$prefix = config('database.prefix');
$sql = "select *,p.id as id,p.name as name,p.code as code,p.create_time as create_time,p.end_time as end_time,p.qc,p.get_expected,p.plain_finish from {$prefix}events_member join {$prefix}project as p as pm on p.code = pm.project_code where pm.member_code = '{$memberCode}'";
$sql .= "group by p.id ";
if ($sortType) {
$sql .= " order by {$sortType} {$sort} ";
} else {
$sql .= ' order by pc.id desc, p.id desc';
}
$total = Db::query($sql);
$total = count($total);
$sql .= " limit {$offset},{$limit}";
$list = Db::query($sql);
}
/**
* 创建日程
* @param $projectCode
* @param $title
* @param $description
* @param $position
* @param $allDay
* @param $organizationCode
* @param $beginTime
* @param $endTime
* @return array
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public function createData($projectCode, $title, $description, $position, $allDay, $organizationCode, $beginTime, $endTime, $createdBy)
{
if (!$title) {
return error(1, '请填写日程名称');
}
$project = Project::where(['code' => $projectCode])->field('id')->find();
if (!$project) {
return error(3, '该日程已失效');
}
$data = [
'create_time' => nowTime(),
'code' => createUniqueCode('ProjectVersion'),
'project_code' => $projectCode,
'begin_time' => $beginTime,
'end_time' => $endTime,
'position' => $position,
'all_day' => $allDay,
'description' => $description,
'organization_code' => $organizationCode,
'created_by' => $createdBy,
'title' => trim($title),
];
return self::create($data)->toArray();
}
/**
* 删除日程
* @param $eventsCode
* @return array|bool
*/
public function deleteEvents($eventsCode)
{
if (!$eventsCode) {
return error(1, '请选择一个日程');
}
self::eventsHook(getCurrentMember()['code'], $eventsCode, 'delete');
self::update(['deleted' => 1, 'deleted_time' => nowTime()], ['code' => $eventsCode]);
return true;
}
/**
* 变动钩子
* @param $memberCode
* @param $eventsCode
* @param string $type
* @param string $remark
* @param string $content
* @param array $data
* @param string $tag
*/
public static function eventsHook($memberCode, $eventsCode, $type = 'create', $remark = '', $content = '', $data = [], $tag = 'events')
{
$data = ['memberCode' => $memberCode, 'eventsCode' => $eventsCode, 'remark' => $remark, 'type' => $type, 'content' => $content, 'data' => $data, 'tag' => $tag];
Hook::listen($tag, $data);
}
}

View File

@ -0,0 +1,8 @@
<?php
namespace app\common\Model;
class EventsLog extends CommonModel
{
protected $pk = 'id';
}

View File

@ -0,0 +1,98 @@
<?php
namespace app\common\Model;
use Exception;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\exception\DbException;
/**
* 日程成员
* Class EventsMember
* @package app\common\Model
*/
class EventsMember extends CommonModel
{
protected $append = ['memberInfo'];
/**
* @param $memberCode
* @param $eventCode
* @param int $isOwner
* @param int $status
* @return EventsMember|array|bool
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public static function inviteMember($memberCode, $eventCode, $isOwner = 0, $status = 0)
{
$event = Events::where(['code' => $eventCode, 'deleted' => 0])->find();
if (!$event) {
return error(4, '该日程已失效');
}
$hasJoined = self::where(['member_code' => $memberCode, 'events_code' => $eventCode])->find();
if ($hasJoined) {
return error(4, '该成员已加入日程');
}
$data = [
'member_code' => $memberCode,
'events_code' => $eventCode,
'project_code' => $event->project_code,
'is_owner' => $isOwner,
'status' => $isOwner ? 1 : $status,
'join_time' => nowTime()
];
$result = self::create($data);
Events::eventsHook(getCurrentMember()['code'], $eventCode, 'inviteMember', '', '', ['memberCode' => $memberCode]);
return $result;
}
public static function removeMember($memberCode, $eventCode)
{
$event = Events::where(['code' => $eventCode, 'deleted' => 0])->find();
if (!$event) {
return error(4, '该日程已失效');
}
$hasJoined = self::where(['member_code' => $memberCode, 'events_code' => $eventCode])->find();
if (!$hasJoined) {
return error(4, '该成员尚未加入日程');
}
if ($hasJoined['is_owner']) {
return error(4, '不能移除创建者');
}
$result = $hasJoined->delete();
Events::eventsHook(getCurrentMember()['code'], $eventCode, 'removeMember', '', '', ['memberCode' => $memberCode]);
return $result;
}
public static function confirmJoin($memberCode, $eventCode, $status)
{
$event = Events::where(['code' => $eventCode, 'deleted' => 0])->find();
if (!$event) {
return error(4, '该日程已失效');
}
$hasJoined = self::where(['member_code' => $memberCode, 'events_code' => $eventCode])->find();
if (!$hasJoined) {
return error(4, '尚未加入日程');
}
$result = self::where(['member_code' => $memberCode, 'events_code' => $eventCode])->update(['status' => $status, 'confirm_time' => nowTime()]);
if ($status == 1) {
$type = 'agreeJoin';
} else {
$type = 'refuseJoin';
}
Events::eventsHook(getCurrentMember()['code'], $eventCode, $type, '', '', ['memberCode' => $memberCode]);
return $result;
}
public function getMemberInfoAttr($value, $data)
{
if (empty($data['member_code'])) {
$data['member_code'] = 0;
}
return Member::where('code', $data['member_code'])->field('name,avatar')->find();
}
}

View File

@ -345,7 +345,7 @@ class Task extends CommonModel
throw new Exception('父任务已完成,无法重做子任务', 4);
}
if ($task['hasUnDone']) {
throw new Exception('子任务尚未全部完成,无法完成父任务', 5);
throw new Exception('子任务尚未全部完成,无法完成父任务', 55);
}
Db::startTrans();

View File

@ -4,6 +4,7 @@ namespace app\common\Model;
use service\FileService;
use service\RandomService;
use service\ToolsService;
use think\File;
/**
@ -100,6 +101,32 @@ class TaskStages extends CommonModel
return $list;
}
public function tasksTree($stageCode)
{
$taskModel = new Task();
$list1 = $taskModel->where('stage_code', $stageCode)->where('done', 0)->where('deleted', 0)->order('sort asc,end_time desc, id asc')->select()->toArray();
$list2 = $taskModel->where('stage_code', $stageCode)->where('done', 1)->where('deleted', 0)->order('sort asc,end_time desc, id asc')->select()->toArray();
$list = array_merge($list1, $list2);
if ($list) {
foreach ($list as $key => &$item) {
$item = $taskModel->read($item['code']);
if ($item) {
$item = $item->toArray();
} else {
$item = [];
}
if (empty($item['canRead'])) {
array_splice($list, $key, 1);
}
$item['type'] = 'task';
$item['tasks'] = [];
}
unset($item);
}
$list = ToolsService::arr2tree($list, 'code', 'pcode', 'tasks');
return $list;
}
/*public function tasks($stageCode, $deleted = 0, $done = -1)
{
$where = ['stage_code' => $stageCode, 'pcode' => '', 'deleted' => $deleted];

View File

@ -1,10 +1,11 @@
<?php
define('SERVER_ADDRESS', '192.168.0.159');//服务注册地址需为内网IP地址
define('SERVER_ADDRESS', '192.168.1.161');//服务注册地址需为内网IP地址
define('SERVER_PORT', '2346');//服务注册端口
define('CLIENT_PORT', '2345');//客户端监听端口
//ssl配置 请使用绝对路径。不开启可以不用关注
define('USE_SSL', false);//是否使用ssl
define('SITE_URL', 'https://beta.vilson.xyz');//接口地址
define('LOCAL_CERT', '/www/wwwroot/EasyProjectApi/server.pem');// 证书路径也可以是crt文件
define('LOCAL_PK', '/www/wwwroot/EasyProjectApi/server.key');
define('VERIFY_PEER', false);

View File

@ -0,0 +1,138 @@
<?php
namespace app\project\behavior;
use app\common\Model\EventsLog;
use app\common\Model\Member;
use app\common\Model\Notify;
use service\MessageService;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\exception\DbException;
class Events
{
/**
* 日程操作钩子
* @param $data
* @throws DataNotFoundException
* @throws ModelNotFoundException
* @throws DbException
*/
public function run($data)
{
$logData = ['member_code' => $data['memberCode'], 'source_code' => $data['eventsCode'], 'remark' => $data['remark'], 'type' => $data['type'], 'content' => $data['content'], 'data' => $data['data'], 'create_time' => nowTime(), 'code' => createUniqueCode('eventsLog')];
$events = \app\common\Model\Events::where(['code' => $data['eventsCode']])->find();
$logData['project_code'] = $events['project_code'];
$remark = '';
$content = '';
$notifyData = [
'title' => '',
'content' => '',
'type' => 'message',
'action' => 'events',
'terminal' => 'project',
'source_code' => $data['eventsCode'],
];
$member = Member::where(['code' => $data['memberCode']])->find();
$toMember = [];
if (isset($data['data']['memberCode'])) {
$toMember = Member::where(['code' => $data['data']['memberCode']])->find();
}
switch ($data['type']) {
case 'create':
$icon = 'plus';
$remark = '创建了日程 ';
$content = $events['title'];
break;
case 'title':
$icon = 'edit';
$remark = '更新了日程名 ';
$content = $events['title'];
break;
case 'content':
$icon = 'file-text';
$remark = '更新了备注 ';
$content = $events['description'];
break;
case 'clearContent':
$icon = 'file-text';
$remark = '清空了备注 ';
break;
case 'setBeginTime':
$icon = 'calendar';
$remark = '更新开始时间为 ' . date('m月d日 H:i', strtotime($events['begin_time']));
break;
case 'clearBeginTime':
$icon = 'calendar';
$remark = '清除了开始时间 ';
break;
case 'setEndTime':
$icon = 'calendar';
$remark = '更新截止时间为 ' . date('m月d日 H:i', strtotime($events['end_time']));
break;
case 'clearEndTime':
$icon = 'calendar';
$remark = '清除了截止时间 ';
break;
case 'delete':
$icon = 'delete';
$remark = '删除了日程 ';
break;
case 'agreeJoin':
$icon = 'user-add';
$remark = $member['name'] . ' 确认加入日程';
$content = $member['name'];
break;
case 'refuseJoin':
$icon = 'user-add';
$remark = $member['name'] . ' 拒绝加入日程';
$content = $member['name'];
break;
case 'inviteMember':
$icon = 'user-add';
$remark = '将 ' . $toMember['name'] . ' 添加到日程';
$content = $toMember['name'];
$notifyData['title'] = "{$member['name']} 邀请你加入日程";
$notifyData['content'] = $events['title'];
break;
case 'removeMember':
$icon = 'user-delete';
$remark = '将 ' . $toMember['name'] . ' 从日程中移出';
$content = $toMember['name'];
$notifyData['title'] = "{$member['name']} 将你从日程中移出";
$notifyData['content'] = $events['title'];
break;
default:
$icon = 'plus';
$remark = ' 创建了日程 ';
break;
}
$logData['icon'] = $icon;
if (!$data['remark']) {
$logData['remark'] = $remark;
}
if (!$data['content']) {
$logData['content'] = $content;
}
EventsLog::create($logData);
$notifyActions = ['inviteMember', 'removeMember'];
$socketAction = $notifyData['action'];
if (in_array($data['type'], $notifyActions)) {
if ($toMember['code'] != $member['code']) {
$messageService = new MessageService();
$notifyModel = new Notify();
$notifyData['avatar'] = $member['avatar'];
$result = $notifyModel->add($notifyData['title'], $notifyData['content'], $notifyData['type'], $member['code'], $toMember['code'], $notifyData['action'], [], $notifyData['terminal'], $notifyData['avatar']);
if (isOpenNoticePush()) {
$socketMessage = $socketGroupMessage = ['content' => $notifyData['content'], 'title' => $notifyData['title'], 'data' => ['organizationCode' => getCurrentOrganizationCode(), 'projectCode' => $events['project_code'], 'eventsCode' => $events['code']]];
$socketMessage['notify'] = $result;
$messageService->sendToUid($toMember['code'], $socketMessage, $socketAction);
}
}
}
}
}

View File

@ -103,6 +103,36 @@ class Account extends BasicApi
$this->success('', $list);
}
public function _allList()
{
$keyword = Request::post('keyword');
$orgCode = getCurrentOrganizationCode();
$where = [['organization_code', '=', $orgCode]];
if ($keyword) {
$where[] = ['name', 'like', "%{$keyword}%"];
}
$memberAccountList = MemberAccount::where($where)->select()->toArray();
$list = [];
if ($memberAccountList) {
foreach ($memberAccountList as $member) {
$item['memberCode'] = $member['member_code'];
$item['status'] = $member['status'];
$item['avatar'] = $member['avatar'];
if (!$item['avatar']) {
$memberInfo = Member::where(['code' => $member['member_code']])->field('id', true)->find();
if ($memberInfo) {
$item['avatar'] = $memberInfo['avatar'];
}
}
$item['name'] = $member['name'];
$item['email'] = $member['email'] ?? '未绑定邮箱';
$list[] = $item; //为了去重
}
}
$this->success('', $list);//数组下标重置
}
public function read()
{
$code = Request::param('code');

View File

@ -0,0 +1,423 @@
<?php
namespace app\project\controller;
use app\common\Model\EventsMember;
use app\common\Model\Member;
use app\common\Model\EventsLog;
use controller\BasicApi;
use service\DataService;
use service\DateService;
use think\db\exception\DataNotFoundException;
use think\db\exception\ModelNotFoundException;
use think\db\Where;
use think\Exception;
use think\exception\DbException;
use think\exception\PDOException;
use think\facade\Request;
/**
*/
class Events extends BasicApi
{
public function __construct()
{
parent::__construct();
if (!$this->model) {
$this->model = new \app\common\Model\Events();
}
}
/**
* 显示资源日程
* @return void
* @throws DataNotFoundException
* @throws ModelNotFoundException
* @throws DbException
*/
public function index()
{
$where = [];
$code = Request::post('projectCode');
if ($code) {
$where[] = ['project_code', '=', $code];
}
$where[] = ['deleted', '=', 0];
$list = $this->model->_list($where);
// $eventMember = new EventsMember();
// $list = $eventMember->_list($where);
if ($list['list']) {
foreach ($list['list'] as &$item) {
$item['memberList'] = [];
$item['projectName'] = '';
$members = EventsMember::where(['events_code' => $item['code']])->order('is_owner desc, status desc, id asc')->all();
if ($members) {
$item['memberList'] = $members;
}
$project = \app\common\Model\Project::where('code', $item['project_code'])->field('name')->find();
if ($project) {
$item['projectName'] = $project['name'];
}
}
}
$this->success('', $list);
}
public function myList()
{
$where = [];
$code = Request::post('projectCode');
if ($code) {
$where[] = ['project_code', '=', $code];
}
$status = Request::post('status', -1);
$where[] = ['deleted', '=', 0];
$where[] = ['end_time', '>=', nowTime()];
$memberWhere = [['member_code', '=', getCurrentMember()['code']]];
if ($status != -1) {
$memberWhere[] = ['status', '=', $status];
} else {
$memberWhere[] = ['status', '<>', 2];
}
$memberCode = getCurrentMember()['code'];
$eventCodes = EventsMember::where($memberWhere)->column('events_code');
$where[] = ['code', 'in', $eventCodes];
$list = $this->model->_list($where);
if ($list['list']) {
foreach ($list['list'] as &$item) {
$item['memberList'] = [];
$item['projectName'] = '';
$item['waitConfirm'] = 1;
$waitConfirm = EventsMember::where(['events_code' => $item['code'], 'member_code' => $memberCode, 'status' => 0])->find();
if (!$waitConfirm) {
$item['waitConfirm'] = 0;
}
$members = EventsMember::where(['events_code' => $item['code']])->order('is_owner desc, status desc, id asc')->all();
if ($members) {
$item['memberList'] = $members;
}
$project = \app\common\Model\Project::where('code', $item['project_code'])->field('name')->find();
if ($project) {
$item['projectName'] = $project['name'];
}
}
}
$this->success('', $list);
}
public function confirmList()
{
$where = [];
$code = Request::post('projectCode');
if ($code) {
$where[] = ['project_code', '=', $code];
}
$where[] = ['deleted', '=', 0];
$eventCodes = EventsMember::where(['status' => 0, 'member_code' => getCurrentMember()['code']])->column('events_code');
$where[] = ['code', 'in', $eventCodes];
$list = $this->model->_list($where);
if ($list['list']) {
foreach ($list['list'] as &$item) {
$item['memberList'] = [];
$item['projectName'] = '';
$members = EventsMember::where(['events_code' => $item['code']])->all();
if ($members) {
$item['memberList'] = $members;
}
$project = \app\common\Model\Project::where('code', $item['project_code'])->field('name')->find();
if ($project) {
$item['projectName'] = $project['name'];
}
}
}
$this->success('', $list);
}
/**
* 新增
* @param Request $request
* @return void
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public function save(Request $request)
{
$data = $request::only('project_code,title,description,begin_time,end_time,all_day,position');
if (!$request::post('title')) {
$this->error("请填写日程名称");
}
$result = $this->model->createData($data['project_code'], $data['title'], $data['description'], $data['position'], $data['all_day'], getCurrentOrganizationCode(), $data['begin_time'], $data['end_time'], getCurrentMember()['code']);
if (!isError($result)) {
\app\common\Model\Events::eventsHook(getCurrentMember()['code'], $result['code'], 'create');
$memberList = $request::post('member_list', "");
if ($memberList) {
$memberCode = getCurrentMember()['code'];
$memberList = json_decode($memberList, JSON_UNESCAPED_UNICODE);
foreach ($memberList as $item) {
EventsMember::inviteMember($item, $result['code'], $item == $memberCode ? 1 : 0);
}
}
$this->success('添加成功', $result);
}
$this->error($result['msg']);
}
/**
* 保存
* @param Request $request
* @return void
* @throws DataNotFoundException
* @throws ModelNotFoundException
* @throws DbException
*/
public function edit(Request $request)
{
$data = $request::only('project_code,title,description,begin_time,end_time,all_day,position');
$eventsCode = $request::param('code');
if (isset($data['title']) && !$data['title']) {
$this->error("请填写日程名称");
}
if (!$eventsCode) {
$this->error("请选择一个日程");
}
$events = $this->model->where(['code' => $eventsCode])->field('id,project_code')->find();
if (!$events) {
$this->error("该日程已失效");
}
$result = $this->model->_edit($data, ['code' => $eventsCode]);
if ($result) {
$eventsMemberCodes = EventsMember::where(['events_code' => $eventsCode])->column('member_code');
$memberList = $request::post('member_list', "");
if ($memberList) {
$memberCode = getCurrentMember()['code'];
$memberList = json_decode($memberList, JSON_UNESCAPED_UNICODE);
foreach ($memberList as $item) {
if (!in_array($item, $eventsMemberCodes)) {
EventsMember::inviteMember($item, $eventsCode, $item == $memberCode ? 1 : 0);
}
}
}
if ($eventsMemberCodes) {
foreach ($eventsMemberCodes as $item) {
if (!in_array($item, $memberList)) {
EventsMember::removeMember($item, $eventsCode);
}
}
}
$member = getCurrentMember();
$type = 'title';
if (isset($data['title'])) {
$type = 'title';
}
if (isset($data['description'])) {
$type = 'content';
if (!$data['description']) {
$type = 'clearContent';
}
}
if (isset($data['begin_time'])) {
$type = 'setBeginTime';
if (!$data['begin_time']) {
$type = 'clearBeginTime';
}
}
if (isset($data['end_time'])) {
$type = 'setEndTime';
if (!$data['end_time']) {
$type = 'clearEndTime';
}
}
\app\common\Model\Events::eventsHook($member['code'], $eventsCode, $type);
$this->success('');
}
$this->error("操作失败,请稍候再试!");
}
/**
* 详情
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public function read()
{
$code = Request::post('eventsCode');
$events = $this->model->where(['code' => $code])->field('id', true)->find();
if ($events) {
$events['memberList'] = [];
$members = EventsMember::where(['events_code' => $events['code']])->all();
if ($members) {
$events['memberList'] = $members;
}
}
$this->success('', $events);
}
public function confirmJoin()
{
$eventsCode = Request::post('eventsCode');
$status = Request::post('status');
$memberCode = getCurrentMember()['code'];
$result = EventsMember::confirmJoin($memberCode, $eventsCode, $status);
if (isError($result)) {
$this->error($result['msg'], $result['errno']);
}
$this->success();
}
public function removeMember()
{
$eventsCode = Request::post('eventsCode');
$memberCode = Request::post('memberCode');
$result = EventsMember::removeMember($memberCode, $eventsCode);
if (isError($result)) {
$this->error($result['msg'], $result['errno']);
}
$this->success();
}
public function inviteMember()
{
$eventsCode = Request::post('eventsCode');
$memberCode = Request::post('memberCode');
$result = EventsMember::inviteMember($memberCode, $eventsCode, 0);
if (isError($result)) {
$this->error($result['msg'], $result['errno']);
}
$this->success();
}
public function getEventsListByCalendar()
{
$date = Request::post('date');
$dateTimestamp = strtotime($date);
$month = DateService::unixtime('month', -1, 'begin', date('Y', $dateTimestamp), date('m', $dateTimestamp));
$month2 = DateService::unixtime('month', 2, 'begin', date('Y', $dateTimestamp), date('m', $dateTimestamp));
$begin = date('Y-m-d H:i:s', $month);
$end = date('Y-m-d H:i:s', $month2);
$memberCodes = Request::post('memberCodes');
if ($memberCodes) {
$memberCodes = json_decode($memberCodes, JSON_UNESCAPED_UNICODE);
}
$where[] = ['deleted', '=', 0];
$memberWhere = [['member_code', 'in', $memberCodes]];
$memberWhere[] = ['status', '<>', 2];
$eventCodes = EventsMember::where($memberWhere)->column('events_code');
$where[] = ['code', 'in', $eventCodes];
// $list = $this->model->_list($where);
$dateRange = DateService::getDateFromRange($begin, $end);
$rows = intval(Request::param('pageSize', cookie('pageSize')));
if (!$rows) {
$rows = 10;
}
cookie('pageSize', $rows);
$list = $this->model->where($where)->where(function ($query) use ($begin, $end) {
$where1 = [['begin_time', '<=', $begin], ['end_time', '>=', $begin]];
$where2 = [['begin_time', '>=', $begin], ['end_time', '<=', $end]];
$where3 = [['begin_time', '<=', $end], ['end_time', '>=', $end]];
$query->whereOr(function($query) use ($where1){
$query->where($where1);
})->whereOr(function ($query) use ($where2, $where3) {
$query->where($where2);
})->whereOr(function ($query) use ($where3) {
$query->where($where3);
});
})->select();
// $list = $page->all();
$newList = [];
$memberCode = getCurrentMember()['code'];
$dateRangeList = [];
if ($dateRange) {
foreach ($dateRange as $dateItem) {
if (!isset($dateRange[$dateItem])) {
$dateRangeList[$dateItem] = [];
}
if ($list) {
foreach ($list as &$item) {
$item['visible'] = false;
$item['visibleInner'] = false;
$item['visibleMore'] = false;
$item['waitConfirm'] = 1;
$item['myStatus'] = 0;
$waitConfirm = EventsMember::where(['events_code' => $item['code'], 'member_code' => $memberCode])->find();
if ($waitConfirm) {
if ($waitConfirm['status'] != 0) {
$item['waitConfirm'] = 0;
}
$item['myStatus'] = $waitConfirm['status'];
}else{
$item['waitConfirm'] = 0;
}
$item['memberList'] = [];
$members = EventsMember::where(['events_code' => $item['code']])->order('is_owner desc, status desc, id asc')->all();
if ($members) {
$item['memberList'] = $members;
}
if (($dateItem >= date('Y-m-d', strtotime($item['begin_time']))) && ($dateItem <= date('Y-m-d', strtotime($item['end_time'])))) {
$dateRangeList[$dateItem][] = $item;
}
}
}
}
}
$result = ['list' => $dateRangeList, 'dateRange' => $dateRange];
$this->success('', $result);
}
/**
* 日程日志
* @throws DataNotFoundException
* @throws DbException
* @throws ModelNotFoundException
*/
public function _getEventsLog()
{
$code = Request::post('eventsCode');
$showAll = Request::post('all', 0);
$where = [];
$where[] = ['source_code', '=', $code];
$eventsModel = new EventsLog();
if ($showAll) {
$list = [];
$list['list'] = $eventsModel->where($where)->order('id asc')->select()->toArray();
$list['total'] = count($list['list']);
} else {
$list = $eventsModel->_list($where, 'id desc');
if ($list['list']) {
$list['list'] = array_reverse($list['list']);
}
}
if ($list['list']) {
foreach ($list['list'] as &$item) {
$member = Member::where(['code' => $item['member_code']])->field('id,name,avatar,code')->find();
!$member && $member = [];
$item['member'] = $member;
}
}
$this->success('', $list);
}
/**
* 删除日程
* @return void
*/
public function delete()
{
$code = Request::post('eventsCode');
if (!$code) {
$this->error("请选择一个日程");
}
$result = $this->model->deleteEvents($code);
if (isError($result)) {
$this->error($result['msg'], $result['errno']);
}
$this->success();
}
}

View File

@ -6,6 +6,7 @@ use app\common\Model\Member;
use controller\BasicApi;
use service\FileService;
use think\Exception;
use think\facade\Log;
use think\facade\Request;
@ -82,6 +83,7 @@ class File extends BasicApi
*/
public function uploadFiles()
{
set_time_limit(0);
$data = Request::post();
$fileName = $data['identifier'];
$orgFileName = $data['filename'];
@ -92,7 +94,7 @@ class File extends BasicApi
$memberCode = getCurrentMember()['code'];
$date = date('Ymd', time());
$ticket = date('YmdHis', time());
$path = config('upload.base_path') . config('upload.file_temp') . "/{$orgCode}/{$memberCode}/$date/";
$path = config('upload.base_path') . config('upload.file_temp') . "/{$orgCode}/{$memberCode}/$date";
$saveName = $fileName . "-{$chunkNumber}";
try {
$uploadInfo = _uploadFile($file, $path, $saveName);
@ -100,13 +102,14 @@ class File extends BasicApi
$this->error($e->getMessage(), 500);
}
$info = $uploadInfo['uploadInfo'];
unset($uploadInfo);
$fileData = [
'extension' => $info->getExtension(),
'file_type' => $info->getInfo()['type'],
];
$result = [];
$type = empty($file_storage) ? sysconf('storage_type') : $file_storage;
$path2 = config('upload.base_path') . config('upload.file') . "/{$orgCode}/{$memberCode}/$date/$ticket-$orgFileName";
if ($chunkNumber == $totalChunks) {
$fileList = [];
$blob = '';
@ -114,12 +117,20 @@ class File extends BasicApi
$ext = explode('.', $orgFileName);
$ext = $ext[count($ext) - 1];
$fileUrl = "{$path}/{$fileName}-{$i}.{$ext}";
// logRecord(['url' => $fileUrl], 'info', 'temp/uploadFiles');
$site_url = FileService::getFileUrl($fileUrl, 'local');
$blob .= file_get_contents($site_url);
$fileList[] = env('root_path') . $fileUrl;
if ($site_url) {
$blob = file_get_contents($site_url);
// $blob .= file_get_contents($site_url);
$fileList[] = env('root_path') . $fileUrl;
$result = FileService::$type($path2, $blob, true);
}
unset($blob);
unset($site_url);
unset($fileUrl);
}
$path = config('upload.base_path') . config('upload.file') . "/{$orgCode}/{$memberCode}/$date/$ticket-$orgFileName";
$result = FileService::$type($path, $blob);
// $result = FileService::$type($path2, $blob);
$fileData['size'] = $data['totalSize'];
$fileData['path_name'] = $result['key'];
$fileData['file_url'] = $result['url'];
@ -127,9 +138,11 @@ class File extends BasicApi
$fileData['size'] = $data['totalSize'];
!isset($data['taskCode']) && $data['taskCode'] = '';
$fileResult = \app\common\Model\File::createFile($data['projectCode'], $fileData);
unset($info);
//文件碎片移除
foreach ($fileList as $file) {
@unlink($file);
unlink($file);
}
$fileInfo = \app\common\Model\File::where(['code' => $fileResult['code']])->find();
if ($data['taskCode']) {

View File

@ -94,6 +94,9 @@ class Task extends BasicApi
$status = [0 => '普通', 1 => '紧急', 2 => '非常紧急'];
if ($list['list']) {
foreach ($list['list'] as &$task) {
$taskInfo = \app\common\Model\Task::get($task['id']);
$task['parentDone'] = $taskInfo['parentDone'];
$task['hasUnDone'] = $taskInfo['hasUnDone'];
$task['priText'] = $status[$task['pri']];
$task['executor'] = Member::where(['code' => $task['assign_to']])->field('name,avatar')->find();
$task['projectInfo'] = \app\common\Model\Project::where(['code' => $task['project_code']])->field('name,code')->find();

View File

@ -88,6 +88,24 @@ class TaskStages extends BasicApi
$this->success('', $list);
}
public function taskTree()
{
$where = [];
$code = Request::post('projectCode');
if (!$code) {
$this->error("请选择一个项目");
}
$where[] = ['project_code', '=', $code];
$list = $this->model->where($where)->select();
if ($list) {
foreach ($list as &$item) {
$item['type'] = 'stage';
$item['tasks'] = $this->model->tasksTree($item['code']);
}
}
$this->success('', $list);
}
public function sort(Request $request)
{
$data = $request::only('preCode,nextCode');

View File

@ -9,4 +9,7 @@ return [
'version' => [
'app\\project\\behavior\\Version'
],
'events' => [
'app\\project\\behavior\\Events'
],
];

View File

@ -49,7 +49,7 @@ return [
// Query类
'query' => '\\think\\db\\Query',
// 是否需要断线重连
'break_reconnect' => false,
'break_reconnect' => true,
// 断线标识字符串
'break_match_str' => [],
];

View File

@ -0,0 +1,64 @@
SET FOREIGN_KEY_CHECKS=0;
CREATE TABLE `pear_events` (
`id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`title` varchar(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '描述',
`order` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记',
`organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id',
`deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除时间',
`private` tinyint(1) NULL DEFAULT 1 COMMENT '是否私有',
`begin_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目开始日期',
`end_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目截止日期',
`all_day` tinyint(1) NULL DEFAULT NULL COMMENT '是否全天',
`project_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编码',
`position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
`created_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project`(`order`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程表' ROW_FORMAT = COMPACT;
CREATE TABLE `pear_events_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人id',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '操作内容',
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '日志描述',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'create' COMMENT '操作类型',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '添加时间',
`source_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '任务id',
`project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编号',
`icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`events_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `features_code`(`events_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程日志表' ROW_FORMAT = COMPACT;
CREATE TABLE `pear_events_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`events_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id',
`join_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间',
`is_owner` int(11) NULL DEFAULT 0 COMMENT '拥有者',
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '确认状态',
`confirm_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '确认时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique`(`events_code`, `member_code`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程-成员表' ROW_FORMAT = COMPACT;
ALTER TABLE `pear_file` MODIFY COLUMN `size` int(12) UNSIGNED NULL DEFAULT 0 COMMENT '文件大小' AFTER `extension`;
ALTER TABLE `pear_project_log` MODIFY COLUMN `content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作内容' AFTER `member_code`;
ALTER TABLE `pear_task` CHARACTER SET = utf8mb4, COLLATE = utf8mb4_general_ci;
ALTER TABLE `pear_task` MODIFY COLUMN `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL AFTER `project_code`;
SET FOREIGN_KEY_CHECKS=1;

View File

@ -5,13 +5,13 @@
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : pearproject
Source Schema : pearprojectpro
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 07/03/2020 10:19:45
Date: 20/12/2020 12:02:30
*/
SET NAMES utf8mb4;
@ -31,7 +31,7 @@ CREATE TABLE `pear_collection` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收藏表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收藏表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_collection
@ -57,7 +57,7 @@ CREATE TABLE `pear_department` (
`path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '上级路径',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_department
@ -83,7 +83,7 @@ CREATE TABLE `pear_department_member` (
`authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门-成员表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_department_member
@ -94,6 +94,83 @@ INSERT INTO `pear_department_member` VALUES (36, '2tyvcl53bdr1a9h4ofxuepg8', '6v
INSERT INTO `pear_department_member` VALUES (37, 'gd6f5a8qmzor239kvlixn071', '6v7be19pwman2fird04gqu53', '6v7be19pwman2fird04gqu53', '6v7be19pwman2fird04gqu11', '2019-01-07 09:49:03', 0, 0, NULL);
INSERT INTO `pear_department_member` VALUES (38, 'uzodyahgnc5pqk1iv2sef86x', '6v7be19pwman2fird04gqu11', '6v7be19pwman2fird04gqu53', '6v7be19pwman2fird04gqu55', '2019-01-07 09:52:29', 0, 0, NULL);
-- ----------------------------
-- Table structure for pear_events
-- ----------------------------
DROP TABLE IF EXISTS `pear_events`;
CREATE TABLE `pear_events` (
`id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`title` varchar(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '描述',
`order` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记',
`organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id',
`deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除时间',
`private` tinyint(1) NULL DEFAULT 1 COMMENT '是否私有',
`begin_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目开始日期',
`end_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目截止日期',
`all_day` tinyint(1) NULL DEFAULT NULL COMMENT '是否全天',
`project_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编码',
`position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
`created_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project`(`order`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_events
-- ----------------------------
-- ----------------------------
-- Table structure for pear_events_log
-- ----------------------------
DROP TABLE IF EXISTS `pear_events_log`;
CREATE TABLE `pear_events_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人id',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '操作内容',
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '日志描述',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'create' COMMENT '操作类型',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '添加时间',
`source_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '任务id',
`project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编号',
`icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`events_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `features_code`(`events_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_events_log
-- ----------------------------
-- ----------------------------
-- Table structure for pear_events_member
-- ----------------------------
DROP TABLE IF EXISTS `pear_events_member`;
CREATE TABLE `pear_events_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`events_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id',
`join_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间',
`is_owner` int(11) NULL DEFAULT 0 COMMENT '拥有者',
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '确认状态',
`confirm_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '确认时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique`(`events_code`, `member_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_events_member
-- ----------------------------
-- ----------------------------
-- Table structure for pear_file
-- ----------------------------
@ -104,7 +181,7 @@ CREATE TABLE `pear_file` (
`path_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '相对路径',
`title` char(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`extension` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展名',
`size` mediumint(8) UNSIGNED NULL DEFAULT 0 COMMENT '文件大小',
`size` int(12) UNSIGNED NULL DEFAULT 0 COMMENT '文件大小',
`object_type` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对象类型',
`organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织编码',
`task_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务编码',
@ -119,7 +196,7 @@ CREATE TABLE `pear_file` (
`deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '删除时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文件表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文件表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_file
@ -148,7 +225,7 @@ CREATE TABLE `pear_invite_link` (
`over_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '过期时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邀请链接表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邀请链接表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_invite_link
@ -164,7 +241,7 @@ CREATE TABLE `pear_lock` (
`pvalue` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '次数',
`expiretime` int(11) NOT NULL DEFAULT 0 COMMENT '锁定截止时间',
PRIMARY KEY (`pid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '防灌水表' ROW_FORMAT = Compact;
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '防灌水表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_lock
@ -188,7 +265,11 @@ CREATE TABLE `pear_mailqueue` (
`failReason` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `sendTime`(`sendTime`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 31858 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮件队列' ROW_FORMAT = Dynamic;
) ENGINE = MyISAM AUTO_INCREMENT = 31858 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮件队列' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pear_mailqueue
-- ----------------------------
-- ----------------------------
-- Table structure for pear_member
@ -220,7 +301,7 @@ CREATE TABLE `pear_member` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `username`(`account`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 591 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 591 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_member
@ -256,7 +337,7 @@ CREATE TABLE `pear_member_account` (
`department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织账号表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织账号表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_member_account
@ -297,7 +378,7 @@ CREATE TABLE `pear_notify` (
`avatar` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像/图片',
`source_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '资源code',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 4325 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '动态通知表' ROW_FORMAT = Dynamic;
) ENGINE = MyISAM AUTO_INCREMENT = 4325 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '动态通知表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pear_notify
@ -357,7 +438,7 @@ CREATE TABLE `pear_organization` (
`area` int(10) NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_organization
@ -403,7 +484,7 @@ CREATE TABLE `pear_project` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project`(`order`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13043 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 13043 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project
@ -436,7 +517,7 @@ CREATE TABLE `pear_project_auth` (
`is_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否默认',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目权限表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目权限表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_auth
@ -465,7 +546,7 @@ CREATE TABLE `pear_project_auth_node` (
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_system_auth_auth`(`auth`) USING BTREE,
INDEX `index_system_auth_node`(`node`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5078 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目角色与节点绑定' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 5078 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目角色与节点绑定' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_auth_node
@ -1635,7 +1716,7 @@ CREATE TABLE `pear_project_collection` (
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_collection
@ -1653,7 +1734,11 @@ CREATE TABLE `pear_project_config` (
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`project_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目配置表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目配置表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_config
-- ----------------------------
-- ----------------------------
-- Table structure for pear_project_features
@ -1672,7 +1757,7 @@ CREATE TABLE `pear_project_features` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `organization_code`(`organization_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_features
@ -1698,7 +1783,11 @@ CREATE TABLE `pear_project_info` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `organization_code`(`organization_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目自定义信息表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目自定义信息表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_info
-- ----------------------------
-- ----------------------------
-- Table structure for pear_project_log
@ -1708,7 +1797,7 @@ CREATE TABLE `pear_project_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '操作人id',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '操作内容',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作内容',
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'create' COMMENT '操作类型',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '添加时间',
@ -1723,7 +1812,7 @@ CREATE TABLE `pear_project_log` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `member_code`(`member_code`) USING BTREE,
INDEX `source_code`(`source_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4468 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4468 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_log
@ -2333,7 +2422,7 @@ CREATE TABLE `pear_project_member` (
`authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique`(`project_code`, `member_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-成员表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_member
@ -2385,7 +2474,7 @@ CREATE TABLE `pear_project_menu` (
`values` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数默认值',
`show_slider` tinyint(1) NULL DEFAULT 1 COMMENT '是否显示侧栏',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 169 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目菜单表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 169 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目菜单表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_menu
@ -2440,7 +2529,7 @@ CREATE TABLE `pear_project_node` (
`create_at` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_system_node_node`(`node`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 641 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目端节点表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 641 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目端节点表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_node
@ -2633,7 +2722,11 @@ CREATE TABLE `pear_project_report` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE,
INDEX `code`(`project_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_report
-- ----------------------------
-- ----------------------------
-- Table structure for pear_project_template
@ -2652,7 +2745,7 @@ CREATE TABLE `pear_project_template` (
`is_system` tinyint(1) NULL DEFAULT 0 COMMENT '系统默认',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_template
@ -2684,7 +2777,7 @@ CREATE TABLE `pear_project_version` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `organization_code`(`organization_code`) USING BTREE,
INDEX `features_code`(`features_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目版本表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目版本表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_version
@ -2713,7 +2806,7 @@ CREATE TABLE `pear_project_version_log` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `features_code`(`features_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_version_log
@ -2751,7 +2844,7 @@ CREATE TABLE `pear_source_link` (
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源关联表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源关联表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_source_link
@ -2769,7 +2862,7 @@ CREATE TABLE `pear_system_config` (
`value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置值',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_system_config_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统参数配置' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统参数配置' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_system_config
@ -2818,7 +2911,11 @@ CREATE TABLE `pear_system_log` (
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作内容描述',
`create_at` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_system_log
-- ----------------------------
-- ----------------------------
-- Table structure for pear_task
@ -2828,7 +2925,7 @@ CREATE TABLE `pear_task` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号',
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '项目编号',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`pri` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '紧急程度',
`execute_status` enum('wait','doing','done','pause','cancel','closed') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'wait' COMMENT '执行状态',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详情',
@ -2863,7 +2960,7 @@ CREATE TABLE `pear_task` (
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `pcode`(`pcode`) USING BTREE,
INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12363 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 12363 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task
@ -2963,7 +3060,7 @@ CREATE TABLE `pear_task_like` (
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务点赞表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务点赞表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_like
@ -2995,7 +3092,7 @@ CREATE TABLE `pear_task_member` (
`is_owner` tinyint(1) NULL DEFAULT 0 COMMENT '是否创建人',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 273 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务-成员表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 273 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_member
@ -3263,7 +3360,7 @@ CREATE TABLE `pear_task_stages` (
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_stages
@ -3319,7 +3416,7 @@ CREATE TABLE `pear_task_stages_template` (
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表模板表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表模板表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_stages_template
@ -3360,7 +3457,7 @@ CREATE TABLE `pear_task_tag` (
`create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_tag
@ -3381,7 +3478,7 @@ CREATE TABLE `pear_task_to_tag` (
`create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 138 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签映射表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 138 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签映射表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_to_tag
@ -3409,7 +3506,11 @@ CREATE TABLE `pear_task_work_time` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工时表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工时表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_work_time
-- ----------------------------
-- ----------------------------
-- Table structure for pear_task_workflow
@ -3425,7 +3526,7 @@ CREATE TABLE `pear_task_workflow` (
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_workflow
@ -3451,7 +3552,7 @@ CREATE TABLE `pear_task_workflow_rule` (
`sort` int(10) NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流规则表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流规则表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_workflow_rule
@ -3483,6 +3584,10 @@ CREATE TABLE `pear_user_token` (
`client_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '客户端类型 android wap',
`login_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录ip',
PRIMARY KEY (`token_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'PC端登录令牌表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'PC端登录令牌表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_user_token
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -5,13 +5,13 @@
Source Server Type : MySQL
Source Server Version : 50726
Source Host : localhost:3306
Source Schema : pearproject
Source Schema : pearprojectpro
Target Server Type : MySQL
Target Server Version : 50726
File Encoding : 65001
Date: 07/03/2020 10:19:45
Date: 20/12/2020 12:02:30
*/
SET NAMES utf8mb4;
@ -31,7 +31,7 @@ CREATE TABLE `pear_collection` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收藏表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 113 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '收藏表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_collection
@ -57,7 +57,7 @@ CREATE TABLE `pear_department` (
`path` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '上级路径',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 5 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '部门表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_department
@ -83,7 +83,7 @@ CREATE TABLE `pear_department_member` (
`authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门-成员表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 39 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_department_member
@ -94,6 +94,83 @@ INSERT INTO `pear_department_member` VALUES (36, '2tyvcl53bdr1a9h4ofxuepg8', '6v
INSERT INTO `pear_department_member` VALUES (37, 'gd6f5a8qmzor239kvlixn071', '6v7be19pwman2fird04gqu53', '6v7be19pwman2fird04gqu53', '6v7be19pwman2fird04gqu11', '2019-01-07 09:49:03', 0, 0, NULL);
INSERT INTO `pear_department_member` VALUES (38, 'uzodyahgnc5pqk1iv2sef86x', '6v7be19pwman2fird04gqu11', '6v7be19pwman2fird04gqu53', '6v7be19pwman2fird04gqu55', '2019-01-07 09:52:29', 0, 0, NULL);
-- ----------------------------
-- Table structure for pear_events
-- ----------------------------
DROP TABLE IF EXISTS `pear_events`;
CREATE TABLE `pear_events` (
`id` mediumint(8) UNSIGNED NOT NULL AUTO_INCREMENT,
`title` varchar(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '描述',
`order` int(11) UNSIGNED NULL DEFAULT 0 COMMENT '排序',
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记',
`organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织id',
`deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '删除时间',
`private` tinyint(1) NULL DEFAULT 1 COMMENT '是否私有',
`begin_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目开始日期',
`end_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目截止日期',
`all_day` tinyint(1) NULL DEFAULT NULL COMMENT '是否全天',
`project_code` varchar(45) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编码',
`position` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '地点',
`created_by` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project`(`order`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_events
-- ----------------------------
-- ----------------------------
-- Table structure for pear_events_log
-- ----------------------------
DROP TABLE IF EXISTS `pear_events_log`;
CREATE TABLE `pear_events_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '操作人id',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '操作内容',
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '日志描述',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'create' COMMENT '操作类型',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '添加时间',
`source_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '任务id',
`project_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '项目编号',
`icon` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`events_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本库编号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `features_code`(`events_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_events_log
-- ----------------------------
-- ----------------------------
-- Table structure for pear_events_member
-- ----------------------------
DROP TABLE IF EXISTS `pear_events_member`;
CREATE TABLE `pear_events_member` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`events_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id',
`join_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间',
`is_owner` int(11) NULL DEFAULT 0 COMMENT '拥有者',
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
`status` tinyint(1) NULL DEFAULT 0 COMMENT '确认状态',
`confirm_time` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '确认时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique`(`events_code`, `member_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '日程-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_events_member
-- ----------------------------
-- ----------------------------
-- Table structure for pear_file
-- ----------------------------
@ -104,7 +181,7 @@ CREATE TABLE `pear_file` (
`path_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '相对路径',
`title` char(90) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '名称',
`extension` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '扩展名',
`size` mediumint(8) UNSIGNED NULL DEFAULT 0 COMMENT '文件大小',
`size` int(12) UNSIGNED NULL DEFAULT 0 COMMENT '文件大小',
`object_type` char(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '对象类型',
`organization_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '组织编码',
`task_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '任务编码',
@ -119,7 +196,7 @@ CREATE TABLE `pear_file` (
`deleted_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '删除时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文件表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 44 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文件表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_file
@ -148,7 +225,7 @@ CREATE TABLE `pear_invite_link` (
`over_time` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '过期时间',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邀请链接表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '邀请链接表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_invite_link
@ -164,7 +241,7 @@ CREATE TABLE `pear_lock` (
`pvalue` tinyint(3) UNSIGNED NOT NULL DEFAULT 1 COMMENT '次数',
`expiretime` int(11) NOT NULL DEFAULT 0 COMMENT '锁定截止时间',
PRIMARY KEY (`pid`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '防灌水表' ROW_FORMAT = Compact;
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '防灌水表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_lock
@ -188,7 +265,11 @@ CREATE TABLE `pear_mailqueue` (
`failReason` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
PRIMARY KEY (`id`) USING BTREE,
INDEX `sendTime`(`sendTime`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 31858 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮件队列' ROW_FORMAT = Dynamic;
) ENGINE = MyISAM AUTO_INCREMENT = 31858 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '邮件队列' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pear_mailqueue
-- ----------------------------
-- ----------------------------
-- Table structure for pear_member
@ -220,7 +301,7 @@ CREATE TABLE `pear_member` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `username`(`account`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 591 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 591 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_member
@ -256,7 +337,7 @@ CREATE TABLE `pear_member_account` (
`department` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '部门',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织账号表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 35 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织账号表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_member_account
@ -297,7 +378,7 @@ CREATE TABLE `pear_notify` (
`avatar` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '头像/图片',
`source_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '资源code',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = MyISAM AUTO_INCREMENT = 4325 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '动态通知表' ROW_FORMAT = Dynamic;
) ENGINE = MyISAM AUTO_INCREMENT = 4325 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '动态通知表' ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Records of pear_notify
@ -357,7 +438,7 @@ CREATE TABLE `pear_organization` (
`area` int(10) NULL DEFAULT 0 COMMENT '',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '组织表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_organization
@ -403,7 +484,7 @@ CREATE TABLE `pear_project` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project`(`order`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 13043 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 13043 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project
@ -436,7 +517,7 @@ CREATE TABLE `pear_project_auth` (
`is_default` tinyint(1) NULL DEFAULT 0 COMMENT '是否默认',
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '权限类型',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目权限表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目权限表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_auth
@ -465,7 +546,7 @@ CREATE TABLE `pear_project_auth_node` (
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_system_auth_auth`(`auth`) USING BTREE,
INDEX `index_system_auth_node`(`node`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 5078 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目角色与节点绑定' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 5078 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目角色与节点绑定' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_auth_node
@ -1635,7 +1716,7 @@ CREATE TABLE `pear_project_collection` (
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '成员id',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '加入时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 47 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-收藏表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_collection
@ -1653,7 +1734,11 @@ CREATE TABLE `pear_project_config` (
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`project_code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目配置表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目配置表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_config
-- ----------------------------
-- ----------------------------
-- Table structure for pear_project_features
@ -1672,7 +1757,7 @@ CREATE TABLE `pear_project_features` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `organization_code`(`organization_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '版本库表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_features
@ -1698,7 +1783,11 @@ CREATE TABLE `pear_project_info` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `organization_code`(`organization_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目自定义信息表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 3 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目自定义信息表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_info
-- ----------------------------
-- ----------------------------
-- Table structure for pear_project_log
@ -1708,7 +1797,7 @@ CREATE TABLE `pear_project_log` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '',
`member_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '0' COMMENT '操作人id',
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '操作内容',
`content` text CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL COMMENT '操作内容',
`remark` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL,
`type` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'create' COMMENT '操作类型',
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '添加时间',
@ -1723,7 +1812,7 @@ CREATE TABLE `pear_project_log` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `member_code`(`member_code`) USING BTREE,
INDEX `source_code`(`source_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4468 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4468 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_log
@ -2333,7 +2422,7 @@ CREATE TABLE `pear_project_member` (
`authorize` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '角色',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `unique`(`project_code`, `member_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-成员表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_member
@ -2385,7 +2474,7 @@ CREATE TABLE `pear_project_menu` (
`values` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '参数默认值',
`show_slider` tinyint(1) NULL DEFAULT 1 COMMENT '是否显示侧栏',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 169 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目菜单表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 169 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目菜单表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_menu
@ -2440,7 +2529,7 @@ CREATE TABLE `pear_project_node` (
`create_at` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_system_node_node`(`node`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 641 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目端节点表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 641 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目端节点表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_node
@ -2633,7 +2722,11 @@ CREATE TABLE `pear_project_report` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `union`(`project_code`, `date`) USING BTREE,
INDEX `code`(`project_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目报表统计表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_report
-- ----------------------------
-- ----------------------------
-- Table structure for pear_project_template
@ -2652,7 +2745,7 @@ CREATE TABLE `pear_project_template` (
`is_system` tinyint(1) NULL DEFAULT 0 COMMENT '系统默认',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 20 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '项目类型表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_template
@ -2684,7 +2777,7 @@ CREATE TABLE `pear_project_version` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `organization_code`(`organization_code`) USING BTREE,
INDEX `features_code`(`features_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目版本表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目版本表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_version
@ -2713,7 +2806,7 @@ CREATE TABLE `pear_project_version_log` (
UNIQUE INDEX `code`(`code`) USING BTREE,
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `features_code`(`features_code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 23 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '项目日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_project_version_log
@ -2751,7 +2844,7 @@ CREATE TABLE `pear_source_link` (
`sort` int(11) NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源关联表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '资源关联表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_source_link
@ -2769,7 +2862,7 @@ CREATE TABLE `pear_system_config` (
`value` varchar(500) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '配置值',
PRIMARY KEY (`id`) USING BTREE,
INDEX `index_system_config_name`(`name`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统参数配置' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 46 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统参数配置' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_system_config
@ -2818,7 +2911,11 @@ CREATE TABLE `pear_system_log` (
`content` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '操作内容描述',
`create_at` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建时间',
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统操作日志表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_system_log
-- ----------------------------
-- ----------------------------
-- Table structure for pear_task
@ -2828,7 +2925,7 @@ CREATE TABLE `pear_task` (
`id` int(11) UNSIGNED NOT NULL AUTO_INCREMENT,
`code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '编号',
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '项目编号',
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
`pri` tinyint(3) UNSIGNED NULL DEFAULT 0 COMMENT '紧急程度',
`execute_status` enum('wait','doing','done','pause','cancel','closed') CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT 'wait' COMMENT '执行状态',
`description` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '详情',
@ -2863,7 +2960,7 @@ CREATE TABLE `pear_task` (
INDEX `project_code`(`project_code`) USING BTREE,
INDEX `pcode`(`pcode`) USING BTREE,
INDEX `sort`(`sort`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 12363 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 12363 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task
@ -2963,7 +3060,7 @@ CREATE TABLE `pear_task_like` (
`create_time` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务点赞表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 117 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务点赞表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_like
@ -2995,7 +3092,7 @@ CREATE TABLE `pear_task_member` (
`is_owner` tinyint(1) NULL DEFAULT 0 COMMENT '是否创建人',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 273 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务-成员表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 273 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务-成员表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_member
@ -3263,7 +3360,7 @@ CREATE TABLE `pear_task_stages` (
`deleted` tinyint(1) NULL DEFAULT 0 COMMENT '删除标记',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 77 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_stages
@ -3319,7 +3416,7 @@ CREATE TABLE `pear_task_stages_template` (
`code` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '编号',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表模板表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 84 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务列表模板表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_stages_template
@ -3360,7 +3457,7 @@ CREATE TABLE `pear_task_tag` (
`create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_tag
@ -3381,7 +3478,7 @@ CREATE TABLE `pear_task_to_tag` (
`create_time` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 138 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签映射表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 138 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务标签映射表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_to_tag
@ -3409,7 +3506,11 @@ CREATE TABLE `pear_task_work_time` (
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `id`(`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工时表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工时表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_work_time
-- ----------------------------
-- ----------------------------
-- Table structure for pear_task_workflow
@ -3425,7 +3526,7 @@ CREATE TABLE `pear_task_workflow` (
`project_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '项目id',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_workflow
@ -3451,7 +3552,7 @@ CREATE TABLE `pear_task_workflow_rule` (
`sort` int(10) NULL DEFAULT 0 COMMENT '排序',
PRIMARY KEY (`id`) USING BTREE,
UNIQUE INDEX `code`(`code`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流规则表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '任务工作流规则表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_task_workflow_rule
@ -3483,6 +3584,10 @@ CREATE TABLE `pear_user_token` (
`client_type` varchar(10) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '客户端类型 android wap',
`login_ip` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '登录ip',
PRIMARY KEY (`token_id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'PC端登录令牌表' ROW_FORMAT = Compact;
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'PC端登录令牌表' ROW_FORMAT = COMPACT;
-- ----------------------------
-- Records of pear_user_token
-- ----------------------------
SET FOREIGN_KEY_CHECKS = 1;

View File

@ -305,12 +305,12 @@ class FileService
* @param string $content
* @return array|null
*/
public static function local($filename, $content)
public static function local($filename, $content, $append = false)
{
try {
$realfile = env('root_path') . $filename;
!file_exists(dirname($realfile)) && mkdir(dirname($realfile), 0755, true);
if (file_put_contents($realfile, $content)) {
if (file_put_contents($realfile, $content, $append ? FILE_APPEND : 0)) {
$url = pathinfo(request()->baseFile(true), PATHINFO_DIRNAME) . '/' . $filename;
return ['file' => $realfile, 'hash' => md5_file($realfile), 'key' => "{$filename}", 'url' => $url];
}
@ -328,7 +328,7 @@ class FileService
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public static function qiniu($filename, $content)
public static function qiniu($filename, $content, $append = false)
{
$auth = new Auth(sysconf('storage_qiniu_access_key'), sysconf('storage_qiniu_secret_key'));
$token = $auth->uploadToken(sysconf('storage_qiniu_bucket'));
@ -351,7 +351,7 @@ class FileService
* @throws \think\Exception
* @throws \think\exception\PDOException
*/
public static function oss($filename, $content)
public static function oss($filename, $content, $append = false)
{
try {
$endpoint = 'http://' . sysconf('storage_oss_domain');

BIN
vendor.zip Normal file

Binary file not shown.