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类,分别是日常用品,家用电器,电脑及配件,数码通信,图书音像,房屋租赁,基本包含了日常生活需要用到的所有类别。提供给用户一个自由选择和筛选分类的环境。用户可以根据自己的需要选择不同类别的信息。
		
- 上一篇:交互式XML课程建设网站的开发 
 
- 下一篇:C++手机网上营业厅系统的设计与实现 
 
		
	
- 
 
- 
 
- 
 
- 
 
- 
 
- 
 
- 
 
 
大众媒体对公共政策制定的影响
 
中考体育项目与体育教学合理结合的研究
 
电站锅炉暖风器设计任务书
 
酸性水汽提装置总汽提塔设计+CAD图纸
 
乳业同业并购式全产业链...
 
十二层带中心支撑钢结构...
 
河岸冲刷和泥沙淤积的监测国内外研究现状
 
java+mysql车辆管理系统的设计+源代码
 
杂拟谷盗体内共生菌沃尔...
 
当代大学生慈善意识研究+文献综述