chore: 添加静态资源文件和版本配置文件

添加大量图片、字体、音频等静态资源文件,包括用户界面图片、模板文件和安装界面素材
添加系统版本配置文件(.version)和常量定义文件(.constant)
更新供应商依赖文件,包括Symfony VarDumper组件和相关许可证文件
添加验证码配置文件(captcha.php)和.gitignore规则
This commit is contained in:
2026-03-06 20:14:23 +08:00
commit c9a98f342c
4485 changed files with 490986 additions and 0 deletions

View File

@@ -0,0 +1,39 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\dao\message\service;
use app\dao\other\queue\QueueAuxiliaryDao;
use crmeb\basic\BaseModel;
/**
* 客服辅助表
* Class StoreServiceAuxiliaryDao
* @package app\dao\message\service
*/
class StoreServiceAuxiliaryDao extends QueueAuxiliaryDao
{
/**
* 搜索
* @param array $where
* @param bool $search
* @return BaseModel
* @throws \ReflectionException
*/
public function search(array $where = [], bool $search = true)
{
return parent::search($where, $search)->where('type', 0);
}
}

View File

@@ -0,0 +1,96 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\dao\message\service;
use app\dao\BaseDao;
use app\model\message\service\StoreService;
/**
* 客服dao
* Class StoreServiceDao
* @package app\dao\message\service
*/
class StoreServiceDao extends BaseDao
{
/**
* 不存在的用户直接禁止掉
* @param array $uids
* @return bool
*/
public function deleteNonExistentService(array $uids = [])
{
if ($uids) {
return $this->getModel()->whereIn('uid', $uids)->update(['status' => 0]);
} else {
return true;
}
}
/**
* 设置模型
* @return string
*/
protected function setModel(): string
{
return StoreService::class;
}
/**
* 获取客服列表
* @param array $where
* @param int $page
* @param int $limit
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getServiceList(array $where, int $page, int $limit)
{
return $this->search($where)->with('user')->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->when(isset($where['noId']), function ($query) use ($where) {
$query->whereNotIn('uid', $where['noId']);
})->with(['workMember' => function ($query) {
$query->field(['uid', 'name', 'position', 'qr_code', 'external_position']);
}])->order('id DESC')->field('id,uid,avatar,nickname as wx_name,status,add_time,phone,account_status')->select()->toArray();
}
/**
* 获取接受通知的客服
* @param int $customer
* @param string $field
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getStoreServiceOrderNotice(int $customer = 0, string $field = 'nickname,phone,uid,customer')
{
return $this->getModel()->where(['account_status' => 1, 'status' => 1, 'notify' => 1])->when($customer, function ($query) use ($customer) {
$query->where('customer', $customer);
})->field($field)->select()->toArray();
}
/**
*
* @param array $where
* @param array $data
* @return \crmeb\basic\BaseModel
*/
public function updateOnline(array $where, array $data)
{
return $this->getModel()->whereNotIn('uid', $where['notUid'])->update($data);
}
}

View File

@@ -0,0 +1,44 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\dao\message\service;
use app\dao\BaseDao;
use app\model\message\service\StoreServiceFeedback;
/**
* Class StoreServiceFeedbackDao
* @package app\dao\message\service
*/
class StoreServiceFeedbackDao extends BaseDao
{
protected function setModel(): string
{
return StoreServiceFeedback::class;
}
/**
* 获取用户反馈信息列表
* @param array $where
* @param int $page
* @param int $limit
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getFeedback(array $where, int $page, int $limit)
{
return $this->search($where)->page($page, $limit)->order('id DESC')->select()->toArray();
}
}

View File

@@ -0,0 +1,142 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\dao\message\service;
use app\dao\BaseDao;
use app\model\message\service\StoreServiceLog;
/**
*
* Class StoreServiceLogDao
* @package app\dao\service
*/
class StoreServiceLogDao extends BaseDao
{
/**
* StoreServiceLogDao constructor.
*/
public function __construct()
{
//清楚去年的聊天记录
// $this->removeChat();
$this->removeYesterDayChat();
}
/**
* 设置模型
* @return string
*/
protected function setModel(): string
{
return StoreServiceLog::class;
}
/**
* 获取聊天记录下的uid和to_uid
* @param int $uid
* @return mixed
*/
public function getServiceUserUids(int $uid)
{
return $this->search(['uid' => $uid])->group('uid,to_uid')->field(['uid', 'to_uid'])->select()->toArray();
}
/**
* 获取聊天记录并分页
* @param array $where
* @param int $page
* @param int $limit
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getServiceList(array $where, int $page, int $limit, array $field = ['*'])
{
return $this->search($where)->with('user')->field($field)->order('add_time DESC')->page($page, $limit)->select()->toArray();
}
/**
* 获取聊天记录上翻页
* @param array $where
* @param int $limit
* @param int $upperId
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getChatList(array $where, int $limit = 20, int $upperId = 0)
{
return $this->search($where)->when($upperId, function ($query) use ($upperId, $limit) {
$query->where('id', '<', $upperId)->limit($limit)->order('id DESC');
})->when(!$upperId, function ($query) use ($limit) {
$query->limit($limit)->order('id DESC');
})->with(['user', 'service'])->select()->toArray();
}
/**
* 清楚去年的聊天记录
* @return bool
*/
public function removeChat()
{
return $this->search(['time' => 'last year'])->delete();
}
/**
* 清楚上周的游客用户聊天记录
* @return bool
*/
public function removeYesterDayChat()
{
return $this->search(['time' => 'last week', 'is_tourist' => 1])->delete();
}
/**
* 根据条件获取条数
* @param array $where
* @return int
*/
public function whereByCount(array $where)
{
return $this->search(['uid' => $where['uid']])->order('id DESC')->where('add_time', '<', time() - 300)->count();
}
/**
* 获取未读消息条数
* @param array $where
* @return int
*/
public function getMessageNum(array $where)
{
return $this->getModel()->where($where)->count();
}
/**
* 搜索聊天记录
* @param array $where
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getMessageList(array $where)
{
return $this->search(['chat' => $where['chat']])->when(isset($where['add_time']) && $where['add_time'], function ($query) use ($where) {
$query->where('add_time', '>', $where['add_time']);
})->select()->toArray();
}
}

View File

@@ -0,0 +1,92 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\dao\message\service;
use app\dao\BaseDao;
use app\model\message\service\StoreServiceRecord;
/**
* Class StoreServiceRecordDao
* @package app\dao\message\service
*/
class StoreServiceRecordDao extends BaseDao
{
/**
* StoreServiceRecordDao constructor.
*/
public function __construct()
{
$this->deleteWeekRecord();
}
/**
* 设置模型
* @return string
*/
protected function setModel(): string
{
return StoreServiceRecord::class;
}
/**
* 删除上周游客记录
*/
protected function deleteWeekRecord()
{
$this->search(['time' => 'last week', 'timeKey' => 'update_time', 'is_tourist' => 1])->delete();
}
/**
*
* @param array $where
* @param array $data
* @return \crmeb\basic\BaseModel
*/
public function updateOnline(array $where, array $data)
{
return $this->getModel()->whereNotIn('to_uid', $where['notUid'])->update($data);
}
/**
* 获取客服聊天用户列表
* @param array $where
* @param int $page
* @param int $limit
* @param array $with
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getServiceList(array $where, int $page, int $limit, array $with = [])
{
return $this->search($where)->page($page, $limit)->when(count($with), function ($query) use ($with) {
$query->with($with);
})->order('update_time desc')->select()->toArray();
}
/**
* 查询最近和用户聊天的uid用户
* @param array $where
* @param string $key
* @return array|\think\Model|null
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getLatelyMsgUid(array $where, string $key)
{
return $this->search($where)->order('update_time DESC')->value($key);
}
}

View File

@@ -0,0 +1,50 @@
<?php
// +----------------------------------------------------------------------
// | CRMEB [ CRMEB赋能开发者,助力企业发展 ]
// +----------------------------------------------------------------------
// | Copyright (c) 2016~2026 https://www.crmeb.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed CRMEB并不是自由软件,未经许可不能去掉CRMEB相关版权
// +----------------------------------------------------------------------
// | Author: CRMEB Team <admin@crmeb.com>
// +----------------------------------------------------------------------
namespace app\dao\message\service;
use app\dao\BaseDao;
use app\model\message\service\StoreServiceSpeechcraft;
/**
* 客服话术dao
* Class StoreServiceSpeechcraftDao
* @package app\dao\message\service
*/
class StoreServiceSpeechcraftDao extends BaseDao
{
/**
* 设置模型
* @return string
*/
protected function setModel(): string
{
return StoreServiceSpeechcraft::class;
}
/**
* 获取话术列表
* @param array $where
* @param int $page
* @param int $limit
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\DbException
* @throws \think\db\exception\ModelNotFoundException
*/
public function getSpeechcraftList(array $where, int $page, int $limit)
{
return $this->search($where)->when($page && $limit, function ($query) use ($page, $limit) {
$query->page($page, $limit);
})->order('sort DESC')->select()->toArray();
}
}