日期:2014-05-20 浏览次数:20749 次
<form method="POST" action="padd.html" >
权限ID: <input id="aid" type="text" name="aid" />
权限名称: <input id="aname" type="text" name="aname" />
<input type="submit" value="Submit" />
</form>
/**
*
*/
package org.clas.controller;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.clas.model.Tpermission;
import org.clas.service.TpermissionService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @author jiangenbo
*
* 转移转化平台权限控制管理
*/
@Controller
public class AuthorityController {
/**
* @author jiangenbo
*
* 添加权限信息
*/
private TpermissionService tpermissionService;
private Tpermission tpermission;
@RequestMapping("/padd")
public void PermissionAdd(HttpServletRequest request, HttpServletResponse response){
String authid = request.getParameter("aid");
String auname = request.getParameter("aname");
System.out.println("aid==" + authid);
System.out.println("aname==" + auname);
tpermission.setAuthid(authid);
tpermission.setAuthname(auname);
tpermissionService.save(this.getTpermission());
//return 1;
}
public TpermissionService getTpermissionService() {
return tpermissionService;
}
public void setTpermissionService(TpermissionService tpermissionService) {
this.tpermissionService = tpermissionService;
}
public Tpermission getTpermission() {
return tpermission;
}
public void setTpermission(Tpermission tpermission) {
this.tpermission = tpermission;
}
}