| 123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <?php
- declare (strict_types = 1);
- namespace app\model\api;
- use think\Model;
- /**
- * @mixin \think\Model
- */
- class InfoAudit extends Model
- {
- public function getList(){
-
- }
- /**
- *
- * @param type $id
- * @param type $type
- */
- public function getItem($post){
- if(empty($parms)){
- return [];
- }
- $where=[];
- if(isset($post["status"]) && in_array((string)$post["status"], ["0","1"])){
- $where[]=["au.status","=",(int)$post["status"]];
- }
- if(!empty($post["id"])){
- $where[]=["au.id","=",$post["id"]];
- }
- if(!empty($post["uid"])){
- $where[]=["au.uid","=",$post["uid"]];
- }
-
- $data = (new InfoAudit)
- ->alias("au")
- ->field("au.*,wt.title as user_work_type_title,s.title as service_time_type_title")
- ->leftJoin("user_work_type wt" , "wt.id = au.user_work_type_id")//职称
- ->leftJoin("service_time_type s" , "s.code = au.service_type")//服务时长类型
- ->where($where)
- ->order("au.id","desc")
- ->find();
- }
- }
|