dataLists(new CustomerLists()); } /** * @notes 同步企业微信客户 */ public function sync() { $result = CustomerLogic::syncCustomers(); if ($result === false) { return $this->fail(CustomerLogic::getError()); } return $this->success('同步成功', $result); } /** * @notes 获取统计信息 */ public function stats() { $stats = CustomerLogic::getStats(); return $this->data($stats); } /** * @notes 获取同步设置 */ public function getSyncSettings() { $settings = CustomerLogic::getSyncSettings(); return $this->data($settings); } /** * @notes 保存同步设置 */ public function saveSyncSettings() { $params = (new CustomerValidate())->post()->goCheck('syncSettings'); $result = CustomerLogic::saveSyncSettings($params); if ($result === false) { return $this->fail(CustomerLogic::getError()); } return $this->success('保存成功'); } }