...
|
...
|
@@ -26,10 +26,9 @@ func NewMiniBusinessLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Mini |
|
|
}
|
|
|
}
|
|
|
|
|
|
func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (resp *types.MessageBusinessResponse, err error) {
|
|
|
func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageRequest, msgType domain.MsgBusinessType) (resp *types.MessageBusinessResponse, err error) {
|
|
|
var userToken = contextdata.GetUserTokenFromCtx(l.ctx)
|
|
|
var conn = l.svcCtx.DefaultDBConn()
|
|
|
var msgType = req.Type
|
|
|
|
|
|
total, list, err := l.svcCtx.MessageBusinessRepository.Find(l.ctx, conn, domain.NewQueryOptions().
|
|
|
WithOffsetLimit(req.Page, req.Size).
|
...
|
...
|
@@ -100,8 +99,8 @@ func (l *MiniBusinessLogic) MiniBusiness(req *types.MessageBusinessRequest) (res |
|
|
if len(companyIds) > 0 {
|
|
|
_, companyList, err := l.svcCtx.CompanyRepository.Find(l.ctx, conn, domain.NewQueryOptions().
|
|
|
WithFindOnly().
|
|
|
WithKV("ids", userIds).
|
|
|
WithKV("limit", len(userIds)))
|
|
|
WithKV("ids", companyIds).
|
|
|
WithKV("limit", len(companyIds)))
|
|
|
if err != nil {
|
|
|
return nil, err
|
|
|
}
|
...
|
...
|
|