You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
337 B
17 lines
337 B
package dao |
|
|
|
import ( |
|
"context" |
|
"database/sql" |
|
|
|
"go-common/library/ecode" |
|
) |
|
|
|
// Secret . |
|
func (d *Dao) Secret(c context.Context, sappKey string) (res string, err error) { |
|
err = d.DB.Table("dm_apps").Where("appkey = ?", sappKey).Select("app_secret").Row().Scan(&res) |
|
if err == sql.ErrNoRows { |
|
err = ecode.NothingFound |
|
} |
|
return |
|
}
|
|
|