|
|
@@ -255,68 +255,6 @@ class User extends BaseModel
|
|
|
return $data;
|
|
|
}
|
|
|
|
|
|
-// /**
|
|
|
-// * 获取小程序在职展示列表
|
|
|
-// * @return type
|
|
|
-// */
|
|
|
-// public function getApiWorkerList($post)
|
|
|
-// {
|
|
|
-// $post["pageSize"] = $post["pageSize"] > 50 ? 50 : (int)$post["pageSize"];
|
|
|
-// $post["page"] = $post["page"] <= 0 ? 1 : (int)$post["page"];
|
|
|
-// $where = [];
|
|
|
-// $where[] = ["u.work_type_id", ">", 0];
|
|
|
-// $where[] = ["u.status", "=", 1];
|
|
|
-// if (!empty($post['work_type_id'])) {
|
|
|
-// $where[] = ["u.work_type_id", "=", $post['work_type_id']];
|
|
|
-// }
|
|
|
-// $totalCount = $this->alias("u")->where($where)->count();
|
|
|
-// $data = null;
|
|
|
-// if ($totalCount > 0) {
|
|
|
-// $data = $this
|
|
|
-// ->alias("u")
|
|
|
-// ->field("u.uid,ut.show_template_id,a.ancestral_place,a.status as is_type_audit,IFNULL(u.longitude,0) as longitude,IFNULL(u.latitude,0) as latitude")
|
|
|
-// ->leftJoin("info_audit a", "u.uid=a.uid")
|
|
|
-// ->leftJoin("user_show_template ut", "ut.uid = u.uid and ut.is_default = 1")//默认模板
|
|
|
-// ->where($where)
|
|
|
-// ->order("u.show_temp_seq", "desc")
|
|
|
-// ->order("u.uid", "desc")
|
|
|
-// ->page($post["page"], $post["pageSize"])
|
|
|
-// ->select();
|
|
|
-// if (!empty($data)) {
|
|
|
-// $data = $data->toArray();
|
|
|
-// }
|
|
|
-// $infoAuditDb = new InfoAudit();
|
|
|
-// foreach ($data as $k => $v) {
|
|
|
-// $item = [
|
|
|
-// "name" => "",
|
|
|
-// "avatar" => "",
|
|
|
-// "age" => "",
|
|
|
-// "service_project_ar" => [],
|
|
|
-// "user_work_type_title" => "",
|
|
|
-// "service_area_all" => [],
|
|
|
-// "birthday" => "",
|
|
|
-// "longitude" => $v['longitude'] ?? 0,
|
|
|
-// "latitude" => $v['latitude'] ?? 0
|
|
|
-// ];
|
|
|
-// $infoData = $infoAuditDb->getItem(["status" => 1, "uid" => $v["uid"]]);
|
|
|
-// if (!empty($infoData)) {
|
|
|
-// foreach ($item as $k2 => $v2) {
|
|
|
-// $item[$k2] = $infoData[$k2];
|
|
|
-// }
|
|
|
-// }
|
|
|
-// $data[$k] = array_merge($v, $item);
|
|
|
-// }
|
|
|
-// }
|
|
|
-//// $datatwo = [];
|
|
|
-//// foreach($data as $v){
|
|
|
-//// if($v['is_show'] == 1){
|
|
|
-//// $datatwo[] = $v;
|
|
|
-//// }
|
|
|
-//// }
|
|
|
-// $data = empty($data) ? [] : $data;
|
|
|
-// return ["list" => $data, "pageSize" => $post["pageSize"], "page" => $post["page"], "totalCount" => $totalCount];
|
|
|
-// }
|
|
|
-
|
|
|
/**
|
|
|
* 获取小程序在职展示列表
|
|
|
* @return type
|
|
|
@@ -336,7 +274,7 @@ class User extends BaseModel
|
|
|
if ($totalCount > 0) {
|
|
|
$data = $this
|
|
|
->alias("u")
|
|
|
- ->field("u.uid,ut.show_template_id,a.ancestral_place,a.status as is_type_audit,IFNULL(u.longitude,0) as longitude,IFNULL(u.latitude,0) as latitude")
|
|
|
+ ->field("u.uid,ut.show_template_id,a.ancestral_place,a.status as is_type_audit")
|
|
|
->leftJoin("info_audit a", "u.uid=a.uid")
|
|
|
->leftJoin("user_show_template ut", "ut.uid = u.uid and ut.is_default = 1")//默认模板
|
|
|
->where($where)
|
|
|
@@ -356,9 +294,7 @@ class User extends BaseModel
|
|
|
"service_project_ar" => [],
|
|
|
"user_work_type_title" => "",
|
|
|
"service_area_all" => [],
|
|
|
- "birthday" => "",
|
|
|
- "longitude" => $v['longitude'] ?? 0,
|
|
|
- "latitude" => $v['latitude'] ?? 0
|
|
|
+ "birthday" => ""
|
|
|
];
|
|
|
$infoData = $infoAuditDb->getItem(["status" => 1, "uid" => $v["uid"]]);
|
|
|
if (!empty($infoData)) {
|
|
|
@@ -379,6 +315,7 @@ class User extends BaseModel
|
|
|
return ["list" => $data, "pageSize" => $post["pageSize"], "page" => $post["page"], "totalCount" => $totalCount];
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/**
|
|
|
* 获取小程序在职展示列表
|
|
|
* @return type
|