陈少旭 пре 7 месеци
родитељ
комит
435feb6eb8

+ 1 - 2
controllers/admin_api_controllers/system_api_controller.go Прегледај датотеку

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

+ 1 - 1
service/admin_service.go Прегледај датотеку

@@ -317,7 +317,7 @@ func CreateAdmin(admin *admin_models.AdminAccount) (err error) {
317 317
 }
318 318
 
319 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 321
 	return
322 322
 }
323 323