库结构 1,目前只建了一个收入表,后期根据需要添加 CREATE TABLE IF NOT EXISTS `wx_app_advertisement` ( `id` int(11) NOT NULL AUTO_INCREMENT, `app_id` int(11) NOT NULL COMMENT '应用id', `date` int(8) NOT NULL COMMENT '广告日期', `ad_slot` varchar(30) NOT NULL COMMENT '广告位类型名称', `slot_id` bigint(16) NOT NULL COMMENT '广告位类型id', `income` int(11) NOT NULL DEFAULT '0' COMMENT '收入(分)', `req_succ_count` int(11) NOT NULL DEFAULT '0' COMMENT '拉取量', `exposure_count` int(11) NOT NULL DEFAULT '0' COMMENT '曝光量', `click_count` int(11) NOT NULL DEFAULT '0' COMMENT '点击量', `ecpm` double NOT NULL DEFAULT '0' COMMENT '广告千次曝光收益(分', `updated_at` int(11) NOT NULL COMMENT '添加时间', PRIMARY KEY (`id`), KEY `date` (`date`), KEY `app_id` (`app_id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='广告收入表'; 2,wx.go--单个应用一段时间内,入库每个广告位置的收入。 3,根据需要修改里面参数,包括小程序的appID,小程序密钥 appSecret,抓取日期,mysql的用户名,密码,库名.