|
@@ -43,12 +43,12 @@ type EdbInfo struct {
|
|
|
|
|
|
func (d *EdbInfo) GetEdbInfoItem(runMod, indexCode string) (item *EdbInfo, err error) {
|
|
|
if runMod == "release" {
|
|
|
- err = global.MYSQL["hzdata"].WithContext(context.TODO()).Model(d).
|
|
|
- Where("index_code = ?", indexCode).First(&item).Error
|
|
|
+ err = global.MYSQL["hzdata"].WithContext(context.TODO()).Table("edb_info").
|
|
|
+ Where("edb_code = ?", indexCode).First(&item).Error
|
|
|
return
|
|
|
} else {
|
|
|
- err = global.DEFAULT_MYSQL.WithContext(context.TODO()).Model(d).
|
|
|
- Where("index_code = ?", indexCode).First(&item).Error
|
|
|
+ err = global.DEFAULT_MYSQL.WithContext(context.TODO()).Table("edb_info").
|
|
|
+ Where("edb_code = ?", indexCode).First(&item).Error
|
|
|
return
|
|
|
}
|
|
|
}
|