⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 myrightaction.java

📁 本系统基本完善了CRM管理系统的各个模块
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.accp.struts.action;

import java.io.PrintWriter;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import net.sf.json.JSONSerializer;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.actions.DispatchAction;

import com.accp.service.RoleService;
import com.accp.util.RightList;

public class MyRightAction extends DispatchAction {
	private RoleService roleService = null;

	public RoleService getRoleService() {
		return roleService;
	}

	public void setRoleService(RoleService roleService) {
		this.roleService = roleService;
	}

	public ActionForward dofindRightName(ActionMapping mapping,
			ActionForm form, HttpServletRequest request,
			HttpServletResponse response) throws Exception {
		System.out.println("查拥有的权限");
		PrintWriter out = response.getWriter();
		String roleId = request.getParameter("roleId");
		String type = request.getParameter("type");
		System.out.println("角色编号为:" + roleId);
		RightList rl1 = roleService.findRightByRoleId(Long.parseLong(roleId));
		// 转换成JSON数据
		String str1 = JSONSerializer.toJSON(rl1).toString();
		System.out.println(str1);
		out.print(str1);
		return null;
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -