|
@@ -190,7 +190,7 @@ func GetMediumByAccountId(c *gin.Context, name, account string) string { |
|
|
if name != "" { |
|
|
if name != "" { |
|
|
sess.And("memo like ?", "%"+name+"%") |
|
|
sess.And("memo like ?", "%"+name+"%") |
|
|
var tmp1 []model.MediumList |
|
|
var tmp1 []model.MediumList |
|
|
MasterDb(c).Where("company_name like ? or company_abbreviation like ?", "%"+name+"%", "%"+name+"%").Find(&tmp1) |
|
|
|
|
|
|
|
|
db.Db.Where("company_name like ? or company_abbreviation like ?", "%"+name+"%", "%"+name+"%").Find(&tmp1) |
|
|
for _, v := range tmp1 { |
|
|
for _, v := range tmp1 { |
|
|
ids = append(ids, utils.IntToStr(v.MediumId)) |
|
|
ids = append(ids, utils.IntToStr(v.MediumId)) |
|
|
} |
|
|
} |
|
@@ -319,7 +319,7 @@ func GetMediumIdStr(c *gin.Context, admId int, name, account string) string { |
|
|
appIds = []string{"-1"} |
|
|
appIds = []string{"-1"} |
|
|
ex := strings.Split(appId, ",") |
|
|
ex := strings.Split(appId, ",") |
|
|
for _, v := range ex { |
|
|
for _, v := range ex { |
|
|
if utils.InArr(v, ids) || len(list) == 0 { |
|
|
|
|
|
|
|
|
if utils.InArr(v, ids) || len(list) == 0 || admId == super.AdmId { |
|
|
appIds = append(appIds, v) |
|
|
appIds = append(appIds, v) |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|