MCPcopy Index your code
hub / github.com/aiprodcoder/MIXAPI / GetUserIdByAffCode

Function GetUserIdByAffCode

model/user.go:238–245  ·  view source on GitHub ↗
(affCode string)

Source from the content-addressed store, hash-verified

236}
237
238func GetUserIdByAffCode(affCode string) (int, error) {
239 if affCode == "" {
240 return 0, errors.New("affCode 为空!")
241 }
242 var user User
243 err := DB.Select("id").First(&user, "aff_code = ?", affCode).Error
244 return user.Id, err
245}
246
247func DeleteUserById(id int) (err error) {
248 if id == 0 {

Callers 3

GitHubOAuthFunction · 0.92
LinuxdoOAuthFunction · 0.92
RegisterFunction · 0.92

Calls

no outgoing calls

Tested by

no test coverage detected