Parcourir la source

feat:更换名字

wangchuanjin il y a 1 an
Parent
commit
81558e0420

+ 14 - 14
api/biService.api

@@ -1,7 +1,7 @@
 syntax = "v1"
 
 type (
-	resp {
+	biResp {
 		Error_code int64       `json:"error_code"` //响应代码
 		Error_msg  string      `json:"error_msg"`  //响应消息
 		Data       interface{} `json:"data"`
@@ -91,32 +91,32 @@ type (
 
 service biService-api {
 	@handler MyDataAsset
-	post /biService/myDataAsset (myDataAssetReq) returns (resp)
+	post /biService/myDataAsset (myDataAssetReq) returns (biResp)
 	@handler AddProjectReq
-	post /biService/addProject (addProjectReq) returns (resp)
+	post /biService/addProject (addProjectReq) returns (biResp)
 	@handler GetInfoId
-	post /biService/getInfoId (getInfoIdReq) returns (resp)
+	post /biService/getInfoId (getInfoIdReq) returns (biResp)
 	@handler DrawClue
-	post /biService/drawClue (drawClueReq) returns (resp)
+	post /biService/drawClue (drawClueReq) returns (biResp)
 	@handler Call
-	post /biService/call (callReq) returns (resp)	//拨打电话
+	post /biService/call (callReq) returns (biResp)	//拨打电话
 	@handler DistributeClue
-	post /biService/distributeClue (DistributeClueReq) returns (resp)
+	post /biService/distributeClue (DistributeClueReq) returns (biResp)
 	@handler ClueImport
-	post /biService/clueImport (ClueImportReq) returns (resp)
+	post /biService/clueImport (ClueImportReq) returns (biResp)
 	@handler ClueAdd
-	post /biService/ClueAdd (ClueAddReq) returns (resp)
+	post /biService/ClueAdd (ClueAddReq) returns (biResp)
 	@handler ClueImportTl
-	post /biService/clueImportTt (ClueImportReq) returns (resp)
+	post /biService/clueImportTt (ClueImportReq) returns (biResp)
 	@handler AutoFollow
-	post /biService/autoFollow (callReq) returns (resp)
+	post /biService/autoFollow (callReq) returns (biResp)
 	@doc "bi通用接口"
 	@handler sqlManage
-	post /biService/sqlManage (SqlManageReq) returns (resp)
+	post /biService/sqlManage (SqlManageReq) returns (biResp)
 	@doc "用户身份"
 	@handler Myinfo
-	post /biService/myInfo (MyInfoReq) returns (resp)
+	post /biService/myInfo (MyInfoReq) returns (biResp)
 	@doc "资源中台授权"
 	@handler ResEmpower
-	post /biService/resEmpower (ResEmpowerReq) returns (resp)
+	post /biService/resEmpower (ResEmpowerReq) returns (biResp)
 }

+ 2 - 2
api/internal/logic/addprojectreqlogic.go

@@ -23,7 +23,7 @@ func NewAddProjectReqLogic(ctx context.Context, svcCtx *svc.ServiceContext) AddP
 	}
 }
 
-func (l *AddProjectReqLogic) AddProjectReq(req types.AddProjectReq) (*types.Resp, error) {
+func (l *AddProjectReqLogic) AddProjectReq(req types.AddProjectReq) (*types.BiResp, error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.AddProject(l.ctx, &biservice.AddProjectReq{
 		InfoId:       req.InfoId,
@@ -37,5 +37,5 @@ func (l *AddProjectReqLogic) AddProjectReq(req types.AddProjectReq) (*types.Resp
 		EntId:        req.EntId,
 		EntUserName:  req.EntUserName,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/autofollowlogic.go

@@ -23,11 +23,11 @@ func NewAutoFollowLogic(ctx context.Context, svcCtx *svc.ServiceContext) *AutoFo
 	}
 }
 
-func (l *AutoFollowLogic) AutoFollow(req *types.CallReq) (resp *types.Resp, err error) {
+func (l *AutoFollowLogic) AutoFollow(req *types.CallReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	callresp, err := l.svcCtx.BiServiceRpc.AutoFollow(l.ctx, &biservice.CallReq{
 		PositionId: req.PositionId,
 		Phone:      req.Phone,
 	})
-	return &types.Resp{Error_code: 1, Data: callresp.Data}, err
+	return &types.BiResp{Error_code: 1, Data: callresp.Data}, err
 }

+ 2 - 2
api/internal/logic/calllogic.go

@@ -25,10 +25,10 @@ func NewCallLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CallLogic {
 	}
 }
 
-func (l *CallLogic) Call(req *types.CallReq) (resp *types.Resp, err error) {
+func (l *CallLogic) Call(req *types.CallReq) (resp *types.BiResp, err error) {
 	callresp, err := l.svcCtx.BiServiceRpc.Call(l.ctx, &pb.CallReq{
 		PositionId: req.PositionId,
 		Phone:      req.Phone,
 	})
-	return &types.Resp{Error_code: 1, Data: callresp.Data}, err
+	return &types.BiResp{Error_code: 1, Data: callresp.Data}, err
 }

+ 2 - 2
api/internal/logic/clueaddlogic.go

@@ -23,7 +23,7 @@ func NewClueAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueAddLo
 	}
 }
 
-func (l *ClueAddLogic) ClueAdd(req *types.ClueAddReq) (resp *types.Resp, err error) {
+func (l *ClueAddLogic) ClueAdd(req *types.ClueAddReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.ClueAdd(l.ctx, &biservice.ClueAddReq{
 		Phone:            req.Phone,
@@ -41,5 +41,5 @@ func (l *ClueAddLogic) ClueAdd(req *types.ClueAddReq) (resp *types.Resp, err err
 		WantGoods:        req.WantGoods,
 		CustomerBudget:   req.CustomerBudget,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/clueimportlogic.go

@@ -23,11 +23,11 @@ func NewClueImportLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ClueIm
 	}
 }
 
-func (l *ClueImportLogic) ClueImport(req *types.ClueImportReq) (resp *types.Resp, err error) {
+func (l *ClueImportLogic) ClueImport(req *types.ClueImportReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.ClueImport(l.ctx, &biservice.ClueImportReq{
 		Pcbh:       req.Pcbh,
 		PositionId: req.PositionId,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/clueimporttllogic.go

@@ -23,10 +23,10 @@ func NewClueImportTlLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Clue
 	}
 }
 
-func (l *ClueImportTlLogic) ClueImportTl(req *types.ClueImportReq) (resp *types.Resp, err error) {
+func (l *ClueImportTlLogic) ClueImportTl(req *types.ClueImportReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.ClueImportTt(l.ctx, &biservice.ClueImportReq{
 		Pcbh: req.Pcbh,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/distributecluelogic.go

@@ -26,7 +26,7 @@ func NewDistributeClueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *Di
 	}
 }
 
-func (l *DistributeClueLogic) DistributeClue(req *types.DistributeClueReq) (resp *types.Resp, err error) {
+func (l *DistributeClueLogic) DistributeClue(req *types.DistributeClueReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	datas := []*biservice.DistributeDatas{}
 	for _, v := range req.Datas {
@@ -46,5 +46,5 @@ func (l *DistributeClueLogic) DistributeClue(req *types.DistributeClueReq) (resp
 		Datas:      datas,
 		IsTask:     req.IsTask,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/drawcluelogic.go

@@ -24,11 +24,11 @@ func NewDrawClueLogic(ctx context.Context, svcCtx *svc.ServiceContext) *DrawClue
 	}
 }
 
-func (l *DrawClueLogic) DrawClue(req *types.DrawClueReq) (resp *types.Resp, err error) {
+func (l *DrawClueLogic) DrawClue(req *types.DrawClueReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.DrawClue(l.ctx, &biservice.DrawClueReq{
 		PositionId: req.PositionId,
 		Count:      req.Count,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/getinfoidlogic.go

@@ -23,10 +23,10 @@ func NewGetInfoIdLogic(ctx context.Context, svcCtx *svc.ServiceContext) GetInfoI
 	}
 }
 
-func (l *GetInfoIdLogic) GetInfoId(req types.GetInfoIdReq) (*types.Resp, error) {
+func (l *GetInfoIdLogic) GetInfoId(req types.GetInfoIdReq) (*types.BiResp, error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.GetInfoId(l.ctx, &biservice.AddProjectReq{
 		PositionId: req.PositionId,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 2 - 2
api/internal/logic/mydataassetlogic.go

@@ -23,12 +23,12 @@ func NewMyDataAssetLogic(ctx context.Context, svcCtx *svc.ServiceContext) MyData
 	}
 }
 
-func (l *MyDataAssetLogic) MyDataAsset(req types.MyDataAssetReq) (*types.Resp, error) {
+func (l *MyDataAssetLogic) MyDataAsset(req types.MyDataAssetReq) (*types.BiResp, error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.MyDataAsset(l.ctx, &biservice.MyDataAssetReq{
 		UserId:    req.UserId,
 		NewUserId: req.NewUserId,
 		EntUserId: req.EntUserId,
 	})
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: res.Data}, err
 }

+ 4 - 3
api/internal/logic/myinfologic.go

@@ -1,8 +1,9 @@
 package logic
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 	"github.com/gogf/gf/v2/util/gconv"
 
 	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
@@ -25,12 +26,12 @@ func NewMyinfoLogic(ctx context.Context, svcCtx *svc.ServiceContext) *MyinfoLogi
 	}
 }
 
-func (l *MyinfoLogic) Myinfo(req *types.MyInfoReq) (resp *types.Resp, err error) {
+func (l *MyinfoLogic) Myinfo(req *types.MyInfoReq) (resp *types.BiResp, err error) {
 	// todo: add your logic here and delete this line
 	res, err := l.svcCtx.BiServiceRpc.MyInfo(l.ctx, &biservice.MyInfoReq{
 		Bid: req.Bid,
 		Sid: req.Sid,
 	})
 	data := gconv.Map(gconv.UnsafeBytesToStr(res.Data))
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: data}, err
 }

+ 2 - 2
api/internal/logic/resempowerlogic.go

@@ -26,7 +26,7 @@ func NewResEmpowerLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ResEmp
 	}
 }
 
-func (l *ResEmpowerLogic) ResEmpower(req *types.ResEmpowerReq) (resp *types.Resp, err error) {
+func (l *ResEmpowerLogic) ResEmpower(req *types.ResEmpowerReq) (resp *types.BiResp, err error) {
 	entUserIds := []int64{}
 	for _, v := range strings.Split(req.EntUserId, ",") {
 		entUserIds = append(entUserIds, Int64All(v))
@@ -43,7 +43,7 @@ func (l *ResEmpowerLogic) ResEmpower(req *types.ResEmpowerReq) (resp *types.Resp
 	} else {
 		status = r.Status
 	}
-	resp = &types.Resp{
+	resp = &types.BiResp{
 		Error_code: 0,
 		Data: map[string]interface{}{
 			"status": status,

+ 4 - 3
api/internal/logic/sqlmanagelogic.go

@@ -1,8 +1,9 @@
 package logic
 
 import (
-	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 	"context"
+
+	"bp.jydev.jianyu360.cn/BaseService/biService/rpc/biservice"
 	"github.com/gogf/gf/v2/util/gconv"
 
 	"bp.jydev.jianyu360.cn/BaseService/biService/api/internal/svc"
@@ -25,7 +26,7 @@ func NewSqlManageLogic(ctx context.Context, svcCtx *svc.ServiceContext) *SqlMana
 	}
 }
 
-func (l *SqlManageLogic) SqlManage(req *types.SqlManageReq) (resp *types.Resp, err error) {
+func (l *SqlManageLogic) SqlManage(req *types.SqlManageReq) (resp *types.BiResp, err error) {
 	param := []*biservice.Param{}
 	for _, v := range req.Params {
 		param = append(param, &biservice.Param{
@@ -38,5 +39,5 @@ func (l *SqlManageLogic) SqlManage(req *types.SqlManageReq) (resp *types.Resp, e
 		Params: param,
 	})
 	data := gconv.Map(gconv.UnsafeBytesToStr(res.Data))
-	return &types.Resp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: data}, err
+	return &types.BiResp{Error_code: res.ErrorCode, Error_msg: res.ErrorMsg, Data: data}, err
 }

+ 1 - 1
api/internal/types/types.go

@@ -1,7 +1,7 @@
 // Code generated by goctl. DO NOT EDIT.
 package types
 
-type Resp struct {
+type BiResp struct {
 	Error_code int64       `json:"error_code"` //响应代码
 	Error_msg  string      `json:"error_msg"`  //响应消息
 	Data       interface{} `json:"data"`