毕业论文

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

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

时间:2017-01-10 13:09来源:毕业论文
if(StringUtils.isEmpty(mobile)){ throw new MyException(联系电话不能为空); }else if(mobile.length()20){ throw new MyException(联系电话长度不能大于20位); } if(qq.length()20){ throw ne


    
            if(StringUtils.isEmpty(mobile)){
                throw new MyException("联系电话不能为空");
            }else if(mobile.length()>20){
                throw new MyException("联系电话长度不能大于20位");
            }
    
            if(qq.length()>20){
                throw new MyException("QQ长度不能大于20位");
            }
        
            GoodsMsg goodsMsg = new GoodsMsg();        
            goodsMsg.setGoodsMsgId(goodsMsgId);
            goodsMsg.setGoodsTypeId(goodsTypeId);
            goodsMsg.setTitle(title);
            goodsMsg.setContent(content);
            goodsMsg.setMobile(mobile);
            goodsMsg.setQq(qq);

            goodsMsg.setLastUpdateTime(DateUtil.getCurTime());
            GoodsMsgService goodsMsgService = new GoodsMsgService();
            goodsMsgService.update(goodsMsg);
            out.write("({'isSuccess':true,msg:'更新成功'})");
        }catch(Exception e){
            e.printStackTrace();
            out.write("({'isSuccess':false,msg:'"+e.getMessage()+"'})");
        }
    }

用户商品删除图如图4.7所示。

图 4.7 商品信息删除
用户删除商品信息核心代码:
public void delete(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
        String goodsTypeId =ServletUtil.getString(request,"goodsMsgId");        
        String isAdmin = ServletUtil.getString(request,"isAdmin");        
        GoodsMsgService goodsMsgService = new GoodsMsgService();
        goodsMsgService.deleteGoodsMsg(goodsTypeId);
        if("1".equals(isAdmin)){
            request.getRequestDispatcher("/goodsMsg?operMethod=adminGoodsMsgList").forward(request, response);
        }else{
            request.getRequestDispatcher("/goodsMsg?operMethod=publishGoodsMsgList").forward(request, response);
        }
    }    

4.2    商品界面设计
4.2.1    商品分类模块

校园二手交易平台所有的功能模块分为751类,分别是日常用品,家用电器,电脑及配件,数码通信,图书音像,房屋租赁,基本包含了日常生活需要用到的所有类别。提供给用户一个自由选择和筛选分类的环境。用户可以根据自己的需要选择不同类别的信息。 jsp+mysql大学校园二手交易平台开发+数据流图+ER图(13):http://www.751com.cn/jisuanji/lunwen_2112.html
------分隔线----------------------------
推荐内容