实现了门店员工、员工角色的接口开发
This commit is contained in:
22
internal/controller/storeAdmin/storeAdmin_v1_update.go
Normal file
22
internal/controller/storeAdmin/storeAdmin_v1_update.go
Normal file
@ -0,0 +1,22 @@
|
||||
package storeAdmin
|
||||
|
||||
import (
|
||||
"context"
|
||||
"server/internal/model"
|
||||
"server/internal/service"
|
||||
|
||||
"server/api/storeAdmin/v1"
|
||||
)
|
||||
|
||||
func (c *ControllerV1) Update(ctx context.Context, req *v1.UpdateReq) (res *v1.UpdateRes, err error) {
|
||||
out, err := service.StoreAdmin().Update(ctx, &model.StoreAdminUpdateIn{
|
||||
StoreAdminId: req.Id,
|
||||
Phone: req.Phone,
|
||||
RealName: req.Realname,
|
||||
StoreRoleId: req.StoreRoleId,
|
||||
})
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &v1.UpdateRes{Success: out.Success}, nil
|
||||
}
|
||||
Reference in New Issue
Block a user