Example #1
0
  public static Long getMaxOrderId() {
    Region region = Region.find("order by id desc").first();
    Long orderId = 1L;
    if (UtilValidate.isNotEmpty(region)) {
      orderId = region.orderid + 1;
    }

    return orderId;
  }
Example #2
0
  public static String getRegionName(Long id) {
    String regionname = "";
    Region region = Region.findById(id);
    if (UtilValidate.isNotEmpty(region)) {
      regionname = region.regionname;
    }

    return regionname;
  }
Example #3
0
 /**
  * 删除
  *
  * @param id
  * @return
  */
 public static boolean deleteInfo(Long id) {
   Region info = Region.findById(id);
   boolean success = false;
   if (UtilValidate.isNotEmpty(info)) {
     // info.delete();
     info.delete_flag = 1;
     success = info.save().isPersistent();
   }
   return success;
 }