21,886
社区成员
发帖
与我相关
我的任务
分享
CREATE TABLE `customer_apply` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`platform` tinyint(3) unsigned DEFAULT NULL COMMENT '',
`type` tinyint(3) unsigned DEFAULT NULL COMMENT '',
`trade_type` tinyint(3) unsigned DEFAULT NULL COMMENT '',
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`mobile` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`identity_id` varchar(30) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`company_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`shop_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`invitation_code` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`shop_apply_type` tinyint(3) unsigned DEFAULT '1' COMMENT '',
`apply_reason` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`approval_status` tinyint(3) unsigned DEFAULT '1' COMMENT '',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL COMMENT '',
`updated_by` int(10) unsigned DEFAULT NULL COMMENT '',
`deleted_by` int(10) unsigned DEFAULT NULL COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=62 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='';
CREATE TABLE `customer_business` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`customer_id` int(10) unsigned DEFAULT NULL COMMENT '',
`type` tinyint(3) unsigned DEFAULT NULL COMMENT '',
`trade_type` tinyint(3) unsigned DEFAULT NULL COMMENT '',
`name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`identity_id` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`account_name` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`company_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`level` int(10) unsigned DEFAULT NULL COMMENT '',
`category_id` int(10) unsigned DEFAULT NULL COMMENT '',
`platform_name` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`last_year_sales` int(10) unsigned DEFAULT NULL COMMENT '',
`this_year_sales` int(10) unsigned DEFAULT NULL COMMENT '',
`company_address` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`person_in_charge` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`person_in_charge_mobile` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`person_in_charge_qq` varchar(20) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`person_in_charge_mail` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`bank_name` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`bank_account` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`bank_card` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`tax_registration_number` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`belongs_to_seller_id` int(10) unsigned DEFAULT NULL COMMENT '',
`belongs_to_bd_id` int(10) unsigned DEFAULT NULL COMMENT '',
`status` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '',
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL COMMENT '',
`updated_by` int(10) unsigned DEFAULT NULL COMMENT '',
`deleted_by` int(10) unsigned DEFAULT NULL COMMENT '',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='';
CREATE TABLE `customers` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`account` varchar(40) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`password` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`mobile` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '',
`origin` tinyint(3) unsigned DEFAULT NULL COMMENT '',
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
`deleted_at` timestamp NULL DEFAULT NULL,
`created_by` int(10) unsigned DEFAULT NULL COMMENT '',
`updated_by` int(10) unsigned DEFAULT NULL COMMENT '',
`deleted_by` int(10) unsigned DEFAULT NULL COMMENT '',
PRIMARY KEY (`id`),
UNIQUE KEY `customers_mobile_unique` (`mobile`)
) ENGINE=InnoDB AUTO_INCREMENT=87 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='';
#26 {main} {"exception":"[object] (Illuminate\\Database\\QueryException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #17 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'user.customer_business.last_year_sales' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by (SQL: select `customer_apply`.`id`, `customer_apply`.`account`, `customer_apply`.`password`, `customer_apply`.`platform`, `customer_apply`.`type`, `customer_apply`.`trade_type`, `customer_apply`.`name`, `customer_apply`.`mobile`, `customer_apply`.`company_name`, `customer_apply`.`identity_id`, `customer_apply`.`approval_status`, `customer_apply`.`created_at`, `customer_apply`.`updated_at`, `customer_apply`.`created_by`, `customer_apply`.`updated_by`, `customer_apply`.`deleted_by`, `customer_business`.`last_year_sales` from `customer_apply` inner join `customers` on `customers`.`mobile` = `customer_apply`.`mobile` inner join `customer_business` on `customers`.`id` = `customer_business`.`customer_id` where `customer_apply`.`approval_status` in (1) and `customer_apply`.`platform` = 1 and `customer_apply`.`approval_status` = 1 and `customer_apply`.`trade_type` = 1 and `customer_business`.`trade_type` = 1 and `customer_apply`.`deleted_at` is null group by `customer_apply`.`id` limit 10 offset 0) at /var/www/User-DAL/vendor/illuminate/database/Connection.php:664, PDOException(code: 42000): SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #17 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'user.customer_business.last_year_sales' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by at /var/www/User-DAL/vendor/illuminate/database/Connection.php:326)
select `customer_apply`.`id`, `customer_apply`.`account`, `customer_apply`.`password`, `customer_apply`.`platform`, `customer_apply`.`type`, `customer_apply`.`trade_type`, `customer_apply`.`name`, `customer_apply`.`mobile`, `customer_apply`.`company_name`, `customer_apply`.`identity_id`, `customer_apply`.`approval_status`, `customer_apply`.`created_at`, `customer_apply`.`updated_at`, `customer_apply`.`created_by`, `customer_apply`.`updated_by`, `customer_apply`.`deleted_by`, `customer_business`.`last_year_sales` from `customer_apply` inner join `customers` on `customers`.`mobile` = `customer_apply`.`mobile` inner join `customer_business` on `customers`.`id` = `customer_business`.`customer_id` where `customer_apply`.`approval_status` in (1) and `customer_apply`.`platform` = 1 and `customer_apply`.`approval_status` = 1 and `customer_apply`.`trade_type` = 1 and `customer_business`.`trade_type` = 1 and `customer_apply`.`deleted_at` is null group by `customer_apply`.`id` limit 10 offset 0