#insert {{- range $index,$row := $.param}} INSERT INTO `role` (`role_name`, `status`, `system_type`, `permis_codes`, `data_permis_code`, `is_default`, `is_shown`) VALUES ('{{$row.Name}}', 1, {{$row.SystemType}}, '{{$row.PermisCodesStr}}', '{{$row.DataPermisCode}}', 1, 1); {{- end }} #update {{- range $index,$row := $.param}} update role set permis_codes='{{$row.PermisCodesStr}}',data_permis_code='{{$row.DataPermisCode}}' where role_name='{{$row.Name}}' and system_type=1 and is_default = 1; {{- end }}