|
@@ -42,15 +42,8 @@ func (this *ImageConfController) GetImageMaterial() {
|
|
|
br.ErrMsg = "请选择配置类型!"
|
|
|
return
|
|
|
}
|
|
|
- imageType, err := this.GetInt("ImageType")
|
|
|
- if err != nil {
|
|
|
- return
|
|
|
- }
|
|
|
- if imageType <= 0 {
|
|
|
- br.Msg = "请选择图片类型!"
|
|
|
- br.ErrMsg = "请选择图片类型!"
|
|
|
- return
|
|
|
- }
|
|
|
+ imageType, _ := this.GetInt("ImageType")
|
|
|
+
|
|
|
imageName := this.GetString("ImageName")
|
|
|
|
|
|
pageSize, _ := this.GetInt("PageSize")
|
|
@@ -70,8 +63,10 @@ func (this *ImageConfController) GetImageMaterial() {
|
|
|
condition += ` AND conf_type=? `
|
|
|
pars = append(pars, confType)
|
|
|
|
|
|
- condition += ` AND image_type=? `
|
|
|
- pars = append(pars, imageType)
|
|
|
+ if imageType > 0 {
|
|
|
+ condition += ` AND image_type=? `
|
|
|
+ pars = append(pars, imageType)
|
|
|
+ }
|
|
|
|
|
|
if imageName != "" {
|
|
|
condition += ` AND image_name LIKE '%` + imageName + `%' `
|