forked from ebhomengo/niki
22 lines
665 B
Go
22 lines
665 B
Go
|
package notification
|
||
|
|
||
|
import (
|
||
|
"context"
|
||
|
"fmt"
|
||
|
|
||
|
params "git.gocasts.ir/ebhomengo/niki/param"
|
||
|
adminserviceparam "git.gocasts.ir/ebhomengo/niki/param/admin/admin"
|
||
|
smsmsg "git.gocasts.ir/ebhomengo/niki/pkg/sms_msg"
|
||
|
)
|
||
|
|
||
|
func (s Service) KindBoxAssigned(req params.NotificationKindBoxAssigned) {
|
||
|
const op = "notification.KindBoxAssigned"
|
||
|
|
||
|
ctx := context.Background()
|
||
|
bnf, gErr := s.AdminSvc.AdminExistByID(ctx, adminserviceparam.AdminExistByIDRequest{AdminID: req.ReceiverAgentID})
|
||
|
if gErr != nil {
|
||
|
fmt.Println(fmt.Errorf("error(%s):%w", op, gErr))
|
||
|
}
|
||
|
s.smsAdapter.Send(bnf.Admin.PhoneNumber, fmt.Sprintf(smsmsg.SmsMsgKindBoxAssigned, bnf.Admin.FirstName))
|
||
|
}
|