<?php
/**
 * Created by PhpStorm.
 * User: sicilon_IT
 * Date: 2020/3/3
 * Time: 11:27
 */

namespace app\index\model;
use think\Model;

class gmembermodel extends Model{
    protected $table='t_gmember';

    /*
     * 20200303
     * steelxu
     * 根据班组id返回班组成员
     */
    public function selmlistbygid($gid){
        $where_arr['gid']=$gid;
        $where_arr['checkstate']=1;
        $rlist=$this->where($where_arr)->select();
        return $rlist;
    }

    /*
     * 20200303
     * steelxu
     * 存入一条数据
     */
    public function insmember($minfo){
        $this->isUpdate(false)->save($minfo);
        return $this->id;
    }

    /*
     * 20200303
     * steelxu
     * 存入一组数据
     */
    public function insmlist($mlist){
        $rcount=$this->saveAll($mlist);
        return $rcount;
    }
}