|
@@ -505,7 +505,7 @@ class User extends BaseModel
|
|
|
|
|
|
|
|
$dataModel = $this
|
|
$dataModel = $this
|
|
|
->alias("u")
|
|
->alias("u")
|
|
|
- ->field("u.uid,ut.show_template_id,a.ancestral_place,a.status as is_type_audit")
|
|
|
|
|
|
|
+ ->field("u.uid,IFNULL(u.longitude,0) as longitude,IFNULL(u.latitude,0) as latitude,ut.show_template_id,a.ancestral_place,a.status as is_type_audit")
|
|
|
->leftJoin("info_audit a", "u.uid=a.uid")
|
|
->leftJoin("info_audit a", "u.uid=a.uid")
|
|
|
->leftJoin("user_show_template ut", "ut.uid = u.uid and ut.is_default = 1")//默认模板
|
|
->leftJoin("user_show_template ut", "ut.uid = u.uid and ut.is_default = 1")//默认模板
|
|
|
->where($where)->where('ut.show_template_id',7);
|
|
->where($where)->where('ut.show_template_id',7);
|
|
@@ -618,7 +618,7 @@ class User extends BaseModel
|
|
|
if ($totalCount > 0) {
|
|
if ($totalCount > 0) {
|
|
|
$dataModel = $this
|
|
$dataModel = $this
|
|
|
->alias("u")
|
|
->alias("u")
|
|
|
- ->field("u.uid,u.longitude,u.latitude,ut.show_template_id,a.ancestral_place,a.status as is_type_audit,a.name,a.avatar,a.birthday,a.service_project")
|
|
|
|
|
|
|
+ ->field("u.uid,IFNULL(u.longitude,0) as longitude,IFNULL(u.latitude,0) as latitude,ut.show_template_id,a.ancestral_place,a.status as is_type_audit,a.name,a.avatar,a.birthday,a.service_project")
|
|
|
->leftJoin("info_audit a", "u.uid=a.uid and a.status = 1 and a.is_show = 1")
|
|
->leftJoin("info_audit a", "u.uid=a.uid and a.status = 1 and a.is_show = 1")
|
|
|
->leftJoin("user_show_template ut", "ut.uid = u.uid and ut.is_default = 1")
|
|
->leftJoin("user_show_template ut", "ut.uid = u.uid and ut.is_default = 1")
|
|
|
->where($where);
|
|
->where($where);
|