|
@@ -4,6 +4,7 @@ import ( |
|
|
"code.fnuoos.com/zhimeng/model.git/src/dao" |
|
|
"code.fnuoos.com/zhimeng/model.git/src/dao" |
|
|
"code.fnuoos.com/zhimeng/model.git/src/model" |
|
|
"code.fnuoos.com/zhimeng/model.git/src/model" |
|
|
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx" |
|
|
zhios_order_relate_logx "code.fnuoos.com/zhimeng/model.git/utils/logx" |
|
|
|
|
|
"strings" |
|
|
"xorm.io/xorm" |
|
|
"xorm.io/xorm" |
|
|
) |
|
|
) |
|
|
|
|
|
|
|
@@ -40,13 +41,13 @@ func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceListByMedium |
|
|
} |
|
|
} |
|
|
return medium, nil |
|
|
return medium, nil |
|
|
} |
|
|
} |
|
|
func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceList(name, platform string, adType, state string, mediumId, page, limit int) (list []dao.AppletApplicationAdSpaceListGroup, total int64, err error) { |
|
|
|
|
|
|
|
|
func (a AppletApplicationAdSpaceListDb) FindAppletApplicationAdSpaceList(name, platform string, adType, state string, mediumId string, page, limit int) (list []dao.AppletApplicationAdSpaceListGroup, total int64, err error) { |
|
|
sess := a.Db.Where("applet_application_ad_space_list.id>0").Desc("applet_application_ad_space_list.id") |
|
|
sess := a.Db.Where("applet_application_ad_space_list.id>0").Desc("applet_application_ad_space_list.id") |
|
|
if page > 0 { |
|
|
if page > 0 { |
|
|
sess.Limit(limit, (page-1)*limit) |
|
|
sess.Limit(limit, (page-1)*limit) |
|
|
} |
|
|
} |
|
|
if mediumId > 0 { |
|
|
|
|
|
sess.And("applet_application_ad_space_list.medium_id=?", mediumId) |
|
|
|
|
|
|
|
|
if mediumId != "" { |
|
|
|
|
|
sess.And("applet_application_ad_space_list.medium_id=?", strings.Split(mediumId, ",")) |
|
|
} |
|
|
} |
|
|
if name != "" { |
|
|
if name != "" { |
|
|
sess.And("applet_application_ad_space_list.name like ? or applet_application_ad_space_list.ad_id like ?", "%"+name+"%", "%"+name+"%") |
|
|
sess.And("applet_application_ad_space_list.name like ? or applet_application_ad_space_list.ad_id like ?", "%"+name+"%", "%"+name+"%") |
|
|