陈少旭 7 months ago
parent
commit
435feb6eb8

+ 1 - 2
controllers/admin_api_controllers/system_api_controller.go View File

69
 	id, _ := this.GetInt64("id")
69
 	id, _ := this.GetInt64("id")
70
 	name := this.GetString("name")
70
 	name := this.GetString("name")
71
 	mobile := this.GetString("mobile")
71
 	mobile := this.GetString("mobile")
72
-	password := this.GetString("password")
72
+	password := this.GetString("user_password")
73
 	role_type, _ := this.GetInt64("type")
73
 	role_type, _ := this.GetInt64("type")
74
 	remark := this.GetString("remark")
74
 	remark := this.GetString("remark")
75
 
75
 
76
 	admins, _ := service.FindAdminById(id)
76
 	admins, _ := service.FindAdminById(id)
77
-
78
 	admin := &admin_models.AdminAccount{
77
 	admin := &admin_models.AdminAccount{
79
 		ID:       admins.ID,
78
 		ID:       admins.ID,
80
 		Mobile:   mobile,
79
 		Mobile:   mobile,

+ 1 - 1
service/admin_service.go View File

317
 }
317
 }
318
 
318
 
319
 func FindUserInfoByAccount(account string) (admin admin_models.AdminAccount, err error) {
319
 func FindUserInfoByAccount(account string) (admin admin_models.AdminAccount, err error) {
320
-	err = readChargeDb.Model(&admin_models.AdminAccount{}).Where("account = ? AND status = 1", account).First(&admin).Error
320
+	err = readChargeDb.Model(&admin_models.AdminAccount{}).Where("mobile = ? AND status = 1", account).First(&admin).Error
321
 	return
321
 	return
322
 }
322
 }
323
 
323