|
@@ -49,6 +49,9 @@ func (adminUserSrv AdminUserService) GetAdminUser(getAdminUserQuery *query.GetAd |
|
@@ -49,6 +49,9 @@ func (adminUserSrv AdminUserService) GetAdminUser(getAdminUserQuery *query.GetAd |
49
|
}
|
49
|
}
|
50
|
|
50
|
|
51
|
func (adminUserSrv AdminUserService) SaveAdminUser(saveUserCmd *command.SaveAdminUserCommand) (*domain.AdminUser, error) {
|
51
|
func (adminUserSrv AdminUserService) SaveAdminUser(saveUserCmd *command.SaveAdminUserCommand) (*domain.AdminUser, error) {
|
|
|
52
|
+ if err := saveUserCmd.ValidateCommand(); err != nil {
|
|
|
53
|
+ return nil, lib.ThrowError(lib.ARG_ERROR, err.Error())
|
|
|
54
|
+ }
|
52
|
//实际业务
|
55
|
//实际业务
|
53
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
56
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
54
|
if err != nil {
|
57
|
if err != nil {
|
|
@@ -192,6 +195,9 @@ func (adminUserSrv AdminUserService) PageListAdminUser(listAdminUserQuery *query |
|
@@ -192,6 +195,9 @@ func (adminUserSrv AdminUserService) PageListAdminUser(listAdminUserQuery *query |
192
|
}
|
195
|
}
|
193
|
|
196
|
|
194
|
func (adminUserSrv AdminUserService) UpdateAdminPassword(updatecmd command.UpdateAdminUserPwdCommand) error {
|
197
|
func (adminUserSrv AdminUserService) UpdateAdminPassword(updatecmd command.UpdateAdminUserPwdCommand) error {
|
|
|
198
|
+ if err := updatecmd.ValidateCommand(); err != nil {
|
|
|
199
|
+ return lib.ThrowError(lib.ARG_ERROR, err.Error())
|
|
|
200
|
+ }
|
195
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
201
|
transactionContext, err := factory.CreateTransactionContext(nil)
|
196
|
if err != nil {
|
202
|
if err != nil {
|
197
|
return lib.ThrowError(lib.TRANSACTION_ERROR, err.Error())
|
203
|
return lib.ThrowError(lib.TRANSACTION_ERROR, err.Error())
|