正在显示
5 个修改的文件
包含
13 行增加
和
13 行删除
partnermg
0 → 100755
不能预览此文件类型
@@ -472,13 +472,13 @@ func (service SyncEmployeeService) changePhone(data ChangePhoneData) error { | @@ -472,13 +472,13 @@ func (service SyncEmployeeService) changePhone(data ChangePhoneData) error { | ||
472 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) | 472 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) |
473 | } | 473 | } |
474 | 474 | ||
475 | - // 更新高管手机号 | ||
476 | - if err = uDao.UpdateUserPhone(data.OldPhone, data.NewPhone); err != nil { | 475 | + // 更新合伙人手机号 |
476 | + if err = pDao.UpdatePartnerPhone(data.OldPhone, data.NewPhone); err != nil { | ||
477 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) | 477 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) |
478 | } | 478 | } |
479 | 479 | ||
480 | - // 更新合伙人手机号 | ||
481 | - if err = pDao.UpdatePartnerPhone(data.OldPhone, data.NewPhone); err != nil { | 480 | + // 更新高管手机号 |
481 | + if err = uDao.UpdateUserPhone(data.OldPhone, data.NewPhone); err != nil { | ||
482 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) | 482 | return lib.ThrowError(lib.INTERNAL_SERVER_ERROR, err.Error()) |
483 | } | 483 | } |
484 | 484 |
@@ -2,11 +2,11 @@ package constant | @@ -2,11 +2,11 @@ package constant | ||
2 | 2 | ||
3 | import "os" | 3 | import "os" |
4 | 4 | ||
5 | -var POSTGRESQL_DB_NAME = "partner_test" | 5 | +var POSTGRESQL_DB_NAME = "partner_dev" |
6 | var POSTGRESQL_USER = "postgres" | 6 | var POSTGRESQL_USER = "postgres" |
7 | -var POSTGRESQL_PASSWORD = "1993618jack" // eagle1010 1993618jack | ||
8 | -var POSTGRESQL_HOST = "127.0.0.1" // 114.55.200.59 127.0.0.1 | ||
9 | -var POSTGRESQL_PORT = "5432" // 31543 5432 | 7 | +var POSTGRESQL_PASSWORD = "eagle1010" // eagle1010 1993618jack |
8 | +var POSTGRESQL_HOST = "114.55.200.59" // 114.55.200.59 127.0.0.1 | ||
9 | +var POSTGRESQL_PORT = "31543" // 31543 5432 | ||
10 | var DISABLE_CREATE_TABLE = false | 10 | var DISABLE_CREATE_TABLE = false |
11 | var DISABLE_SQL_GENERATE_PRINT = false | 11 | var DISABLE_SQL_GENERATE_PRINT = false |
12 | 12 |
@@ -2,7 +2,6 @@ package dao | @@ -2,7 +2,6 @@ package dao | ||
2 | 2 | ||
3 | import ( | 3 | import ( |
4 | "fmt" | 4 | "fmt" |
5 | - | ||
6 | "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/models" | 5 | "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/models" |
7 | "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction" | 6 | "gitlab.fjmaimaimai.com/mmm-go/partnermg/pkg/infrastructure/pg/transaction" |
8 | ) | 7 | ) |
@@ -36,8 +35,8 @@ func (dao UsersDao) UpdateUserPhone(oldPhone string, newPhone string) error { | @@ -36,8 +35,8 @@ func (dao UsersDao) UpdateUserPhone(oldPhone string, newPhone string) error { | ||
36 | tx := dao.transactionContext.PgTx | 35 | tx := dao.transactionContext.PgTx |
37 | m := &models.Users{} | 36 | m := &models.Users{} |
38 | _, err := tx.Model(m). | 37 | _, err := tx.Model(m). |
39 | - Set("phone", newPhone). | ||
40 | - Where("phone = ?", oldPhone). | 38 | + Set("phone=?", newPhone). |
39 | + Where("phone=?", oldPhone). | ||
41 | Update() | 40 | Update() |
42 | return err | 41 | return err |
43 | } | 42 | } |
@@ -8,8 +8,6 @@ import ( | @@ -8,8 +8,6 @@ import ( | ||
8 | //外部调用,企业平台,总后台调用 | 8 | //外部调用,企业平台,总后台调用 |
9 | func init() { | 9 | func init() { |
10 | nsPlatform := beego.NewNamespace("/platform", | 10 | nsPlatform := beego.NewNamespace("/platform", |
11 | - // TODO 增加修改手机号动作 | ||
12 | - beego.NSRouter("/api/business/index", &controllers.SyncDataController{}, "Post:SyncData"), | ||
13 | //同步企业相关数据 | 11 | //同步企业相关数据 |
14 | beego.NSRouter("/action", &controllers.SyncDataController{}, "post:SyncData"), | 12 | beego.NSRouter("/action", &controllers.SyncDataController{}, "post:SyncData"), |
15 | //更换公司管理员 | 13 | //更换公司管理员 |
@@ -20,6 +18,9 @@ func init() { | @@ -20,6 +18,9 @@ func init() { | ||
20 | //beego.NSRouter("/company/info", &controllers.SyncDataController{}, "post:GetCompanyInfo"), | 18 | //beego.NSRouter("/company/info", &controllers.SyncDataController{}, "post:GetCompanyInfo"), |
21 | ) | 19 | ) |
22 | 20 | ||
21 | + // 修改手机号,企业平台调用 | ||
22 | + beego.Router("/api/business/index", &controllers.SyncDataController{}, "Post:SyncData") | ||
23 | + | ||
23 | beego.AddNamespace(nsPlatform) //企业平台调用 | 24 | beego.AddNamespace(nsPlatform) //企业平台调用 |
24 | beego.AddNamespace(nsUcenter) //统一用户中心调用 | 25 | beego.AddNamespace(nsUcenter) //统一用户中心调用 |
25 | } | 26 | } |
-
请 注册 或 登录 后发表评论