فهرست منبع

feat:初始化

wangchuanjin 9 ماه پیش
والد
کامیت
b8bda9a45d

+ 0 - 28
api/internal/handler/ignoreactionhandler.go

@@ -1,28 +0,0 @@
-package handler
-
-import (
-	"net/http"
-
-	"bp.jydev.jianyu360.cn/CRM/application/api/internal/logic"
-	"bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
-	"bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
-	"github.com/zeromicro/go-zero/rest/httpx"
-)
-
-func ignoreActionHandler(svcCtx *svc.ServiceContext) http.HandlerFunc {
-	return func(w http.ResponseWriter, r *http.Request) {
-		var req types.IgnoreReq
-		if err := httpx.Parse(r, &req); err != nil {
-			httpx.ErrorCtx(r.Context(), w, err)
-			return
-		}
-
-		l := logic.NewIgnoreActionLogic(r.Context(), svcCtx)
-		resp, err := l.IgnoreAction(&req)
-		if err != nil {
-			httpx.ErrorCtx(r.Context(), w, err)
-		} else {
-			httpx.OkJsonCtx(r.Context(), w, resp)
-		}
-	}
-}

+ 0 - 5
api/internal/handler/routes.go

@@ -52,11 +52,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 				Path:    "/networkManage/network/networkList",
 				Handler: networkListHandler(serverCtx),
 			},
-			{
-				Method:  http.MethodPost,
-				Path:    "/networkManage/ignore/action",
-				Handler: ignoreActionHandler(serverCtx),
-			},
 			{
 				Method:  http.MethodPost,
 				Path:    "/networkManage/infomation/detail",

+ 0 - 89
api/internal/logic/ignoreactionlogic.go

@@ -1,89 +0,0 @@
-package logic
-
-import (
-	"app.yhyue.com/moapp/jybase/date"
-	"app.yhyue.com/moapp/jypkg/ent/util"
-	T "bp.jydev.jianyu360.cn/CRM/application/api/common"
-	"context"
-	"fmt"
-	"time"
-
-	"bp.jydev.jianyu360.cn/CRM/application/api/internal/svc"
-	"bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type IgnoreActionLogic struct {
-	logx.Logger
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-}
-
-func NewIgnoreActionLogic(ctx context.Context, svcCtx *svc.ServiceContext) *IgnoreActionLogic {
-	return &IgnoreActionLogic{
-		Logger: logx.WithContext(ctx),
-		ctx:    ctx,
-		svcCtx: svcCtx,
-	}
-}
-
-func (l *IgnoreActionLogic) IgnoreAction(req *types.IgnoreReq) (resp *types.Reply, err error) {
-	logx.Info(fmt.Sprintf("%+v", req))
-	resp = &types.Reply{}
-	rid := ""
-	if req.Source == "2" {
-		rid = util.DecodeId(req.RelateId)
-	} else {
-		rid = req.RelateId
-	}
-	query := map[string]interface{}{
-		"position_id": req.PositionId,
-		"itype":       req.Source,
-		"relate_id":   rid,
-	}
-	info := T.CrmMysql.FindOne("connection_status", query, "id", "")
-	if info != nil && len(*info) > 0 {
-		update := map[string]interface{}{
-			"is_ignore": req.Action,
-		}
-		if req.Action == "1" {
-			update["is_handle"] = 0
-		}
-		b := T.CrmMysql.Update("connection_status", query, update)
-		if !b {
-			resp.Error_code = -1
-			resp.Error_msg = "状态更新失败"
-		} else {
-			resp.Error_msg = "更新成功"
-		}
-
-	} else {
-		if req.Action == "1" {
-			save := map[string]interface{}{
-				"position_id": req.PositionId,
-				"ent_id":      req.EntId,
-				"ent_dept_id": req.EntDeptId,
-				"ent_user_id": req.EntUserId,
-				"relate_id":   rid,
-				"itype":       req.Source,
-				"is_handle":   1,
-				"is_ignore":   req.Action,
-				"create_time": time.Now().Format(date.Date_Full_Layout),
-				"update_time": time.Now().Format(date.Date_Full_Layout),
-			}
-			i := T.CrmMysql.Insert("connection_status", save)
-			if i <= 0 {
-				resp.Error_code = -1
-				resp.Error_msg = "插入失败"
-			} else {
-				resp.Data = i
-				resp.Error_msg = "更新成功"
-			}
-		} else {
-			resp.Error_code = -1
-			resp.Error_msg = "未查询到收录信息"
-		}
-	}
-	return
-}

+ 0 - 10
api/internal/types/types.go

@@ -117,16 +117,6 @@ type NetWorkListReq struct {
 	Monitorcount_end   int64  `json:"monitorcount_end,optional"`
 }
 
-type IgnoreReq struct {
-	PositionId int64  `header:"positionId"`
-	EntUserId  int64  `header:"entUserId,optional"`
-	EntId      int64  `header:"entId,optional"`
-	EntDeptId  int64  `header:"entDeptId,optional"`
-	RelateId   string `json:"relateId,optional"`
-	Source     string `json:"source,optional"`
-	Action     string `json:"action,optional"`
-}
-
 type InfoDetailReq struct {
 	InfoId string `json:"infoId"`
 }

+ 0 - 13
api/networkmanage.api

@@ -108,15 +108,6 @@ type (
 		Monitorcount_start int64  `json:"monitorcount_start,optional"`
 		Monitorcount_end   int64  `json:"monitorcount_end,optional"`
 	}
-	IgnoreReq {
-		PositionId int64  `header:"positionId"`
-		EntUserId  int64  `header:"entUserId,optional"`
-		EntId      int64  `header:"entId,optional"`
-		EntDeptId  int64  `header:"entDeptId,optional"`
-		RelateId   string `json:"relateId,optional"`
-		Source     string `json:"source,optional"`
-		Action     string `json:"action,optional"`
-	}
 	InfoDetailReq {
 		InfoId string `json:"infoId"`
 	}
@@ -173,10 +164,6 @@ service networkManage {
 	@handler networkList
 	post /networkManage/network/networkList (NetWorkListReq) returns (Reply)
 	
-	@doc "忽略操作"
-	@handler ignoreAction
-	post /networkManage/ignore/action (IgnoreReq) returns (Reply)
-	
 	@doc "情报详情"
 	@handler infoDetail
 	post /networkManage/infomation/detail (InfoDetailReq) returns (Reply)