|
|
@@ -4,6 +4,7 @@ import ( |
|
|
|
"code.fnuoos.com/zhimeng/model.git/src/super/dao" |
|
|
|
"code.fnuoos.com/zhimeng/model.git/src/super/model" |
|
|
|
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx" |
|
|
|
"strings" |
|
|
|
"xorm.io/xorm" |
|
|
|
) |
|
|
|
|
|
|
@@ -26,10 +27,13 @@ func (a MediumContactInfoDb) GetMediumContactInfoList(MediumId int) (medium *mod |
|
|
|
} |
|
|
|
return medium, nil |
|
|
|
} |
|
|
|
func (a MediumContactInfoDb) FindMediumContactInfoList(uuid, name, state string, page, limit int) (list []dao.MediumContactInfoGroup, total int64, err error) { |
|
|
|
func (a MediumContactInfoDb) FindMediumContactInfoList(uuid, name, mediumId, state string, page, limit int) (list []dao.MediumContactInfoGroup, total int64, err error) { |
|
|
|
sess := a.Db.Where("medium_contact_info.state>0").Desc("medium_contact_info.id").Limit(limit, (page-1)*limit) |
|
|
|
if mediumId != "" { |
|
|
|
sess.In("medium_list.medium_id", strings.Split(mediumId, ",")) |
|
|
|
} |
|
|
|
if name != "" { |
|
|
|
sess.In("medium_list.medium_id", name) |
|
|
|
sess.And("medium_list.company_name like ?", "%"+name+"%") |
|
|
|
} |
|
|
|
if state != "" { |
|
|
|
sess.And("medium_contact_info.state = ?", state) |
|
|
|