26 lines
696 B
Go
26 lines
696 B
Go
package sys
|
|
|
|
import (
|
|
"context"
|
|
"hotgo/api/admin/immailboxconfig"
|
|
"hotgo/internal/service"
|
|
)
|
|
|
|
var ImMailboxConfig = cImMailboxConfig{}
|
|
|
|
type cImMailboxConfig struct{}
|
|
|
|
func (c *cImMailboxConfig) Get(ctx context.Context, req *immailboxconfig.GetReq) (res *immailboxconfig.GetRes, err error) {
|
|
data, err := service.SysImMailboxConfig().Get(ctx, &req.ImMailboxConfigGetInp)
|
|
if err != nil {
|
|
return
|
|
}
|
|
res = &immailboxconfig.GetRes{ImMailboxConfigModel: data}
|
|
return
|
|
}
|
|
|
|
func (c *cImMailboxConfig) Update(ctx context.Context, req *immailboxconfig.UpdateReq) (res *immailboxconfig.UpdateRes, err error) {
|
|
err = service.SysImMailboxConfig().Update(ctx, &req.ImMailboxConfigUpdateInp)
|
|
return
|
|
}
|