|
@@ -8,7 +8,7 @@ import (
|
8
|
8
|
func GetXcxMobileInformation(mobile string) (*models.XcxAdminUserRole, error) {
|
9
|
9
|
role := models.XcxAdminUserRole{}
|
10
|
10
|
|
11
|
|
- err := XTReadDB().Model(&role).Where("mobile = ? and status = 1", mobile).Find(&role).Error
|
|
11
|
+ err := UserReadDB().Model(&role).Where("mobile = ? and status = 1", mobile).Find(&role).Error
|
12
|
12
|
if err == gorm.ErrRecordNotFound {
|
13
|
13
|
return nil, err
|
14
|
14
|
}
|
|
@@ -21,12 +21,12 @@ func GetXcxMobileInformation(mobile string) (*models.XcxAdminUserRole, error) {
|
21
|
21
|
|
22
|
22
|
func CreateXcxAdminUser(role models.XcxAdminUserRole) error {
|
23
|
23
|
|
24
|
|
- err := XTWriteDB().Create(&role).Error
|
|
24
|
+ err := UserReadDB().Create(&role).Error
|
25
|
25
|
return err
|
26
|
26
|
}
|
27
|
27
|
|
28
|
28
|
func GetLoginInfor(mobile string) (models.XcxAdminUserRole, error) {
|
29
|
29
|
role := models.XcxAdminUserRole{}
|
30
|
|
- err := XTReadDB().Model(&role).Where("mobile = ? and status = 1", mobile).Find(&role).Error
|
|
30
|
+ err := UserReadDB().Model(&role).Where("mobile = ? and status = 1", mobile).Find(&role).Error
|
31
|
31
|
return role, err
|
32
|
32
|
}
|