1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- package institution
- import (
- "context"
- "fmt"
- "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/rpc/medical/medical"
- "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/svc"
- "bp.jydev.jianyu360.cn/ApplicationCenter/medicalField/api/medical/internal/types"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type GetNewMsgListLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewGetNewMsgListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetNewMsgListLogic {
- return &GetNewMsgListLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *GetNewMsgListLogic) GetNewMsgList(req *types.GetNewMsgListReq) (resp *types.CommonRes, err error) {
- // todo: add your logic here and delete this line
- resp = &types.CommonRes{}
- ret, err := l.svcCtx.Medical.GetNewMsg(l.ctx, &medical.GetNewMsgReq{
- CompanyName: req.CompanyName,
- PageNum: req.PageNum,
- PageSize: req.PageSize,
- })
- if err != nil || ret == nil {
- l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
- resp.Error_code, resp.Error_msg = -1, "查看失败"
- } else {
- resp.Data = map[string]interface{}{
- "count": ret.Count,
- "list": ret.List,
- }
- }
- return
- }
|