|
@@ -59,6 +59,26 @@ func GetBusinessConf() (list map[string]string, err error) {
|
|
}
|
|
}
|
|
return
|
|
return
|
|
}
|
|
}
|
|
|
|
+func GetBusinessConfByKeys(key []string) (list map[string]string, err error) {
|
|
|
|
+ list = make(map[string]string)
|
|
|
|
+ if len(key) == 0 {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ var items []*BusinessConf
|
|
|
|
+ sql := `SELECT * FROM business_conf WHERE conf_key IN ? `
|
|
|
|
+ err = global.DbMap[utils.DbNameMaster].Raw(sql, key).Find(&items).Error
|
|
|
|
+ if err != nil {
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ for _, v := range items {
|
|
|
|
+ if v.ValType == 4 {
|
|
|
|
+ list[v.ConfKey] = html.UnescapeString(v.ConfVal)
|
|
|
|
+ continue
|
|
|
|
+ }
|
|
|
|
+ list[v.ConfKey] = v.ConfVal
|
|
|
|
+ }
|
|
|
|
+ return
|
|
|
|
+}
|
|
|
|
|
|
type Report2ImgReplace struct {
|
|
type Report2ImgReplace struct {
|
|
IsReplace bool `description:"是否替换"`
|
|
IsReplace bool `description:"是否替换"`
|