Beispiel #1
0
 public String update() {
   if (model.getTitleName() == null || model.getTitleName().trim().equals("")) {
     JSONprint("修改失败、称号名不能为空");
   } else {
     Title title = titleService.findById(model.getTitleId());
     title.setTitleDesc(model.getTitleDesc());
     title.setTitleName(model.getTitleName());
     title.setAddTime(new Timestamp(new Date().getTime()));
     titleService.update(title);
     JSONprint("1");
   }
   return null;
 }
Beispiel #2
0
 public TitleVO PO2VO(Title title) {
   TitleVO titleVO = new TitleVO();
   try {
     BeanUtils.copyProperties(titleVO, title);
     String titleName = title.getTitleName();
     if (titleName.contains(model.getTitleName())) {
       titleName =
           titleName.replace(
               model.getTitleName(),
               "<span style='color: #0099FF'>" + model.getTitleName() + "</span>");
     }
     titleVO.setTitleName(titleName);
     titleVO.setTimes(DateConvert.datetoString(title.getAddTime()).substring(0, 10));
   } catch (Exception e) {
     e.printStackTrace();
   }
   return titleVO;
 }