需求 #12387
搜索提供用户关联品类
0%
描述
需要提供用户市场偏好
市场偏好逻辑:用户近30天在二级市场实际购买的件数倒序排行,仅取排行第一的二级市场。口径是:pay_status=1 and (cancel_reason=0 or order_status<>3)
CREATE TABLE `fmys_data_user_market` (
`user_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '用户id',
`market_id` int(11) NOT NULL DEFAULT '0' COMMENT '市场id',
`auto_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据组同步-用户市场偏好'
需要提供档口品类7天销量
CREATE TABLE `fmys_data_supply_category_sale` (
`supply_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '档口id',
`one_week_sales` int(11) NOT NULL DEFAULT '0' COMMENT '7天销量',
`cat_id` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '品类id',
`auto_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
KEY `supply_id` (`supply_id`,`cat_id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='数据组同步-档口品类7天销量'