This commit is contained in:
aozhiwei 2024-11-06 17:14:17 +08:00
parent 107fbed7b4
commit 684e4b20b2
2 changed files with 3 additions and 1 deletions

View File

@ -2305,6 +2305,7 @@ DROP TABLE IF EXISTS `t_android`;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `t_android` (
`idx` bigint NOT NULL AUTO_INCREMENT COMMENT '自增id',
`robot_id` int(11) NOT NULL DEFAULT '0' COMMENT 'robot_id',
`name` varchar(60) NOT NULL DEFAULT '' COMMENT 'name',
`createtime` int(11) NOT NULL DEFAULT '0' COMMENT '创建时间',
`modifytime` int(11) NOT NULL DEFAULT '0' COMMENT '修改时间',

View File

@ -559,7 +559,8 @@ class ToolsController extends BaseController {
public function genAndroid()
{
mt\Robot::traverse(function ($meta) {
echo 'INSERT INTO t_android(name, createtime, modifytime)VALUES(`' . $meta['name'] . '`,' . myself()->_getNowTime() . ',' . myself()->_getNowTime() . ");\n";
echo 'INSERT INTO t_android(robot_id, name, createtime, modifytime)VALUES('
. $meta['id'] . ",'" . $meta['name'] . "'," . myself()->_getNowTime() . ',' . myself()->_getNowTime() . ");\n";
return true;
});
}