|
cactus单元测试中
out.write和request.getParameter("employee_id")在同一个方法里,现在我知道都能都通过WebResponse response的getText()方法获得。我需要分别获得他们的值,该怎么办
if (!__EnterPriceUser.havePower("3.16")) {
out.write(RowSet2Json.failureTwo("您没有权限"));
return;
}
if(request.getParameter("employee_id")==null){
out.write(RowSet2Json.Failure("请填写工号!"));
return;
}
employee_id, customer_ip);
if (result > 0) {
out.write(RowSet2Json.Success("添加工号成功!"));
} else {
switch (result) {
case -1:
out.write(RowSet2Json.Failure("账号不存在,添加失败,请先申请一个账号!"));
break;
case -2:
out.write(RowSet2Json.Failure("此工号已存在,添加失败!"));
break;
default:
out.write(RowSet2Json.CatchFailure());
break;
}
} |
|