|
@@ -0,0 +1,46 @@
|
|
|
|
+package logic
|
|
|
|
+
|
|
|
|
+import (
|
|
|
|
+ "context"
|
|
|
|
+ "fmt"
|
|
|
|
+
|
|
|
|
+ "bp.jydev.jianyu360.cn/BaseService/resourceCenter/api/internal/svc"
|
|
|
|
+ "bp.jydev.jianyu360.cn/BaseService/resourceCenter/api/internal/types"
|
|
|
|
+ . "bp.jydev.jianyu360.cn/BaseService/resourceCenter/public/service"
|
|
|
|
+
|
|
|
|
+ "github.com/zeromicro/go-zero/core/logx"
|
|
|
|
+)
|
|
|
|
+
|
|
|
|
+type WaitEmpowerDetailLogic struct {
|
|
|
|
+ logx.Logger
|
|
|
|
+ ctx context.Context
|
|
|
|
+ svcCtx *svc.ServiceContext
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func NewWaitEmpowerDetailLogic(ctx context.Context, svcCtx *svc.ServiceContext) *WaitEmpowerDetailLogic {
|
|
|
|
+ return &WaitEmpowerDetailLogic{
|
|
|
|
+ Logger: logx.WithContext(ctx),
|
|
|
|
+ ctx: ctx,
|
|
|
|
+ svcCtx: svcCtx,
|
|
|
|
+ }
|
|
|
|
+}
|
|
|
|
+
|
|
|
|
+func (l *WaitEmpowerDetailLogic) WaitEmpowerDetail(req *types.Req) (resp *types.Reply, err error) {
|
|
|
|
+ resp = &types.Reply{}
|
|
|
|
+ if req.AppId == "" {
|
|
|
|
+ resp.Error_msg = "无效的参数appid"
|
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
|
+ return resp, nil
|
|
|
|
+ } else if req.Function_code == "" {
|
|
|
|
+ resp.Error_msg = "无效的参数function_code"
|
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
|
+ return resp, nil
|
|
|
|
+ } else if req.Ent_id == 0 {
|
|
|
|
+ resp.Error_msg = "无效的参数ent_id"
|
|
|
|
+ l.Error(fmt.Sprintf("%+v", req), resp.Error_msg)
|
|
|
|
+ return resp, nil
|
|
|
|
+ }
|
|
|
|
+ resp.Error_code = 0
|
|
|
|
+ resp.Data = WaitEmpowerDetail(req.AppId, req.Function_code, req.Ent_id)
|
|
|
|
+ return
|
|
|
|
+}
|