| | |
| | | import java.util.List; |
| | | import java.util.Set; |
| | | |
| | | import com.github.xiaoymin.knife4j.annotations.ApiOperationSupport; |
| | | import com.github.xiaoymin.knife4j.annotations.ApiSort; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.utils.PageUtils; |
| | | import com.ruoyi.system.service.ISysConfigService; |
| | |
| | | */ |
| | | @RestController |
| | | @Api(tags = "登录验证接口") |
| | | @ApiSort(1) |
| | | @Anonymous |
| | | public class SysLoginController { |
| | | @Autowired |
| | |
| | | */ |
| | | @PostMapping("/login") |
| | | @ApiOperation(value = "登录") |
| | | @ApiOperationSupport(order = 1) |
| | | public AjaxResult login(@RequestBody LoginBody loginBody) { |
| | | AjaxResult ajax = AjaxResult.success(); |
| | | // 生成令牌 |
| | |
| | | */ |
| | | @GetMapping("getInfo") |
| | | @ApiOperation(value = "获取用户信息") |
| | | @ApiOperationSupport(order = 2) |
| | | public AjaxResult getInfo() { |
| | | SysUser user = SecurityUtils.getLoginUser().getUser(); |
| | | // 赋值融云token到用户信息 |
| | |
| | | -- 菜单 SQL |
| | | insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', now(), '', null, '${functionName}菜单'); |
| | | insert into sys_menu (menu_name,menu_name_i18n, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}','', '${parentMenuId}', '1', '${businessName}', '${moduleName}/${businessName}/index', 1, 0, 'C', '0', '0', '${permissionPrefix}:list', '#', 'admin', now(), '', null, '${functionName}菜单'); |
| | | |
| | | -- 按钮父菜单ID |
| | | SELECT @parentId := LAST_INSERT_ID(); |
| | | |
| | | -- SELECT @parentId := LAST_INSERT_ID(); |
| | | with parentId as (select lastval() seq ) |
| | | -- 按钮 SQL |
| | | insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', now(), '', null, ''); |
| | | insert into sys_menu (menu_name,menu_name_i18n, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values |
| | | ('${functionName}查询','query', (select seq from parentId), '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', now(), '', null, ''), |
| | | ('${functionName}新增','add', (select seq from parentId), '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', now(), '', null, ''), |
| | | ('${functionName}修改','edit', (select seq from parentId), '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '', null, ''), |
| | | ('${functionName}删除','remove', (select seq from parentId), '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '', null, ''), |
| | | ('${functionName}导出','export', (select seq from parentId), '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', now(), '', null, ''); |
| | | |
| | | insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', now(), '', null, ''); |
| | | |
| | | insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '', null, ''); |
| | | |
| | | insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '', null, ''); |
| | | |
| | | insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', now(), '', null, ''); |
| | | ##insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | ##values('${functionName}查询', @parentId, '1', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:query', '#', 'admin', now(), '', null, ''); |
| | | ## |
| | | ##insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | ##values('${functionName}新增', @parentId, '2', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:add', '#', 'admin', now(), '', null, ''); |
| | | ## |
| | | ##insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | ##values('${functionName}修改', @parentId, '3', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:edit', '#', 'admin', now(), '', null, ''); |
| | | ## |
| | | ##insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | ##values('${functionName}删除', @parentId, '4', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:remove', '#', 'admin', now(), '', null, ''); |
| | | ## |
| | | ##insert into sys_menu (menu_name, parent_id, order_num, path, component, is_frame, is_cache, menu_type, visible, status, perms, icon, create_by, create_time, update_by, update_time, remark) |
| | | ##values('${functionName}导出', @parentId, '5', '#', '', 1, 0, 'F', '0', '0', '${permissionPrefix}:export', '#', 'admin', now(), '', null, ''); |
| | |
| | | </el-table-column> |
| | | #elseif($column.list && "" != $column.dictType) |
| | | <el-table-column label="${comment}" align="center" prop="${javaField}"> |
| | | <template slot-scope="scope"> |
| | | #if($column.htmlType == "checkbox") |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> |
| | | #else |
| | | <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> |
| | | #end |
| | | </template> |
| | | ## <template slot-scope="scope"> |
| | | ###if($column.htmlType == "checkbox") |
| | | ## <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField} ? scope.row.${javaField}.split(',') : []"/> |
| | | ###else |
| | | ## <dict-tag :options="dict.type.${column.dictType}" :value="scope.row.${javaField}"/> |
| | | ###end |
| | | ## </template> |
| | | </el-table-column> |
| | | #elseif($column.list && "" != $javaField) |
| | | <el-table-column label="${comment}" align="center" prop="${javaField}" /> |