diff --git a/crmeb/app/adminapi/controller/v1/application/routine/RoutineTemplate.php b/crmeb/app/adminapi/controller/v1/application/routine/RoutineTemplate.php index 1e28c55a6..621548ad3 100644 --- a/crmeb/app/adminapi/controller/v1/application/routine/RoutineTemplate.php +++ b/crmeb/app/adminapi/controller/v1/application/routine/RoutineTemplate.php @@ -221,7 +221,7 @@ class RoutineTemplate extends AuthController $qrcode = app()->make(QrcodeServices::class); $resForever = $qrcode->qrCodeForever(0, 'code'); if ($resForever) { - $resCode = MiniProgramService::qrcodeService()->appCodeUnlimit($resForever->id, '', 280); + $resCode = MiniProgramService::appCodeUnlimitService($resForever->id, '', 280); $res = ['res' => $resCode, 'id' => $resForever->id]; } else { $res = false; diff --git a/crmeb/app/adminapi/controller/v1/setting/LangCode.php b/crmeb/app/adminapi/controller/v1/setting/LangCode.php index e0d05c6c0..f56b92416 100644 --- a/crmeb/app/adminapi/controller/v1/setting/LangCode.php +++ b/crmeb/app/adminapi/controller/v1/setting/LangCode.php @@ -71,6 +71,7 @@ class LangCode extends AuthController ['is_admin', 0], ['code', ''], ['remarks', ''], + ['edit', 0], ['list', []] ]); $this->services->langCodeSave($data); diff --git a/crmeb/app/adminapi/controller/v1/system/SystemFile.php b/crmeb/app/adminapi/controller/v1/system/SystemFile.php index f1121eb3b..1cedf0fbc 100644 --- a/crmeb/app/adminapi/controller/v1/system/SystemFile.php +++ b/crmeb/app/adminapi/controller/v1/system/SystemFile.php @@ -84,7 +84,7 @@ class SystemFile extends AuthController { $comment = $this->request->param('comment'); $filepath = $this->request->param('filepath'); - if (empty($comment) || empty($filepath)) { + if (empty($filepath)) { return app('json')->fail(410087); } $res = $this->services->savefile($filepath, $comment); @@ -104,15 +104,34 @@ class SystemFile extends AuthController */ public function createFolder() { - [$path] = $this->request->postMore([ - ['path', ''] + [$path,$name] = $this->request->postMore([ + ['path', ''], + ['name', ''] ], true); + if (empty($path) || empty($name)) { + return app('json')->fail(410087); + } + $data = []; try { - $this->services->createFolder($path); + $res = $this->services->createFolder($path,$name); + if($res) + { + $data = [ + 'children' => [], + 'contextmenu'=> true, + 'isDir'=> true, + 'loading'=> false, + 'path'=> $path, + 'pathname'=> $path . DS . $name, + 'title'=> $name, + ]; + }else{ + return app('json')->fail(100005); + } } catch (\Exception $e) { return app('json')->fail($e->getMessage()); } - return app('json')->success(100010); + return app('json')->success($data); } /** @@ -124,15 +143,34 @@ class SystemFile extends AuthController */ public function createFile() { - [$path] = $this->request->postMore([ - ['path', ''] + [$path,$name] = $this->request->postMore([ + ['path', ''], + ['name', ''] ], true); + if (empty($path) || empty($name)) { + return app('json')->fail(410087); + } + $data = []; try { - $this->services->createFile($path); + $res = $this->services->createFile($path,$name); + if($res) + { + $data = [ + 'children' => [], + 'contextmenu'=> true, + 'isDir'=> false, + 'loading'=> false, + 'path'=> $path, + 'pathname'=> $path . DS . $name, + 'title'=> $name, + ]; + }else{ + return app('json')->fail(100005); + } } catch (\Exception $e) { return app('json')->fail($e->getMessage()); } - return app('json')->success(100010); + return app('json')->success($data); } /** @@ -147,6 +185,9 @@ class SystemFile extends AuthController [$path] = $this->request->postMore([ ['path', ''] ], true); + if (empty($path)) { + return app('json')->fail(410087); + } try { $this->services->delFolder($path); } catch (\Exception $e) { @@ -155,6 +196,24 @@ class SystemFile extends AuthController return app('json')->success(100010); } + public function rename() + { + [$newname,$oldname] = $this->request->postMore([ + ['newname', ''], + ['oldname', ''] + ], true); + if (empty($newname) || empty($oldname)) { + return app('json')->fail(410087); + } + try { + $this->services->rename($newname,$oldname); + } catch (\Exception $e) { + return app('json')->fail($e->getMessage()); + } + return app('json')->success(100010); + + } + public function copyFolder() { @@ -162,6 +221,9 @@ class SystemFile extends AuthController ['surDir', ''], ['toDir', ''] ], true); + if (empty($surDir) || empty($toDir)) { + return app('json')->fail(410087); + } try { return app('json')->success($this->services->copyFolder($surDir, $toDir)); } catch (\Exception $e) { diff --git a/crmeb/app/adminapi/route/system.php b/crmeb/app/adminapi/route/system.php index d807472dd..6ea8afc06 100644 --- a/crmeb/app/adminapi/route/system.php +++ b/crmeb/app/adminapi/route/system.php @@ -114,6 +114,7 @@ Route::group('system', function () { Route::get('file/createFolder', 'v1.system.SystemFile/createFolder')->option(['real_name' => '创建文件夹']); Route::get('file/createFile', 'v1.system.SystemFile/createFile')->option(['real_name' => '创建文件']); Route::get('file/delFolder', 'v1.system.SystemFile/delFolder')->option(['real_name' => '删除文件夹']); + Route::get('file/rename', 'v1.system.SystemFile/rename')->option(['real_name' => '重命名文件夹']); })->middleware([ \app\http\middleware\AllowOriginMiddleware::class, \app\adminapi\middleware\AdminEditorTokenMiddleware::class, diff --git a/crmeb/app/api/controller/v1/PublicController.php b/crmeb/app/api/controller/v1/PublicController.php index 4642333e0..4f762b3dc 100644 --- a/crmeb/app/api/controller/v1/PublicController.php +++ b/crmeb/app/api/controller/v1/PublicController.php @@ -638,4 +638,13 @@ class PublicController }, 3600); return app('json')->success([$range => $lang]); } + + /** + * 获取版本号 + * @return mixed + */ + public function getVersion() + { + return app('json')->success(['version' => get_crmeb_version()]); + } } diff --git a/crmeb/app/api/controller/v1/user/UserBillController.php b/crmeb/app/api/controller/v1/user/UserBillController.php index f60dc0c4b..054d4fd9a 100644 --- a/crmeb/app/api/controller/v1/user/UserBillController.php +++ b/crmeb/app/api/controller/v1/user/UserBillController.php @@ -180,7 +180,7 @@ class UserBillController } if (!$imageInfo) { $resForever = $qrCode->qrCodeForever($user['uid'], 'spread', '', ''); - $resCode = MiniProgramService::qrcodeService()->appCodeUnlimit($resForever->id, '', 280); + $resCode = MiniProgramService::appCodeUnlimitService($resForever->id, '', 280); if ($resCode) { $res = ['res' => $resCode, 'id' => $resForever->id]; } else { @@ -363,7 +363,7 @@ class UserBillController $qrCode = app()->make(QrcodeServices::class); if (!$imageInfo) { $resForever = $qrCode->qrCodeForever($user['uid'], 'spread', '', ''); - $resCode = MiniProgramService::qrcodeService()->appCodeUnlimit($resForever->id, '', 280); + $resCode = MiniProgramService::appCodeUnlimitService($resForever->id, '', 280); if ($resCode) { $res = ['res' => $resCode, 'id' => $resForever->id]; } else { diff --git a/crmeb/app/api/route/v1.php b/crmeb/app/api/route/v1.php index 4c3c1aef9..69c550084 100644 --- a/crmeb/app/api/route/v1.php +++ b/crmeb/app/api/route/v1.php @@ -18,6 +18,7 @@ Route::any('wechat/notify', 'v1.wechat.WechatController/notify');//公众号支 Route::any('routine/notify', 'v1.wechat.AuthController/notify');//小程序支付回调 Route::any('pay/notify/:type', 'v1.PayController/notify');//支付回调 Route::get('get_script', 'v1.PublicController/getScript');//获取统计代码 +Route::get('version', 'v1.PublicController/getVersion');//获取统计代码 Route::group(function () { //apple快捷登陆 diff --git a/crmeb/app/dao/BaseDao.php b/crmeb/app/dao/BaseDao.php index 35dfebf3c..6c55c1385 100644 --- a/crmeb/app/dao/BaseDao.php +++ b/crmeb/app/dao/BaseDao.php @@ -493,4 +493,26 @@ abstract class BaseDao // return false; // } } + + /** + * 获取条件数据中的某个值的最大值 + * @param array $where + * @param string $field + * @return mixed + */ + public function getMax(array $where = [], string $field = '') + { + return $this->getModel()->where($where)->max($field); + } + + /** + * 获取条件数据中的某个值的最小值 + * @param array $where + * @param string $field + * @return mixed + */ + public function getMin(array $where = [], string $field = '') + { + return $this->getModel()->where($where)->min($field); + } } diff --git a/crmeb/app/jobs/PosterJob.php b/crmeb/app/jobs/PosterJob.php index bfdcdc2b9..21af7c960 100644 --- a/crmeb/app/jobs/PosterJob.php +++ b/crmeb/app/jobs/PosterJob.php @@ -64,7 +64,7 @@ class PosterJob extends BaseJobs } if (!$imageInfo_routine) { $resForever = $qrcodeService->getForeverQrcode('spread', $user['uid']); - $resCode = MiniProgramService::qrcodeService()->appCodeUnlimit($resForever->id, '', 280); + $resCode = MiniProgramService::appCodeUnlimitService($resForever->id, '', 280); if ($resCode) { $res = ['res' => $resCode, 'id' => $resForever->id]; } else { diff --git a/crmeb/app/kefuapi/controller/Login.php b/crmeb/app/kefuapi/controller/Login.php index eaa7c5bcc..bc1aa0105 100644 --- a/crmeb/app/kefuapi/controller/Login.php +++ b/crmeb/app/kefuapi/controller/Login.php @@ -81,7 +81,9 @@ class Login extends BaseController return app('json')->success([ 'appid' => sys_config('wechat_open_app_id', 'wxc736972a4ca1e2a1'), 'version' => get_crmeb_version(), - 'site_name' => sys_config('site_name') + 'site_name' => sys_config('site_name'), + 'copyright' => sys_config('nncnL_crmeb_copyright'), + 'copyrightImg' => sys_config('nncnL_crmeb_copyright_image'), ]); } diff --git a/crmeb/app/services/activity/bargain/StoreBargainServices.php b/crmeb/app/services/activity/bargain/StoreBargainServices.php index 66ba986af..eacc94bfd 100644 --- a/crmeb/app/services/activity/bargain/StoreBargainServices.php +++ b/crmeb/app/services/activity/bargain/StoreBargainServices.php @@ -805,7 +805,7 @@ class StoreBargainServices extends BaseServices if ($userServices->checkUserPromoter((int)$user['uid'], $user)) { $valueData .= '&spread=' . $user['uid']; } - $res = MiniProgramService::qrcodeService()->appCodeUnlimit($valueData, 'pages/activity/goods_bargain_details/index', 280); + $res = MiniProgramService::appCodeUnlimitService($valueData, 'pages/activity/goods_bargain_details/index', 280); if (!$res) throw new ApiException(400237); $uploadType = (int)sys_config('upload_type', 1); $upload = UploadService::init(); @@ -902,7 +902,7 @@ class StoreBargainServices extends BaseServices if ($userServices->checkUserPromoter((int)$user['uid'], $user)) { $valueData .= '&spread=' . $user['uid']; } - $res = MiniProgramService::qrcodeService()->appCodeUnlimit($valueData, 'pages/activity/goods_bargain_details/index', 280); + $res = MiniProgramService::appCodeUnlimitService($valueData, 'pages/activity/goods_bargain_details/index', 280); if (!$res) throw new ApiException(410167); $uploadType = (int)sys_config('upload_type', 1); $upload = UploadService::init(); diff --git a/crmeb/app/services/activity/combination/StorePinkServices.php b/crmeb/app/services/activity/combination/StorePinkServices.php index fb10d7c7d..f44ea67ec 100644 --- a/crmeb/app/services/activity/combination/StorePinkServices.php +++ b/crmeb/app/services/activity/combination/StorePinkServices.php @@ -589,7 +589,7 @@ class StorePinkServices extends BaseServices if ($userServices->checkUserPromoter((int)$user['uid'], $user)) { $valueData .= '&pid=' . $user['uid']; } - $res = MiniProgramService::qrcodeService()->appCodeUnlimit($valueData, 'pages/activity/goods_combination_status/index', 280); + $res = MiniProgramService::appCodeUnlimitService($valueData, 'pages/activity/goods_combination_status/index', 280); if (!$res) throw new ApiException(410167); $uploadType = (int)sys_config('upload_type', 1); $upload = UploadService::init(); @@ -853,7 +853,7 @@ class StorePinkServices extends BaseServices if ($userServices->checkUserPromoter((int)$user['uid'], $user)) { $valueData .= '&pid=' . $user['uid']; } - $res = MiniProgramService::qrcodeService()->appCodeUnlimit($valueData, 'pages/activity/goods_combination_status/index', 280); + $res = MiniProgramService::appCodeUnlimitService($valueData, 'pages/activity/goods_combination_status/index', 280); if (!$res) throw new ApiException(410167); $uploadType = (int)sys_config('upload_type', 1); $upload = UploadService::init(); diff --git a/crmeb/app/services/agent/AgentManageServices.php b/crmeb/app/services/agent/AgentManageServices.php index 62bdd4ffa..81297aacd 100644 --- a/crmeb/app/services/agent/AgentManageServices.php +++ b/crmeb/app/services/agent/AgentManageServices.php @@ -300,7 +300,7 @@ class AgentManageServices extends BaseServices $qrcode = app()->make(QrcodeServices::class); $resForever = $qrcode->qrCodeForever($uid, 'spread_routine'); if ($resForever) { - $resCode = MiniProgramService::qrcodeService()->appCodeUnlimit($resForever->id, '', 280); + $resCode = MiniProgramService::appCodeUnlimitService($resForever->id, '', 280); $res = ['res' => $resCode, 'id' => $resForever->id]; } else { $res = false; diff --git a/crmeb/app/services/other/QrcodeServices.php b/crmeb/app/services/other/QrcodeServices.php index 44a7222f5..1f8857ae5 100644 --- a/crmeb/app/services/other/QrcodeServices.php +++ b/crmeb/app/services/other/QrcodeServices.php @@ -278,7 +278,7 @@ class QrcodeServices extends BaseServices } $siteUrl = sys_config('site_url'); if (!$imageInfo) { - $res = MiniProgramService::qrcodeService()->appCodeUnlimit($data, $page, 280); + $res = MiniProgramService::appCodeUnlimitService($data, $page, 280); if (!$res) return false; if ($res->getSize() < 100) return 'unpublished'; $uploadType = (int)sys_config('upload_type', 1); diff --git a/crmeb/app/services/pc/ProductServices.php b/crmeb/app/services/pc/ProductServices.php index 9e34c2340..e18dbdb2d 100644 --- a/crmeb/app/services/pc/ProductServices.php +++ b/crmeb/app/services/pc/ProductServices.php @@ -68,7 +68,7 @@ class ProductServices extends BaseServices $imageInfo = $systemAttachmentService->getOne(['name' => $namePath]); $siteUrl = sys_config('site_url'); if (!$imageInfo) { - $res = MiniProgramService::qrcodeService()->appCodeUnlimit($data, 'pages/goods_details/index', 280); + $res = MiniProgramService::appCodeUnlimitService($data, 'pages/goods_details/index', 280); if (!$res) return false; $uploadType = (int)sys_config('upload_type', 1); $upload = UploadService::init(); diff --git a/crmeb/app/services/statistic/CapitalFlowServices.php b/crmeb/app/services/statistic/CapitalFlowServices.php index d36e8b242..17bb7fc7c 100644 --- a/crmeb/app/services/statistic/CapitalFlowServices.php +++ b/crmeb/app/services/statistic/CapitalFlowServices.php @@ -45,7 +45,7 @@ class CapitalFlowServices extends BaseServices case 'refund': $data['order_id'] = $orderInfo['order_id']; $data['uid'] = $orderInfo['uid']; - $data['price'] = bcmul('-1', $orderInfo['pay_price'], 2); + $data['price'] = bcmul('-1', $orderInfo['refund_price'] ?? $orderInfo['pay_price'], 2); $data['trading_type'] = 2; $data['pay_type'] = $orderInfo['pay_type']; break; diff --git a/crmeb/app/services/system/admin/SystemAdminServices.php b/crmeb/app/services/system/admin/SystemAdminServices.php index 2d78f39b0..b2dd0d08b 100644 --- a/crmeb/app/services/system/admin/SystemAdminServices.php +++ b/crmeb/app/services/system/admin/SystemAdminServices.php @@ -163,6 +163,7 @@ class SystemAdminServices extends BaseServices 'login_logo' => sys_config('login_logo'),//登陆 'site_name' => sys_config('site_name'), 'copyright' => sys_config('nncnL_crmeb_copyright'), + 'version' => get_crmeb_version(), 'key' => $key ]; } diff --git a/crmeb/app/services/system/lang/LangCodeServices.php b/crmeb/app/services/system/lang/LangCodeServices.php index 6bcb9a037..10ed556d2 100644 --- a/crmeb/app/services/system/lang/LangCodeServices.php +++ b/crmeb/app/services/system/lang/LangCodeServices.php @@ -78,10 +78,24 @@ class LangCodeServices extends BaseServices */ public function langCodeSave($data) { + if ($data['edit'] == 0) { + if ($data['is_admin'] == 1) { + $code = $this->dao->getMax(['is_admin' => 1], 'code'); + if ($code < 500000) { + $code = 500000; + } else { + $code = $code + 1; + } + } else { + $code = $data['remarks']; + } + } else { + $code = $data['code']; + } $saveData = []; foreach ($data['list'] as $key => $item) { $saveData[$key] = [ - 'code' => $data['code'], + 'code' => $code, 'remarks' => $data['remarks'], 'lang_explain' => $item['lang_explain'], 'type_id' => $item['type_id'], diff --git a/crmeb/app/services/system/log/SystemFileServices.php b/crmeb/app/services/system/log/SystemFileServices.php index 0495360ee..0422ae206 100644 --- a/crmeb/app/services/system/log/SystemFileServices.php +++ b/crmeb/app/services/system/log/SystemFileServices.php @@ -18,6 +18,7 @@ use app\services\system\admin\SystemAdminServices; use crmeb\exceptions\AdminException; use crmeb\services\CacheService; use crmeb\services\FileService as FileClass; +use think\facade\Log; /** * 文件校验 @@ -180,7 +181,7 @@ class SystemFileServices extends BaseServices { $fileAll = array('dir' => [], 'file' => []); //根目录 - $rootdir = app()->getRootPath(); + $rootdir = $this->formatPath(app()->getRootPath()); // return $rootdir; //当前目录 $request_dir = app('request')->param('dir'); @@ -200,6 +201,7 @@ class SystemFileServices extends BaseServices $dir = !empty($request_dir) ? $request_dir : $rootdir; $dir = rtrim($dir, DS) . DS . app('request')->param('filedir'); } + Log::error(['dir'=>$dir]); $list = scandir($dir); foreach ($list as $key => $v) { if ($v != '.' && $v != '..') { @@ -229,6 +231,7 @@ class SystemFileServices extends BaseServices $navList[$key]['path'] = $value['path']; $navList[$key]['isDir'] = $value['isDir']; $navList[$key]['pathname'] = $value['pathname']; + $navList[$key]['contextmenu'] = true; } return compact('dir', 'list','navList'); } @@ -236,42 +239,67 @@ class SystemFileServices extends BaseServices //读取文件 public function openfile($filepath) { + $filepath = $this->formatPath($filepath); $content = FileClass::readFile($filepath);//防止页面内嵌textarea标签 $ext = FileClass::getExt($filepath); + $encoding = mb_detect_encoding($content, mb_detect_order()); + //前端组件支持的语言类型 + //['plaintext', 'json', 'abap', 'apex', 'azcli', 'bat', 'cameligo', 'clojure', 'coffeescript', 'c', 'cpp', 'csharp', 'csp', 'css', 'dart', 'dockerfile', 'fsharp', 'go', 'graphql', 'handlebars', 'hcl', 'html', 'ini', 'java', 'javascript', 'julia', 'kotlin', 'less', 'lexon', 'lua', 'markdown', 'mips', 'msdax', 'mysql', 'objective-c', 'pascal', 'pascaligo', 'perl', 'pgsql', 'php', 'postiats', 'powerquery', 'powershell', 'pug', 'python', 'r', 'razor', 'redis', 'redshift', 'restructuredtext', 'ruby', 'rust', 'sb', 'scala', 'scheme', 'scss', 'shell', 'sol', 'aes', 'sql', 'st', 'swift', 'systemverilog', 'verilog', 'tcl', 'twig', 'typescript', 'vb', 'xml', 'yaml'] + $extarray = [ - 'js' => 'text/javascript' - , 'htm' => 'text/html' - , 'shtml' => 'text/html' - , 'xml' => 'text/xml' - , 'php' => 'text/x-php' - , 'html' => 'text/html' - , 'sql' => 'text/x-mysql' - , 'css' => 'text/x-scss' - , 'txt'=>'text/plain' + 'js' => 'javascript' + , 'htm' => 'html' + , 'shtml' => 'html' + , 'html' => 'html' + , 'xml' => 'xml' + , 'php' => 'php' + , 'sql' => 'mysql' + , 'css' => 'css' + , 'txt'=>'plaintext' + , 'vue' => 'html' + , 'json' => 'json' + , 'lock' => 'json' + , 'md' => 'markdown' + , 'bat' => 'bat' + , 'ini' => 'ini' + + ]; - $mode = empty($extarray[$ext]) ? 'text/plain' : $extarray[$ext]; - return compact('content', 'mode', 'filepath'); + $mode = empty($extarray[$ext]) ? 'php' : $extarray[$ext]; + return compact('content', 'mode', 'filepath','encoding'); } //保存文件 public function savefile($filepath,$comment) { - //兼容windows - $uname = php_uname('s'); - if (strstr($uname, 'Windows') !== false) - $filepath = ltrim(str_replace('/', DS, $filepath), '.'); + $filepath = $this->formatPath($filepath); if (!FileClass::isWritable($filepath)) { throw new AdminException(400611); } return FileClass::writeFile($filepath, $comment); } + // 文件重命名 + public function rename($newname,$oldname) + { + if (($newname != $oldname) && is_writable($oldname)) { + return rename($oldname, $newname); + } + return true; + } + + /** + * 删除文件或文件夹 + * @param string $path + * @return bool + * + * @date 2022/09/20 + * @author yyw + */ public function delFolder(string $path) { - if (!file_exists($path)) { - return false; - } + $path = $this->formatPath($path); if(is_file($path)) { return unlink($path); @@ -281,7 +309,7 @@ class SystemFileServices extends BaseServices $file = $path . '/' . $fileName; if ($fileName != '.' && $fileName != '..') { if (is_dir($file)) { - self::delDir($file); + self::delFolder($file); } else { unlink($file); } @@ -291,15 +319,36 @@ class SystemFileServices extends BaseServices return rmdir($path); } - public function createFolder(string $path, int $permissions = 0755) + /** + * 新建文件夹 + * @param string $path + * @param string $name + * @param int $permissions + * @return bool + * + * @date 2022/09/20 + * @author yyw + */ + public function createFolder(string $path, string $name, int $permissions = 0755) { + $path = $this->formatPath($path,$name); /** @var FileClass $fileClass */ $fileClass = app()->make(FileClass::class); return $fileClass->createDir($path,$permissions); } - public function createFile(string $path) + /** + * 新建文件 + * @param string $path + * @param string $name + * @return bool + * + * @date 2022/09/20 + * @author yyw + */ + public function createFile(string $path, string $name) { + $path = $this->formatPath($path,$name); /** @var FileClass $fileClass */ $fileClass = app()->make(FileClass::class); return $fileClass->createFile($path); @@ -308,4 +357,28 @@ class SystemFileServices extends BaseServices { return FileClass::copyDir($surDir,$toDir); } + + /** + * 格式化路径 + * @param string $path + * @param string $name + * @return string + * + * @date 2022/09/20 + * @author yyw + */ + public function formatPath(string $path = '',string $name = ''):string + { + if($path) + { + $path = rtrim($path,DS); + if($name) $path = $path . DS . $name; + $uname = php_uname('s'); +// $search = '/'; + if (strstr($uname, 'Windows') !== false) + $path = ltrim(str_replace('\\', '\\\\', $path), '.'); + + } + return $path; + } } diff --git a/crmeb/crmeb/services/pay/storage/AliPay.php b/crmeb/crmeb/services/pay/storage/AliPay.php index 71a7c9933..e9fc3783f 100644 --- a/crmeb/crmeb/services/pay/storage/AliPay.php +++ b/crmeb/crmeb/services/pay/storage/AliPay.php @@ -95,7 +95,7 @@ class AliPay extends BasePay implements PayInterface * 支付异步回调 * @return mixed|string */ - public static function handleNotify() + public function handleNotify() { return AliPayService::handleNotify(); } diff --git a/crmeb/crmeb/services/upload/storage/Cos.php b/crmeb/crmeb/services/upload/storage/Cos.php index 088b2bd10..b71b926d3 100644 --- a/crmeb/crmeb/services/upload/storage/Cos.php +++ b/crmeb/crmeb/services/upload/storage/Cos.php @@ -166,11 +166,11 @@ class Cos extends BaseUpload /** * 文件流上传 - * @param string $fileContent + * @param $fileContent * @param string|null $key * @return array|bool|mixed|\StdClass */ - public function stream(string $fileContent, string $key = null) + public function stream($fileContent, string $key = null) { if (!$key) { $key = $this->saveFileName(); diff --git a/crmeb/crmeb/services/upload/storage/Local.php b/crmeb/crmeb/services/upload/storage/Local.php index 31fea9dce..18d1bef77 100644 --- a/crmeb/crmeb/services/upload/storage/Local.php +++ b/crmeb/crmeb/services/upload/storage/Local.php @@ -151,11 +151,11 @@ class Local extends BaseUpload /** * 文件流上传 - * @param string $fileContent + * @param $fileContent * @param string|null $key * @return array|bool|mixed|\StdClass */ - public function stream(string $fileContent, string $key = null) + public function stream($fileContent, string $key = null) { if (!$key) { $key = $this->saveFileName(); diff --git a/crmeb/crmeb/services/upload/storage/Oss.php b/crmeb/crmeb/services/upload/storage/Oss.php index 7d4a4c3f6..cafbe745c 100644 --- a/crmeb/crmeb/services/upload/storage/Oss.php +++ b/crmeb/crmeb/services/upload/storage/Oss.php @@ -156,11 +156,12 @@ class Oss extends BaseUpload /** * 文件流上传 - * @param string $fileContent + * @param $fileContent * @param string|null $key - * @return bool|mixed + * @return array|bool|mixed + * @throws OssException */ - public function stream(string $fileContent, string $key = null) + public function stream($fileContent, string $key = null) { try { if (!$key) { diff --git a/crmeb/crmeb/services/upload/storage/Qiniu.php b/crmeb/crmeb/services/upload/storage/Qiniu.php index 61e201e8a..7b4624363 100644 --- a/crmeb/crmeb/services/upload/storage/Qiniu.php +++ b/crmeb/crmeb/services/upload/storage/Qiniu.php @@ -154,11 +154,11 @@ class Qiniu extends BaseUpload /** * 文件流上传 - * @param string $fileContent + * @param $fileContent * @param string|null $key * @return array|bool|mixed|\StdClass */ - public function stream(string $fileContent, string $key = null) + public function stream($fileContent, string $key = null) { if (!$key) { $key = $this->saveFileName();