毕业论文

打赏
当前位置: 毕业论文 > 计算机论文 >

jsp+mysql大学校园二手交易平台开发+数据流图+ER图(12)

时间:2017-01-10 13:09来源:毕业论文
} }catch(Exception e){ e.printStackTrace(); request.setAttribute(username, username); request.setAttribute(operError, e.getMessage()); request.getRequestDispatcher(/login.jsp).forward(request, respons


            }
        }catch(Exception e){
            e.printStackTrace();
            request.setAttribute("username", username);
            request.setAttribute("operError", e.getMessage());
            request.getRequestDispatcher("/login.jsp").forward(request, response);
        }
    }
4.1.3    用户信息的修改与删除

用户信息的修改
在此模块内,用户可以对自己所发布的信息进行修改,并且可以进行重新的发布。如果有不需要的信息还可以进行删除。用户商品修改图如图4.6所示。
 
图 4.6 商品信息修改
用户修改商品核心代码:
public void doUpdateGoodsMsg(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String goodsTypeId = ServletUtil.getString(request,"goodsTypeId");
        String goodsMsgId = ServletUtil.getString(request,"goodsMsgId");
        String title = ServletUtil.getString(request, "title");
        String content = ServletUtil.getString(request, "content");
        String mobile = ServletUtil.getString(request, "mobile");
        String qq = ServletUtil.getString(request, "qq");
        //        goodsMsg.setStatus("0");
        
        PrintWriter out = response.getWriter();
        try{
            if(StringUtils.isEmpty(goodsMsgId)){
                throw new MyException("修改的记录ID不能为空");
            }
            
            if(StringUtils.isEmpty(goodsTypeId)){
                throw new MyException("分类不能为空");
            }
            
            if(StringUtils.isEmpty(title)){
                throw new MyException("标题不能为空");
            }else if(title.length()>30){
                throw new MyException("标题长度不能大于30位");
            }
            
                if(StringUtils.isEmpty(content)){
                throw new MyException("描述不能为空");
            }else if(title.length()>250){
                throw new MyException("描述长度不能大于250位");
            } jsp+mysql大学校园二手交易平台开发+数据流图+ER图(12):http://www.751com.cn/jisuanji/lunwen_2112.html
------分隔线----------------------------
推荐内容