1:取别名的时候中间需要加一个空格
$info = $db->withTotalCount()
->where('dachu.create_time', $params['startTime'], '>=')
->where('dachu.create_time', $params['endTime'], '<')
->join(SuspectModel::$table.' sus','dachu.suspect_id = sus.id','LEFT')
->join(CasesModel::$table.' cas','dachu.case_id=cas.id','LEFT')
->get(self::$table.' dachu',null,'dachu.id,dachu.case_id,dachu.suspect_id,
dachu.main_dep_name,dachu.co_dep_name,dachu.suspect_name,dachu.main_score,dachu.co_score,dachu.create_time,
sus.sex,sus.birthday,sus.residence,cas.category_one,cas.category_two,cas.category_three');
2:取别名不能用php的关键词
$charge_one = $db->where('char.id','429')
->get(ChargeNewModel::$table.' char','1','char.id');
像这块代码本来是没有问题的,但是表别名取“char”后运行就会出错
3:修改公共方法要重启服务