예제 #1
0
 public int modifyDicValueInfo(BaseDicValue baseDicValue) {
   // TODO Auto-generated method stub
   baseDicValue.setModifyTime(new Timestamp(new java.util.Date().getTime()));
   baseDicValue.setChSpell(StringUtil.strTospell(baseDicValue.getDicValueName()));
   baseDicValue.setDisplayOrder(baseDicValue.getDisplayOrder());
   if (baseDicValue.getParentId() == null) {
     baseDicValue.setParentId("1");
   }
   int result = dicValueDao.updateByPrimaryKey(baseDicValue);
   return result;
 }
예제 #2
0
 public int insertDicValueInfo(BaseDicValue baseDicValue) {
   // TODO Auto-generated method stub
   baseDicValue.setId(UUIDGeneratorUtil.getUUID());
   baseDicValue.setCreateTime(new Timestamp(new java.util.Date().getTime()));
   baseDicValue.setModifyTime(new Timestamp(new java.util.Date().getTime()));
   baseDicValue.setChSpell(StringUtil.strTospell(baseDicValue.getDicValueName()));
   String display_order =
       queryDisplayOrder(baseDicValue.getParentId(), baseDicValue.getDicTypeId());
   BigDecimal B = new BigDecimal(display_order);
   baseDicValue.setDisplayOrder(B);
   if (baseDicValue.getParentId() == "" || baseDicValue.getParentId() == null) {
     baseDicValue.setParentId(0 + "");
   }
   int result = dicValueDao.insert(baseDicValue);
   return result;
 }