|
@@ -826,6 +826,7 @@ func (d *DataExport) ValuationList(order_code string) error {
|
|
|
//剑鱼pc判断登录用户是否有我的企业、商机管理菜单
|
|
|
func (this *DataExport) GetPcEntAuth() {
|
|
|
userId, _ := this.GetSession("userId").(string)
|
|
|
+ //userId := "1212"
|
|
|
if userId == "" {
|
|
|
data := map[string]interface{}{
|
|
|
"error_code": 1001,
|
|
@@ -847,8 +848,9 @@ func (this *DataExport) GetPcEntAuth() {
|
|
|
for _, v := range config.EntnichePcConf.HideEntnicheMenu {
|
|
|
hideUsers[v] = true
|
|
|
}
|
|
|
+ isNew := false
|
|
|
if phone != "" {
|
|
|
- ent := public.Mysql.SelectBySql("select id,phone from entniche_info where phone=? and status=1", phone)
|
|
|
+ ent := public.Mysql.SelectBySql("select id,phone,createtime from entniche_info where phone=? and status=1 ", phone)
|
|
|
if ent != nil && len(*ent) != 0 {
|
|
|
for _, val := range *ent {
|
|
|
if pcUsers[util.IntAll(val["id"])] {
|
|
@@ -856,6 +858,11 @@ func (this *DataExport) GetPcEntAuth() {
|
|
|
if hideUsers[util.IntAll(val["id"])] {
|
|
|
entnicheMenu = false
|
|
|
} else {
|
|
|
+ loc, _ := time.LoadLocation("Local")
|
|
|
+ t2, _ := time.ParseInLocation("2006-01-02 15:04:05", util.ObjToString(val["createtimes"]), loc)
|
|
|
+ if t2.Unix() > int64(1642227707) {
|
|
|
+ isNew = true
|
|
|
+ }
|
|
|
entnicheMenu = true
|
|
|
}
|
|
|
break
|
|
@@ -863,11 +870,11 @@ func (this *DataExport) GetPcEntAuth() {
|
|
|
}
|
|
|
}
|
|
|
if !myEntMenu {
|
|
|
- user := public.Mysql.SelectBySql("select id,ent_id,power,export_power from entniche_user where phone=?", phone)
|
|
|
+ user := public.Mysql.SelectBySql("select id,ent_id,power,export_power from entniche_user where phone=? ", phone)
|
|
|
if user != nil && len(*user) > 0 {
|
|
|
for _, v := range *user {
|
|
|
if pcUsers[util.IntAll(v["ent_id"])] {
|
|
|
- ents := public.Mysql.SelectBySql("select status,id from entniche_info where id=?", util.IntAll(v["ent_id"]))
|
|
|
+ ents := public.Mysql.SelectBySql("select status,id,createtime from entniche_info where id=? ", util.IntAll(v["ent_id"]))
|
|
|
if ents != nil && len(*ents) != 0 {
|
|
|
for _, vv := range *ents {
|
|
|
if util.IntAll(vv["status"]) == 1 {
|
|
@@ -877,6 +884,11 @@ func (this *DataExport) GetPcEntAuth() {
|
|
|
if hideUsers[util.IntAll(vv["id"])] {
|
|
|
entnicheMenu = false
|
|
|
} else {
|
|
|
+ loc, _ := time.LoadLocation("Local")
|
|
|
+ t2, _ := time.ParseInLocation("2006-01-02 15:04:05", util.ObjToString(vv["createtime"]), loc)
|
|
|
+ if t2.Unix() > int64(1642227707) {
|
|
|
+ isNew = true
|
|
|
+ }
|
|
|
entnicheMenu = true
|
|
|
}
|
|
|
}
|
|
@@ -888,9 +900,11 @@ func (this *DataExport) GetPcEntAuth() {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
data := map[string]interface{}{
|
|
|
"myEntMenu": myEntMenu,
|
|
|
"entnicheMenu": entnicheMenu,
|
|
|
+ "isNew": isNew,
|
|
|
}
|
|
|
this.ServeJson(data)
|
|
|
}
|