Compare commits

..

No commits in common. 'dyb' and 'master' have entirely different histories.
dyb ... master

@ -1,71 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="MessDetectorOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCSFixerOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PHPCodeSnifferOptionsConfiguration">
<option name="highlightLevel" value="WARNING" />
<option name="transferred" value="true" />
</component>
<component name="PhpIncludePathManager">
<include_path>
<path value="$PROJECT_DIR$/vendor/topthink/think-installer" />
<path value="$PROJECT_DIR$/vendor/topthink/think-sae" />
<path value="$PROJECT_DIR$/vendor/pclzip/pclzip" />
<path value="$PROJECT_DIR$/vendor/topthink/think-worker" />
<path value="$PROJECT_DIR$/vendor/phpexcel/PHPExcel" />
<path value="$PROJECT_DIR$/vendor/topthink/think-image" />
<path value="$PROJECT_DIR$/vendor/topthink/think-mongo" />
<path value="$PROJECT_DIR$/vendor/phpspec/prophecy" />
<path value="$PROJECT_DIR$/vendor/composer" />
<path value="$PROJECT_DIR$/vendor/zendframework/zend-escaper" />
<path value="$PROJECT_DIR$/vendor/sebastian/recursion-context" />
<path value="$PROJECT_DIR$/vendor/sebastian/diff" />
<path value="$PROJECT_DIR$/vendor/sebastian/global-state" />
<path value="$PROJECT_DIR$/vendor/sebastian/comparator" />
<path value="$PROJECT_DIR$/vendor/sebastian/environment" />
<path value="$PROJECT_DIR$/vendor/sebastian/exporter" />
<path value="$PROJECT_DIR$/vendor/sebastian/version" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-docblock" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/type-resolver" />
<path value="$PROJECT_DIR$/vendor/phpdocumentor/reflection-common" />
<path value="$PROJECT_DIR$/vendor/doctrine/instantiator" />
<path value="$PROJECT_DIR$/vendor/phpoffice/phpspreadsheet" />
<path value="$PROJECT_DIR$/vendor/webmozart/assert" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-mbstring" />
<path value="$PROJECT_DIR$/vendor/phpoffice/phpword" />
<path value="$PROJECT_DIR$/vendor/symfony/yaml" />
<path value="$PROJECT_DIR$/vendor/phpoffice/common" />
<path value="$PROJECT_DIR$/vendor/symfony/dom-crawler" />
<path value="$PROJECT_DIR$/vendor/phpoffice/phpexcel" />
<path value="$PROJECT_DIR$/vendor/symfony/polyfill-ctype" />
<path value="$PROJECT_DIR$/vendor/workerman/workerman" />
<path value="$PROJECT_DIR$/vendor/psr/simple-cache" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-timer" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-file-iterator" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-text-template" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit" />
<path value="$PROJECT_DIR$/vendor/topthink/think-testing" />
<path value="$PROJECT_DIR$/vendor/markbaker/matrix" />
<path value="$PROJECT_DIR$/vendor/phpunit/phpunit-mock-objects" />
<path value="$PROJECT_DIR$/vendor/topthink/think-helper" />
<path value="$PROJECT_DIR$/vendor/markbaker/complex" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-code-coverage" />
<path value="$PROJECT_DIR$/vendor/topthink/think-queue" />
<path value="$PROJECT_DIR$/vendor/phpunit/php-token-stream" />
<path value="$PROJECT_DIR$/vendor/topthink/think-migration" />
</include_path>
</component>
<component name="PhpProjectSharedConfiguration" php_language_level="8.0">
<option name="suggestChangeDefaultLanguageLevel" value="false" />
</component>
<component name="PhpStanOptionsConfiguration">
<option name="transferred" value="true" />
</component>
<component name="PsalmOptionsConfiguration">
<option name="transferred" value="true" />
</component>
</project>

@ -0,0 +1 @@
open_basedir=/www/wwwroot/72crm/:/tmp/

@ -651,7 +651,7 @@ class User extends Common
$wxuser_id = Session::get('wxuser_id');
if ($wxuser_id) {
$data['authKey'] = $authKey;
$data['authKey'] = 'wxwork';
$userData['wxwork_id'] = $wxuser_id;
} else {
$userData['authkey'] = $authKey;

@ -131,32 +131,30 @@ class Callback extends Controller
if (isset($userInfo['userid']) && $userInfo['userid']) {
Session::set('wxuser_id', $userInfo['userid']);
$adminUser = db('admin_user')->where('wxwork_id', $userInfo['userid'])->find();
if($adminUser['status']==1){
if ($adminUser) {
Session::set('user_id', $adminUser['id']);
if ($adminUser) {
Session::set('user_id', $adminUser['id']);
$info['userInfo'] = $adminUser;
$info['sessionId'] = session_id();
// $info['_AUTH_LIST_'] = $dataList['rulesList'];
$info['authKey'] = 'wxwork';
if (!Cache::get('Auth_wxwork')) {
Cache::set('Auth_wxwork', $info);
}
return redirect('http://web.lbschem.com:8088/?authkey=wxwork&sessionid='.session_id());
} elseif (Session::get('user_id')) {
db('admin_user')->where('id', Session::get('user_id'))->update([
'wxwork_id' => $userInfo['userid']
]);
$adminUser = db('admin_user')->where('id', Session::get('user_id'))->find();
$info['userInfo'] = $adminUser;
$info['sessionId'] = session_id();
// $info['_AUTH_LIST_'] = $dataList['rulesList'];
$info['authKey'] = 'wxwork';
if (!Cache::get('Auth_wxwork')) {
Cache::set('Auth_wxwork', $info);
}
return redirect('http://web.lbschem.com:8088/?authkey=wxwork&sessionid='.session_id());
$info['userInfo'] = $adminUser;
$info['sessionId'] = session_id();
// $info['_AUTH_LIST_'] = $dataList['rulesList'];
$info['authKey'] = 'wxwork';
if (!Cache::get('Auth_wxwork')) {
Cache::set('Auth_wxwork', $info);
}
return redirect('http://web.lbschem.com:8088/?authkey=wxwork&sessionid='.session_id());
} elseif (Session::get('user_id')) {
db('admin_user')->where('id', Session::get('user_id'))->update([
'wxwork_id' => $userInfo['userid']
]);
$adminUser = db('admin_user')->where('id', Session::get('user_id'))->find();
$info['userInfo'] = $adminUser;
$info['sessionId'] = session_id();
// $info['_AUTH_LIST_'] = $dataList['rulesList'];
$info['authKey'] = 'wxwork';
if (!Cache::get('Auth_wxwork')) {
Cache::set('Auth_wxwork', $info);
}
return redirect('http://web.lbschem.com:8088/?authkey=wxwork&sessionid='.session_id());
}
}
return redirect('http://web.lbschem.com:8088/');

@ -31,7 +31,7 @@ class Customer extends ApiCommon
{
$action = [
'permission' => ['exceldownload', 'setfollow', 'delete'],
'allow' => ['read', 'system', 'count', 'poolauthority', 'level','type']
'allow' => ['read', 'system', 'count', 'poolauthority', 'level']
];
Hook::listen('check_auth', $action);
$request = Request::instance();
@ -1195,7 +1195,7 @@ class Customer extends ApiCommon
* @since 2021-03-29
* @author fanqi
*/
public function type()
public function Type()
{
$data = db('admin_field')->where(['types' => 'crm_customer', 'field' => 'crm_lthugd'])->value('options');

@ -103,9 +103,9 @@ class Message extends ApiCommon
$data['todayCustomer'] = (int)$todayCustomerCount;
} else {
$todayCustomer = $this->todayCustomer(true);
$data['todayCustomer'] = $todayCustomer['dataCount'] ? : 0;
cache('todayCustomerCount'.$userInfo['id'], $data['todayCustomer']);
cache('todayCustomerTime'.$userInfo['id'], time() );
$data['todayCustomer'] = $todayCustomer['dataCount'] ?: 0;
cache('todayCustomerCount' . $userInfo['id'], $data['todayCustomer']);
cache('todayCustomerTime' . $userInfo['id'], time());
}
# 今日需联系商机
$todayBusinessTime = cache('todayBusinessTime' . $userInfo['id']);

@ -777,7 +777,7 @@ class Business extends Common
"status_id",
'COUNT(*)' => 'count',
'SUM(`money`)' => 'sum',
// 'type_id'
'type_id'
])
->where($where)
->whereNotIn('is_end', '3')

@ -155,16 +155,15 @@ class Customer extends Common
});
};
}
// 过滤角色
$groupIds = db('admin_access')->where("user_id", array("eq", $user_id))->column("group_id");
if (!in_array(1,$groupIds)){
$groupNameArray = db('admin_group')->where("pid", array("eq", 2))->where("id", array("in", $groupIds))->column("title");
if ($groupNameArray){
if ($groupNameArray)
$map['customer.crm_lthugd'] = array('in', $groupNameArray);
}
}
# 代办事项 - 待进入公海
$remindWhere = [];
if ($is_remind) {
@ -301,8 +300,8 @@ class Customer extends Common
}
}
$data = [];
$data['dataCount'] = $dataCount ?: 0;
$data['list'] = $list ?: [];
$data['dataCount'] = $dataCount ?: 0;
return $data;
}

@ -7,9 +7,9 @@ return [
// 数据库名
'database' => 'wkcrm',
// 用户名
'username' => 'root',
'username' => 'wkcrm',
// 密码
'password' => '123123',
'password' => 'YNKdaMS2XBHKcAh7',
// 端口
'hostport' => '3306',
// 连接dsn

Loading…
Cancel
Save