This commit is contained in:
aozhiwei 2024-11-06 17:19:33 +08:00
parent 66eaf31290
commit a583fcbc43

View File

@ -524,9 +524,19 @@ class ToolsController extends BaseController {
public function genAndroid() public function genAndroid()
{ {
mt\Robot::traverse(function ($meta) { $data = array();
mt\Robot::traverse(function ($meta) use(&$data) {
$row = SqlHelper::ormSelectOne
($this->_getMysql(''),
't_android',
array(
'name' => $meta['name']
)
);
if (!$row) {
echo 'INSERT INTO t_android(robot_id, name, createtime, modifytime)VALUES(' echo 'INSERT INTO t_android(robot_id, name, createtime, modifytime)VALUES('
. $meta['id'] . ",'" . $meta['name'] . "'," . myself()->_getNowTime() . ',' . myself()->_getNowTime() . ");\n"; . $meta['id'] . ",'" . $meta['name'] . "'," . myself()->_getNowTime() . ',' . myself()->_getNowTime() . ");\n";
}
return true; return true;
}); });
} }