message
CI / changes (push) Successful in 38s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 1s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 51s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 49s
CI / payment (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / wecom (push) Successful in 0s
CI / changes (push) Successful in 38s
CI / ad (push) Successful in 0s
CI / admin (push) Successful in 0s
CI / bff (push) Successful in 1s
CI / chore (push) Successful in 0s
CI / equipment (push) Successful in 0s
CI / express (push) Successful in 51s
CI / factory (push) Successful in 0s
CI / message (push) Successful in 49s
CI / payment (push) Successful in 0s
CI / product (push) Successful in 0s
CI / record (push) Successful in 0s
CI / sale (push) Successful in 0s
CI / task (push) Successful in 0s
CI / user (push) Successful in 0s
CI / wecom (push) Successful in 0s
This commit is contained in:
@@ -7,6 +7,7 @@ import (
|
||||
"lone-services/pkg/utils"
|
||||
"lone-services/pkg/validate"
|
||||
chore "lone-services/rpc/chore/pb"
|
||||
message "lone-services/rpc/message/pb"
|
||||
user "lone-services/rpc/user/pb"
|
||||
"lone-services/services/store/internal/dao"
|
||||
"lone-services/services/store/internal/model"
|
||||
@@ -122,12 +123,8 @@ func (l *VerifyStatusLogic) VerifyStatus(in *store.StatusRequest) (*store.Respon
|
||||
//}
|
||||
}
|
||||
|
||||
//TODO 站内消息
|
||||
//mErr := MessageService{}.Add(dao.TargetTypeAgent, dao.ObjTypeStore, status, info.SaleId, info.Id, content)
|
||||
//if mErr != nil {
|
||||
// model.Rollback()
|
||||
// return mErr
|
||||
//}
|
||||
l.message(utils.NumberOne, utils.NumberTwo, int32(status), info.SaleId, info.Id, content)
|
||||
|
||||
modelObj.Commit()
|
||||
|
||||
return l.ok(utils.NumberOne)
|
||||
@@ -184,3 +181,33 @@ func (l *VerifyStatusLogic) sendPassword(mobile, password string) utils.Status {
|
||||
|
||||
return utils.Ok
|
||||
}
|
||||
|
||||
func (l *VerifyStatusLogic) message(targetType, Type, typeStatus int32, targetId, objId int64, content string) {
|
||||
//TargetTypeAgent uint8 = 1 //代理
|
||||
//TargetTypeStore uint8 = 2 //门店
|
||||
//TargetTypeUser uint8 = 3 //个人
|
||||
//// 类型
|
||||
//ObjTypeAgent uint8 = 1 //添加代理
|
||||
//ObjTypeStore uint8 = 2 //加门店
|
||||
//ObjTypeSupply uint8 = 3 //审核补货
|
||||
cli, err := svc.GetRpcClient(l.svcCtx.MessageName)
|
||||
if err != nil {
|
||||
logx.Errorf("get user err: %v", err)
|
||||
return
|
||||
}
|
||||
|
||||
client := message.NewMessageClient(cli.Conn())
|
||||
|
||||
_, err = client.MessageAdd(context.Background(), &message.AddRequest{
|
||||
Content: content,
|
||||
TargetType: targetType,
|
||||
TargetId: targetId,
|
||||
TypeStatus: typeStatus,
|
||||
Type: Type,
|
||||
ObjId: objId,
|
||||
})
|
||||
if err != nil {
|
||||
logx.Errorf("get order err: %v", err)
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user