|
@@ -713,7 +713,7 @@ func GetPhone(u map[string]interface{}) string {
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-func GetAllByEntUserId(mgo *MongodbSim, msl *Mysql, entUserId, tp int) *map[string]interface{} {
|
|
|
+func GetAllByEntUserId(mgo *MongodbSim, msl *Mysql, entUserId int) *map[string]interface{} {
|
|
|
entUsers := msl.SelectBySql(`select phone from entniche_user where id=?`, entUserId)
|
|
|
if entUsers == nil || len(*entUsers) == 0 {
|
|
|
logger.Info("entniche_user表中没有找到该企业用户", entUserId)
|
|
@@ -723,11 +723,11 @@ func GetAllByEntUserId(mgo *MongodbSim, msl *Mysql, entUserId, tp int) *map[stri
|
|
|
if phone == "" {
|
|
|
return nil
|
|
|
}
|
|
|
- return getEntPushSet(mgo, msl, entUserId, tp, phone)
|
|
|
+ return getEntPushSet(mgo, msl, entUserId, phone)
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-func GetAllByEntPositionId(mgo *MongodbSim, tidb, msl *Mysql, positionId, tp int) *map[string]interface{} {
|
|
|
+func GetAllByEntPositionId(mgo *MongodbSim, tidb, msl *Mysql, positionId int) *map[string]interface{} {
|
|
|
position := tidb.SelectBySql(`select a.ent_id,b.phone from base_position a inner join base_user b on (a.id=? and a.user_id=b.id)`, positionId)
|
|
|
if position == nil || len(*position) == 0 {
|
|
|
logger.Info("无效的职位id", position)
|
|
@@ -748,11 +748,11 @@ func GetAllByEntPositionId(mgo *MongodbSim, tidb, msl *Mysql, positionId, tp int
|
|
|
logger.Info("entniche_user表中没有找到该企业用户", phone, entId)
|
|
|
return nil
|
|
|
}
|
|
|
- return getEntPushSet(mgo, msl, util.IntAll((*entUsers)[0]["id"]), tp, phone)
|
|
|
+ return getEntPushSet(mgo, msl, util.IntAll((*entUsers)[0]["id"]), phone)
|
|
|
}
|
|
|
|
|
|
//
|
|
|
-func getEntPushSet(mgo *MongodbSim, msl *Mysql, entUserId, tp int, phone string) *map[string]interface{} {
|
|
|
+func getEntPushSet(mgo *MongodbSim, msl *Mysql, entUserId int, phone string) *map[string]interface{} {
|
|
|
users, ok := mgo.Find(Mgo_User, map[string]interface{}{
|
|
|
"$or": []map[string]interface{}{
|
|
|
map[string]interface{}{
|