📄 updateother.jsp
字号:
<%@ page language="java" contentType="text/html; charset=GBK"
pageEncoding="GBK"%>
<%@ page import="com.utils.service.Impl.*" %>
<%@ page import="com.utils.model.*" %>
<%@ page import="java.util.*" %>
<%
String id = request.getParameter("id");
int type = 0;
if(request.getParameter("type")!=null){
type = Integer.parseInt(request.getParameter("type"));
}
String name = request.getParameter("name");
if(name!=null){
name = new String((name).getBytes("ISO-8859-1"),"UTF-8");
}
int cost = 0;
if(request.getParameter("cost")!=null){
cost = Integer.parseInt(request.getParameter("cost"));
}
String times = request.getParameter("times");
String course = request.getParameter("course");
if(course!=null){
course = new String((course).getBytes("ISO-8859-1"),"UTF-8");
}
UtilsServiceImpl utilsControl = new UtilsServiceImpl();
Other other = new Other();
other.setId(id);
if(name!=null){
other.setName(name);
}else{
other.setName("");
}
other.setCost(cost);
other.setType(type);
if(times!=null){
other.setTimes(times);
}else{
other.setTimes("");
}
if(course!=null){
other.setCourse(course);
}else{
other.setCourse("");
}
other.setType(type);
utilsControl.updateOther(other);
String json = "";
json = "{totalProperty:1,'user':["+
"{id:'03101058',personName:'卖月梅',personDept:'开发一部',personPost:'Java程序员',personNational:'汉族',personNarriage:'未婚',personSex:'男',"+
"personBirthday:'1984-4-1',personCulture:'本科',personProfessional:'计算机',personYear:'2年',personLanguage:'4级',personSalary:'3500',personAddress:'茂名',personIDCard:'111',personSocialID:'111',personAge:25,personTel:'111'}"+
"]}";
response.getWriter().write(json);
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -