1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768 |
- <?php
- class CrontadstatusDao {
-
- public $id;
-
- public $cid;
-
- public $uid;
-
- public $status;
-
- public $time;
-
- public $_table = 'zhask_crontad_status';
-
- public $_primarykey = "id";
-
- public $_fields = array ('id', 'cid', 'uid', 'status', 'time' );
-
- /**
- * 获取任务进行状态
- * @param unknown_type $uid
- * @param unknown_type $mission_type
- */
- public function get_crontab_status($uid = 0, $mission_type = 0) {
-
- $sql = "select * from " . t_crontadstatus . " where uid = " . $uid . " and cid=" . $mission_type;
-
- $query = Doo::db ()->query ( $sql );
-
- $result = $query->fetch ();
-
- return $result;
- }
-
- /**
- * 完成任务
- * @param unknown_type $uid
- * @param unknown_type $mission_type
- */
- public function complete_crontab($uid = 0, $mission_type = 0) {
-
- $sql = "UPDATE " . t_crontadstatus . " SET status = ".COMPLETE." , time =".get_date()." WHERE uid = " . $uid." and cid=".$mission_type;
- $query = Doo::db ()->query ( $sql );
- }
-
- /**
- * 接受任务
- * @param unknown_type $uid
- * @param unknown_type $mission_type
- */
- public function add_crontab($uid, $mission_type) {
-
- }
-
- /**
- * 删除完成任务
- */
- public function delete_crontab() {
- $sql = "delete from " . t_question . " where id in ( " . $id . " )";
-
- Doo::db ()->query ( $sql );
- }
- }
- ?>
|