Răsfoiți Sursa

wip:小红点

WH01243 3 ani în urmă
părinte
comite
5e03bc25db
1 a modificat fișierele cu 3 adăugiri și 15 ștergeri
  1. 3 15
      src/jfw/modules/app/src/app/front/front.go

+ 3 - 15
src/jfw/modules/app/src/app/front/front.go

@@ -543,23 +543,10 @@ func (s *Front) ShowRedSpotOnMenu() {
 				s_phone = s_m_phone
 			}
 			isNew := false
-			/* if s_phone != "" {
-			    ent := public.Mysql.SelectBySql("select id,isNew,phone,createtime from entniche_info where phone=? and status=1 ", s_phone)
-			    if ent != nil && len(*ent) != 0 {
-
-			        for _, val := range *ent {
-			            if util.IntAll(val["isNew"]) == 1 {
-			                isNew = true
-			            }
-			        }
-			    }
-			}*/
-			res := public.Mysql.SelectBySql(`SELECT isNew,i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
+			res := public.Mysql.SelectBySql(`SELECT i.isNew,i.name,i.phone,i.status,i.auth_status,u.power FROM entniche_user u LEFT JOIN entniche_info i
 			ON u.ent_id=i.id
-			ORDER BY  i.status DESC,i.auth_status DESC, CASE WHEN u.phone=? THEN 0  ELSE 1 END  ASC`, s_phone)
+			where  u.phone=?`, s_phone)
 			if res != nil && len(*res) > 0 {
-				//entname := qutil.ObjToString((*res)[0]["name"])
-				/*d["entname"] = entname*/
 				//已购买企业未过期-商机管理用户
 				for _, v := range *res {
 					if util.IntAll(v["status"]) == 1 && util.IntAll(v["power"]) == 1 {
@@ -570,6 +557,7 @@ func (s *Front) ShowRedSpotOnMenu() {
 					}
 				}
 			}
+			log.Println(1111, res)
 			if jy.SwitchService.IsMember(s.Session(), mongodb) {
 				subscribe = util.IntAll((*user)["i_member_apppushunread"])
 			} else if isNew {