|
@@ -168,24 +168,7 @@ class roomModel extends Model
|
|
|
return $this->table('room_face')->where($cond)->update($data);
|
|
|
}
|
|
|
|
|
|
- /////////////////////////////////////////////
|
|
|
- public function applyCnts($cond){
|
|
|
- return $this->table('room_apply')->where($cond)->count();
|
|
|
- }
|
|
|
- public function roomApplys($cond,$field="*",$page=20,$order='apply_id desc')
|
|
|
- {
|
|
|
- return $this->table('room_apply')->field($field)->where($cond)->page($page)->order($order)->select();
|
|
|
- }
|
|
|
- public function findApply($apply_id){
|
|
|
- return $this->table('room_apply')->field('*')->where(['apply_id' => $apply_id])->find();
|
|
|
- }
|
|
|
- public function addApply($room,$member,$msg,$viewer=0){
|
|
|
- return $this->table('room_apply')->insert(['room_id' => $room,'member_id' => $member,'msg' => $msg,'viewer'=>$viewer,'add_time'=>time()]);
|
|
|
- }
|
|
|
- public function editApply($apply,$viewer,$step){
|
|
|
- return $this->table('room_apply')->where(['apply_id' => $apply])->update(["viewer"=> $viewer,"step" => $step]);
|
|
|
- }
|
|
|
- ////////////////////////////////////////////
|
|
|
+ ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
|
|
public function roomSteps($cond,$field="*",$page=20,$order='steps_id desc') {
|
|
|
return $this->table('room_steps')->field($field)->where($cond)->page($page)->order($order)->limit($page)->select();
|
|
|
}
|