12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- package logic
- import (
- "app.yhyue.com/moapp/jyInfo/api/internal/svc"
- "app.yhyue.com/moapp/jyInfo/api/internal/types"
- common2 "app.yhyue.com/moapp/jyInfo/rpc/common/commonclient"
- "app.yhyue.com/moapp/jybase/common"
- "context"
- "fmt"
- "github.com/zeromicro/go-zero/core/logx"
- )
- type GetIndustryLogic struct {
- logx.Logger
- ctx context.Context
- svcCtx *svc.ServiceContext
- }
- func NewGetIndustryLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GetIndustryLogic {
- return &GetIndustryLogic{
- Logger: logx.WithContext(ctx),
- ctx: ctx,
- svcCtx: svcCtx,
- }
- }
- func (l *GetIndustryLogic) GetIndustry() (resp *types.CommonRes, err error) {
- //AppId用不到,暂时写死放这里
- res, err0 := l.svcCtx.Common.IndustryInfo(l.ctx, &common2.ProjectReq{AppId: "10000"})
- fmt.Println(err0)
- if err0 != nil {
- return &types.CommonRes{
- Err_code: -1,
- Err_msg: "错误",
- }, nil
- }
- return &types.CommonRes{
- Err_code: common.IntAll(res.ErrCode),
- Err_msg: res.ErrMsg,
- Data: res.Data,
- }, nil
- }
|