@RequestMapping("toDetail.do") public ModelAndView toDetail(HttpServletRequest request,HttpServletResponse response, ModelMap modelMap) { FormSource source = this.source(request); SFObject mainEntity = this.createMainEntity(); ModuleService service = this.createService(); try{ this.toDetail_bind(request,modelMap,source,mainEntity,service); source.put(modelMap); //表单提交视图 }catch(Exception e ){ this.logger.error(e); } return this.output(response, modelMap); } protected void toDetail_bind(HttpServletRequest request, ModelMap modelMap,FormSource source, SFObject mainEntity, ModuleService service) throws Exception { ARTICLEINFO bean = this.bean(request, ARTICLEINFO.class,false); List<ARTICLEINFO> list = service.beans(bean); if(list.size()>0){ bean =list.get(0); if(bean.getISOUTLINK().equals(CommonType.NO)){ String VISITADDR = WechatArgument.getBACKGROUND() + "/" + bean.getVISITADDR(); bean.setVISITADDR(VISITADDR); } String PICADDR = WechatArgument.getBACKGROUND() + bean.getPICADDR(); String PICADDRBRI = WechatArgument.getBACKGROUND() + bean.getPICADDRBRI(); bean.setPICADDR(PICADDR); bean.setPICADDRBRI(PICADDRBRI); modelMap.put("bean",bean); //视图添加内容 } }