소스 검색

Merge remote-tracking branch 'origin/dev4.6.3.7' into dev4.6.3.7

# Conflicts:
#	src/jfw/modules/app/src/app/front/front.go
WH01243 3 년 전
부모
커밋
cac6fe7823
1개의 변경된 파일15개의 추가작업 그리고 3개의 파일을 삭제
  1. 15 3
      src/jfw/modules/app/src/app/front/front.go

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

@@ -543,10 +543,23 @@ func (s *Front) ShowRedSpotOnMenu() {
 				s_phone = s_m_phone
 			}
 			isNew := false
-			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
+			/* 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
 			ON u.ent_id=i.id
-			where  u.phone=?`, s_phone)
+			ORDER BY  i.status DESC,i.auth_status DESC, CASE WHEN u.phone=? THEN 0  ELSE 1 END  ASC`, 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 {
@@ -557,7 +570,6 @@ 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 {