|
@@ -102,13 +102,13 @@ func (l *NewestBiddingLogic) NewestBidding(in *bxbase.NewestBiddingReq) (*bxbase
|
|
}
|
|
}
|
|
if phone := MC.If((*userMap)["s_phone"] != nil, MC.ObjToString((*userMap)["s_phone"]), MC.ObjToString((*userMap)["s_m_phone"])).(string); phone != "" && in.EntUserId != "" && in.EntId != "" {
|
|
if phone := MC.If((*userMap)["s_phone"] != nil, MC.ObjToString((*userMap)["s_phone"]), MC.ObjToString((*userMap)["s_m_phone"])).(string); phone != "" && in.EntUserId != "" && in.EntId != "" {
|
|
//商机管理
|
|
//商机管理
|
|
- entNicheInfos := IC.MainMysql.SelectBySql(`SELECT i.power_source,r.role_id,u.power FROM (entniche_user u LEFT JOIN entniche_user_role r ON r.user_id = u.id) LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone = ? and i.id = ?`, phone, in.EntId)
|
|
|
|
|
|
+ entNicheInfos := IC.MainMysql.SelectBySql(`SELECT i.power_source,u.power FROM entniche_user u LEFT JOIN entniche_info i ON u.ent_id=i.id WHERE u.phone=? and i.status=1 AND i.id = ?`, phone, in.EntId)
|
|
if entNicheInfos != nil && len(*entNicheInfos) > 0 {
|
|
if entNicheInfos != nil && len(*entNicheInfos) > 0 {
|
|
entNicheInfo := (*entNicheInfos)[0]
|
|
entNicheInfo := (*entNicheInfos)[0]
|
|
//排除商机管理服务
|
|
//排除商机管理服务
|
|
if MC.IntAll(entNicheInfo["power_source"]) != 1 {
|
|
if MC.IntAll(entNicheInfo["power_source"]) != 1 {
|
|
- //商机管理管理员 或 已分发权限的员工
|
|
|
|
- if MC.IntAll(entNicheInfo["role_id"]) > 0 || MC.IntAll(entNicheInfo["power"]) > 0 {
|
|
|
|
|
|
+ // 已分发权限
|
|
|
|
+ if MC.IntAll(entNicheInfo["power"]) > 0 {
|
|
//商机管理推送历史
|
|
//商机管理推送历史
|
|
result := model.GetNewestInfo(in.EntUserId, "e", MC.Int64All(in.EntUserId)).GetPushHistory()
|
|
result := model.GetNewestInfo(in.EntUserId, "e", MC.Int64All(in.EntUserId)).GetPushHistory()
|
|
res.Data.Count = int64(len(result))
|
|
res.Data.Count = int64(len(result))
|