| 22 |
* |
* |
| 23 |
* $Revision$ |
* $Revision$ |
| 24 |
* $Log$ |
* $Log$ |
| 25 |
|
* Revision 1.105 2005/08/29 05:27:37 aga4096 |
| 26 |
|
* ・update_item_statusの修正. |
| 27 |
|
* |
| 28 |
* Revision 1.104 2005/08/29 02:05:34 aga4096 |
* Revision 1.104 2005/08/29 02:05:34 aga4096 |
| 29 |
* ・xnp_update_item_status(), xnp_refresh_item_status(), xnp_selective_harvesting() を追加. |
* ・xnp_update_item_status(), xnp_refresh_item_status(), xnp_selective_harvesting() を追加. |
| 30 |
* |
* |
| 8215 |
} |
} |
| 8216 |
{ |
{ |
| 8217 |
// アイテムが非公開で、item_status.is_deleted=0のものを修正 |
// アイテムが非公開で、item_status.is_deleted=0のものを修正 |
| 8218 |
string sql = "select tis.item_id " |
string sql = "select tis.item_id, count(tx.index_id) as public_count " |
| 8219 |
" from " + dbprefix + "_xoonips_item_status as tis " |
" from " + dbprefix + "_xoonips_item_status as tis " |
| 8220 |
" left join " + dbprefix + "_xoonips_index_item_link as tl on tl.item_id = tis.item_id and certify_state = " + unsignedIntToString(index::CERTIFIED) + |
" left join " + dbprefix + "_xoonips_index_item_link as tl on tl.item_id = tis.item_id and certify_state = " + unsignedIntToString(index::CERTIFIED) + |
| 8221 |
" left join " + dbprefix + "_xoonips_index as tx on tx.index_id =tl.index_id and tx.open_level = " + unsignedIntToString(index::OL_PUBLIC) + |
" left join " + dbprefix + "_xoonips_index as tx on tx.index_id =tl.index_id and tx.open_level = " + unsignedIntToString(index::OL_PUBLIC) + |
| 8222 |
" where is_deleted=0 and tx.index_id is NULL "; |
" where is_deleted=0 group by tis.item_id having pubilc_count=0 "; |
| 8223 |
sqlexec_t s( "updateItemStatus", sql, &ret ); |
sqlexec_t s( "updateItemStatus", sql, &ret ); |
| 8224 |
if ( s.getSqlcode() == SQL_SUCCESS ){ |
if ( s.getSqlcode() == SQL_SUCCESS ){ |
| 8225 |
SQLUINTEGER iid = 0; |
SQLUINTEGER iid = 0; |
| 8255 |
} |
} |
| 8256 |
|
|
| 8257 |
/** selective harvesting |
/** selective harvesting |
| 8258 |
* @param from, until 選択範囲 |
* @param from, until 選択範囲 指定しない場合は0を入れる |
| 8259 |
* @param startIID startIID<=item_idであるようなitem_idのみを得る |
* @param startIID startIID<=item_idであるようなitem_idのみを得る |
| 8260 |
* @param limit 返すitem_idの個数の上限 |
* @param limit 返すitem_idの個数の上限 |
| 8261 |
* @param iids item_idを返す配列 item_idの小さいものから配列に入る |
* @param iids item_idを返す配列 item_idの小さいものから配列に入る |