基于javaweb+mysql的ssm校园心理咨询服务系统(java+ssm+jsp+bootstrap+jquery+mysql)
运行环境
Java≥8、MySQL≥5.7、Tomcat≥8
开发工具
eclipse/idea/myeclipse/sts等均可配置运行
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
功能说明
基于javaweb+mysql的SSM校园心理咨询服务系统(java+ssm+jsp+bootstrap+jquery+mysql)
功能介绍
基于SSM校园心理咨询服务平台系统分为学生、教师、管理员三种角色。
用户角色主要包括用户注册、用户登录、在线咨询、心理测试、论坛交流、账户维护等功能;
教师角色主要包括教师登录、文章管理、在线回复等功能;
管理员角色主要包括学生管理、教师管理、试题库管理、测试分类管理、试卷管理、新闻管理、系统介绍管理、会员评论管理、轮播图管理、友情链接管理、后台用户管理等功能;
最后根据详细设计的结果,运用JavaEE技术平台,使用更灵活的B/S开发模式和经典的SSM组合框架实现系统的MVC分层架构,并结合MySQL数据库实现了大学生心理减压系统的信息化管理。
环境需要
1.运行环境:最好是java jdk 1.8,我们在这个平台上运行的。其他版本理论上也可以。 2.IDE环境:IDEA,Eclipse,Myeclipse都可以。推荐IDEA; 3.tomcat环境:Tomcat 7.x,8.x,9.x版本均可 4.硬件环境:windows 7/8/10 1G内存以上;或者 Mac OS; 5.是否Maven项目: 否;查看源码目录中是否包含pom.xml;若包含,则为maven项目,否则为非maven项目 6.数据库:MySql 5.7版本;
技术栈
- 后端:Spring SpringMVC MyBatis 2. 前端:JSP+bootstrap+jQuery
使用说明
- 使用IDEA/Eclipse/MyEclipse导入项目,Eclipse/MyEclipse导入时,若为maven项目请选择maven; 若为maven项目,导入成功后请执行maven clean;maven install命令,下载所需jar包; 2. 使用Navicat或者其它工具,在mysql中创建对应名称的数据库,并导入项目的sql文件; 3. 将项目中db.properties配置文件中的数据库配置改为自己的配置 4. 配置tomcat,然后运行项目,输入localhost:8080/xxx 登录
SimpleDateFormat sdfdajuan = new SimpleDateFormat("yyyy-MM-dd");
dajuan.setTitle(title);
dajuan.setZujuanren(zujuanren);
dajuan.setKemu(kemu);
dajuan.setDajuanren(dajuanren);
dajuan.setShijuanid(shijuanid);
dajuan.setDefen(defen == null ? 0 : new Integer(defen));
dajuanSrv.update(dajuan);
if (forwardurl == null) {
forwardurl = "/admin/dajuanmanager.do?actiontype=get";
}
redirect(forwardurl);
}
/******************************************************
*********************** 加载内部支持*********************
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
dispatchParams(request, response);
if (id != null) {
Dajuan dajuan = dajuanSrv.load("where id=" + id);
if (dajuan != null) {
request.setAttribute("dajuan", dajuan);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/dajuanadd.jsp";
}
forward(forwardurl);
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
String filter = "where 1=1 ";
String title = request.getParameter("title");
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
dispatchParams(request, response);
String actiontype = "save";
if (id != null) {
Jiaodiantu jiaodiantu = focusSrv.load("where id=" + id);
if (jiaodiantu != null) {
request.setAttribute("jiaodiantu", jiaodiantu);
}
actiontype = "update";
}
request.setAttribute("id", id);
request.setAttribute("actiontype", actiontype);
String forwardurl=request.getParameter("forwardurl");
System.out.println("forwardurl="+forwardurl);
if(forwardurl==null)
forwardurl="/admin/jiaodiantuadd.jsp";
forward(forwardurl);
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
String filter = "";
//
int pageindex = 1;
int pagesize = 10;
String title = request.getParameter("title");
if (title != null)
filter = " where title like '%" + title + "%' ";
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
pagesize = new Integer(currentpagesize);
List<Jiaodiantu> listjiaodiantu = focusSrv.getPageEntitys(filter, pageindex, pagesize);
int recordscount = focusSrv.getRecordCount(filter == null ? "" : filter);
request.setAttribute("listjiaodiantu", listjiaodiantu);
PagerMetal pm = new PagerMetal(recordscount);
@Controller
public class IndexcolumnsController extends SimpleController {
@Autowired
private IndexcolumnsService icSrv=null;
@Autowired
private LanmuService lanmuSrv=null;
@Override
@RequestMapping("/admin/indexcolumnsmanager.do")
public void mapping(HttpServletRequest request, HttpServletResponse response) {
mappingMethod(request,response);
}
/********************************************************
****************** 信息注销监听支持*****************************
*********************************************************/
public void delete() {
String[] ids = request.getParameterValues("ids");
if (ids == null)
return;
String spliter = ",";
String SQL = " delete from indexcolumns where id in(" + join(spliter, ids)
+ ")";
System.out.println("sql=" + SQL);
Adapter adapter=new MybatisAdapter("applicationContext.xml", "sqlSessionFactoryBean");
SimpleJdbc dapper=new SimpleJdbc(adapter);
try {
dapper.update(SQL);
} catch (SQLException e) {
e.printStackTrace();
}
System.out.println("danxuancount="+danxuancount);
System.out.println("fenzhi="+fenzhi);
List<Ceshiti> danxuanlist=getRandomCeshiti(Integer.parseInt(danxuancount));
System.out.println("danxuanlit.size="+danxuanlist.size());
for(Ceshiti ceshiti :danxuanlist){
Shijuanitem sji=new Shijuanitem();
sji.setFenshu(Integer.parseInt(fenzhi));
sji.setTihao(ceshiti.getId());
sji.setShijuanid(Integer.parseInt(sjid));
sji.setTixing("单选题");
sjiSrv.save(sji);
}
}
/**
* 随机选择单选题
* @param count
* @return
*/
private List<Ceshiti> getRandomCeshiti(int count){
List<Ceshiti> chooselist=new ArrayList<Ceshiti>();
List<Ceshiti> danxuanlist=ceshitiSrv.getEntity("");
if(danxuanlist.size()<=count)
return danxuanlist;
int [] seqarr= randomCommon(1, danxuanlist.size(), count);
int j=1;
for(Ceshiti ceshiti : danxuanlist){
if(hasInAarray(j, seqarr))
chooselist.add(ceshiti);
j++;
}
System.out.println("抽取试题总数:"+chooselist.size());
return chooselist;
forwardurl = "/admin/usersmanager.do?actiontype=get";
}
redirect(forwardurl);
}
public void load(){
String id = request.getParameter("id");
String actiontype = "save";
if (id != null) {
Users users = (Users) usersService.load(new Integer(id));
if (users != null) {
request.setAttribute("users", users);
}
actiontype = "update";
}
request.setAttribute("id", id);
request.setAttribute("actiontype", actiontype);
String forwardurl=request.getParameter("forwardurl");
if (forwardurl == null) {
forwardurl = "/admin/usersadd.jsp";
}
forward(forwardurl);
}
public void delete() {
String id = request.getParameter("id");
usersService.delete(" where id=" + id);
get();
}
public void get(){
int pageindex = 1;
int pagesize = 10;
String filter="";
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
pagesize = new Integer(currentpagesize);
List<Users> usersList=usersService.getPageEntitys(filter,pageindex,pagesize);
int recordscount = usersService.getRecordCount(filter);
return;
String coldes = request.getParameter("coldes");
String colid = request.getParameter("colid");
String xtype = request.getParameter("xtype");
String showstyle = request.getParameter("showstyle");
String layout=request.getParameter("layout");
String width=request.getParameter("width");
indexcolumns.setColdes(coldes);
indexcolumns.setColid(colid == null ? 0 : new Integer(colid));
indexcolumns.setXtype(xtype);
indexcolumns.setShowstyle(showstyle);
indexcolumns.setLayout(layout);
indexcolumns.setWidth(width);
icSrv.update(indexcolumns);
if (forwardurl == null) {
forwardurl = "/admin/indexcolumnsmanager.do?actiontype=get";
}
redirect(forwardurl);
}
/******************************************************
*********************** 加载内部支持*********************
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
dispatchParams(request, response);
if (id != null) {
Indexcolumns indexcolumns = (Indexcolumns) icSrv.load("where id=" + id);
if (indexcolumns != null) {
request.setAttribute("indexcolumns", indexcolumns);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/indexcolumnsadd.jsp";
}
try {
request.getRequestDispatcher(forwardurl).forward(request, response);
} catch (ServletException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
//
int pageindex = 1;
int pagesize = 10;
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
pagesize = new Integer(currentpagesize);
List<Dajuan> listdajuan = dajuanSrv.getPageEntitys(filter,pageindex, pagesize);
int recordscount = dajuanSrv.getRecordCount(filter == null ? ""
: filter);
request.setAttribute("listdajuan", listdajuan);
PagerMetal pm = new PagerMetal(recordscount);
// 设置尺寸
pm.setPagesize(pagesize);
// 设置当前显示页
pm.setCurpageindex(pageindex);
// 设置分页信息
request.setAttribute("pagermetal", pm);
// 分发请求参数
dispatchParams(request, response);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/dajuanmanager.jsp";
}
forward(forwardurl);
}
@Autowired
private DajuanService dajuanSrv=null;
@Autowired
private DajuanitemService djiSrv=null;
}
users.setPassword(password == null ? "" : password);
users.setCreator(creator == null ? "" : creator);
users.setCreatetime(new Date());
users.setEmail(email == null ? "" : email);
users.setTel(tel == null ? "" : tel);
users.setLogtimes(0);
users.setRealname(realname == null ? "" : realname);
users.setNickname(nickname == null ? "" : nickname);
users.setSex(sex == null ? "" : sex);
users.setXiangpian(xiangpian == null ? "" : xiangpian);
usersService.save(users);
String forwardurl=request.getParameter("forwardurl");
if (forwardurl == null) {
forwardurl = "/admin/usersmanager.do?actiontype=get";
}
redirect(forwardurl);
}
public void update(){
String id = request.getParameter("id");
if (id == null)
return;
Users users = (Users) usersService.load(new Integer(id));
if (users == null)
return;
String username = request.getParameter("username");
String creator = request.getParameter("creator");
String email = request.getParameter("email");
String tel = request.getParameter("tel");
String realname = request.getParameter("realname");
String nickname = request.getParameter("nickname");
String sex = request.getParameter("sex");
String xiangpian = request.getParameter("xiangpian");
users.setUsername(username);
users.setEmail(email);
users.setTel(tel);
users.setRealname(realname);
users.setNickname(nickname);
users.setSex(sex);
users.setXiangpian(xiangpian);
usersService.update(users);
String forwardurl=request.getParameter("forwardurl");
if (forwardurl == null) {
forwardurl = "/admin/usersmanager.do?actiontype=get";
}
redirect(forwardurl);
}
/******************************************************
*********************** 加载内部支持*********************
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
dispatchParams(request, response);
if (id != null) {
Zydownload zydownload = zydownloadSrv.load("where id=" + id);
if (zydownload != null) {
request.setAttribute("zydownload", zydownload);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/zydownloadadd.jsp";
}
forward(forwardurl);
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
String filter = "where 1=1 ";
String title = request.getParameter("title");
String pubren=request.getParameter("pubren");
if (title != null)
filter += " and title like '%" + title + "%' ";
//
if(pubren!=null)
filter+=" and pubren='"+pubren+"'";
int pageindex = 1;
int pagesize = 10;
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
pagesize = new Integer(currentpagesize);
String lyren=request.getParameter("lyren");
if (title != null)
filter += " and title like '%" + title + "%' ";
if (replyren != null)
filter += " and replyren = '" + replyren + "' ";
if (lyren != null)
filter += " and lyren = '" + lyren + "' ";
//
int pageindex = 1;
int pagesize = 10;
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
pagesize = new Integer(currentpagesize);
List<Leaveword> listleaveword = lwSrv.getPageEntitys(filter, pageindex, pagesize);
int recordscount = lwSrv.getRecordCount(filter == null ? "" : filter);
request.setAttribute("listleaveword", listleaveword);
PagerMetal pm = new PagerMetal(recordscount);
// 设置尺寸
pm.setPagesize(pagesize);
// 设置当前显示页
pm.setCurpageindex(pageindex);
// 设置分页信息
request.setAttribute("pagermetal", pm);
// 分发请求参数
dispatchParams(request, response);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/leavewordmanager.jsp";
}
forward(forwardurl);
}
}
/******************************************************
*********************** 加载内部支持*********************
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
dispatchParams(request, response);
if (id != null) {
Topic topic = topicSrv.load("where id=" + id);
if (topic != null) {
request.setAttribute("topic", topic);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/topicadd.jsp";
}
forward(forwardurl);
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
String filter = "where 1=1 ";
String pubren=request.getParameter("pubren");
String title = request.getParameter("title");
if (title != null)
filter += " and title like '%" + title + "%' ";
if(pubren!=null)
filter+=" and pubren='"+pubren+"'";
//
int pageindex = 1;
int pagesize = 10;
xinxi.setZhaiyao(zhaiyao==null?"":zhaiyao);
xinxi.setDcontent(dcontent == null ? "" : dcontent);
xinxi.setTupian2(tupian2 == null ? "" : tupian2);
xinxi.setAgainstcount(0);
xinxi.setAgreecount(0);
xinxi.setLanmuid(new Integer(lanmuid));
xinxi.setLanmuming(lanmuming == null ? "" : lanmuming);
xinxiSrv.save(xinxi);
String forwardurl = request.getParameter("forwardurl");
if (forwardurl == null) {
forwardurl = "/admin/xinximanager.do?actiontype=get";
}
try {
response.sendRedirect(request.getContextPath() + forwardurl);
} catch (Exception e) {
e.printStackTrace();
}
}
/******************************************************
*********************** 更新内部支持*********************
*******************************************************/
public void update() {
String id = request.getParameter("id");
if (id == null)
return;
Xinxi xinxi = (Xinxi) xinxiSrv.load(new Integer(id));
if (xinxi == null)
return;
String title = request.getParameter("title");
String laiyuan=request.getParameter("laiyuan");
String dcontent = request.getParameter("dcontent");
String tupian2 = request.getParameter("tupian2");
String lanmuid = request.getParameter("lanmuid");
String lanmuming = request.getParameter("lanmuming");
String tuijian=request.getParameter("tuijian");
String hot=request.getParameter("hot");
String zuixin=request.getParameter("zuixin");
String zhaiyao=request.getParameter("zhaiyao");
String style=request.getParameter("style");
SimpleDateFormat sdfxinxi = new SimpleDateFormat("yyyy-MM-dd");
xinxi.setZhaiyao(zhaiyao);
xinxi.setTitle(title);
String title = request.getParameter("title");
if (title != null)
filter = " where title like '%" + title + "%' ";
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
pagesize = new Integer(currentpagesize);
List<Jiaodiantu> listjiaodiantu = focusSrv.getPageEntitys(filter, pageindex, pagesize);
int recordscount = focusSrv.getRecordCount(filter == null ? "" : filter);
request.setAttribute("listjiaodiantu", listjiaodiantu);
PagerMetal pm = new PagerMetal(recordscount);
// 设置尺寸
pm.setPagesize(pagesize);
// 设置当前显示页
pm.setCurpageindex(pageindex);
// 设置分页信息
request.setAttribute("pagermetal", pm);
// 分发请求参数
dispatchParams(request, response);
String forwardurl=request.getParameter("forwardurl");
System.out.println("forwardurl="+forwardurl);
if(forwardurl==null){
forwardurl="/admin/jiaodiantumanager.jsp";
}
forward(forwardurl);
}
}
String actiontype = "save";
dispatchParams(request, response);
if (id != null) {
Topic topic = topicSrv.load("where id=" + id);
if (topic != null) {
request.setAttribute("topic", topic);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);
String forwardurl = request.getParameter("forwardurl");
System.out.println("forwardurl=" + forwardurl);
if (forwardurl == null) {
forwardurl = "/admin/topicadd.jsp";
}
forward(forwardurl);
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
String filter = "where 1=1 ";
String pubren=request.getParameter("pubren");
String title = request.getParameter("title");
if (title != null)
filter += " and title like '%" + title + "%' ";
if(pubren!=null)
filter+=" and pubren='"+pubren+"'";
//
int pageindex = 1;
int pagesize = 10;
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
String currentpagesize = request.getParameter("pagesize");
// 设置当前页
if (currentpageindex != null)
pageindex = new Integer(currentpageindex);
// 设置当前页尺寸
if (currentpagesize != null)
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
if (id != null) {
Notice notice = mapper.load("where id=" + id);
if (notice != null) {
request.setAttribute("notice", notice);
}
actiontype = "update";
}
request.setAttribute("id", id);
request.setAttribute("actiontype", actiontype);
try {
request.getRequestDispatcher("noticeadd.jsp").forward(request,
response);
} catch (ServletException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
String filter = "";
//
int pageindex = 1;
int pagesize = 10;
String title = request.getParameter("title");
if (title != null)
filter = " where title like '%" + title + "%' ";
//
// 获取当前分页
String currentpageindex = request.getParameter("currentpageindex");
// 当前页面尺寸
@Controller
public class LeavewordController extends SimpleController {
@Autowired
private LeavewordService lwSrv = null;
@Override
@RequestMapping("/admin/leavewordmanager.do")
public void mapping(HttpServletRequest request, HttpServletResponse response) {
mappingMethod(request, response);
}
public void reply() {
String forwardurl = request.getParameter("forwardurl");
String id = request.getParameter("id");
if (id == null)
return;
Leaveword leaveword = lwSrv.load(new Integer(id));
if (leaveword == null)
return;
String replycontent = request.getParameter("replycontent");
leaveword.setReplycontent(replycontent);
leaveword.setStatus(2);
lwSrv.update(leaveword);
if (forwardurl == null) {
forwardurl = "/admin/leavewordmanager.do?actiontype=get";
}
redirect(forwardurl);
}
/********************************************************
****************** 信息注销监听支持*****************************
if (forwardurl == null) {
forwardurl = "/admin/teachermanager.do?actiontype=get";
}
redirect(forwardurl);
}
/******************************************************
*********************** 加载内部支持*********************
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
String forwardurl = request.getParameter("forwardurl");
dispatchParams(request, response);
if (id != null) {
Teacher teacher = teacherSrv.load("where id="
+ id);
if (teacher != null) {
request.setAttribute("teacher", teacher);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);
if (forwardurl == null) {
forwardurl = "/admin/teacheradd.jsp";
}
forward(forwardurl);
}
/******************************************************
*********************** 数据绑定内部支持*********************
*******************************************************/
public void get() {
if (shoucang == null)
return;
String bookid = request.getParameter("bookid");
String bookname = request.getParameter("bookname");
String tupian = request.getParameter("tupian");
String scren = request.getParameter("scren");
String sctime = request.getParameter("sctime");
String href = request.getParameter("href");
SimpleDateFormat sdfshoucang = new SimpleDateFormat("yyyy-MM-dd");
shoucang.setBookid(bookid == null ? 0 : new Integer(bookid));
shoucang.setBookname(bookname);
shoucang.setTupian(tupian);
shoucang.setScren(scren);
shoucang.setHref(href==null?"":href);
if (sctime != null) {
try {
shoucang.setSctime(sdfshoucang.parse(sctime));
} catch (ParseException e) {
e.printStackTrace();
}
}
scSrv.update(shoucang);
if (forwardurl == null) {
forwardurl = "/admin/shoucangmanager.do?actiontype=get";
}
try {
response.sendRedirect(request.getContextPath() + forwardurl);
} catch (Exception e) {
e.printStackTrace();
}
}
/******************************************************
*********************** 加载内部支持*********************
*******************************************************/
public void load() {
//
String id = request.getParameter("id");
String actiontype = "save";
dispatchParams(request, response);
if (id != null) {
Shoucang shoucang = scSrv.load("where id="+ id);
if (shoucang != null) {
request.setAttribute("shoucang", shoucang);
}
actiontype = "update";
request.setAttribute("id", id);
}
request.setAttribute("actiontype", actiontype);