public int save(PO record) {
   if (record != null && StringUtil.isNotNull(ReflectUtil.getFieldValue(record, record.PK))) {
     return updateByPrimaryKey(record);
   } else {
     return insert(record);
   }
 }
  public JsonPager selectByPageMap(JsonPager jPager, Map param) {
    SysStaffPOExample example = new SysStaffPOExample();
    com.system.model.po.SysStaffPOExample.Criteria c = example.createCriteria();

    if (StringUtil.isNotNull(param.get("departId"))) {
      c.andDepartIdLike(param.get("departId") + "%");
    }

    if (StringUtil.isNotNull(param.get("sort")) && StringUtil.isNotNull(param.get("order"))) {
      example.setOrderByClause(
          ReflectUtil.toSqlName(param.get("sort").toString())
              + " "
              + param.get("order").toString());
    }

    return selectByPage(jPager, example);
  }