فهرست منبع

fix:删除多余配置

duxin 3 سال پیش
والد
کامیت
3a4994e68f
3فایلهای تغییر یافته به همراه0 افزوده شده و 48 حذف شده
  1. 0 8
      etc/config.yaml
  2. 0 16
      handler/activity/lotteryService.go
  3. 0 24
      rpc/integral.go

+ 0 - 8
etc/config.yaml

@@ -12,14 +12,6 @@ etcd:
       address:
         - 192.168.3.206:2379
 
-    # 销售服务
-    activeServer:
-      # 销售中台配置
-      integral:
-        key: activity.rpc
-        address:
-          - 192.168.3.206:2379
-
 #消息队列
 nsq:
   topic: jy_event

+ 0 - 16
handler/activity/lotteryService.go

@@ -38,22 +38,6 @@ func ActivityLottery(userId, receivingLocation string) (map[string]interface{},
 	return info, err
 }
 
-//ActivityUser
-/*func ActivityUser(userId string, model int64) []*activityclient.LotteryJson {
-	appId := gcfg.Instance().MustGet(gctx.New(), "appid").String()
-	//参数结构体
-	activeReq := activityclient.Request{
-		ReceivingLocation: 0,
-		Model:             model,
-		UserId:            userId,
-		AppId:             appId,
-	}
-	//调用卡卷中台rpc  查询此用户下的卡卷信息
-	rpc.UserHarvest = &rpc.UserLottery{}
-	resp := rpc.UserHarvest.HarvestFunc(activeReq)
-	return resp.Data
-}*/
-
 //LotteryReceive 奖卷领取 LotteryIdArr 奖券id 支持多个逗号拼接
 func LotteryReceive(lotteryRep config.LotteryReceiveReq) (int, string) {
 	appId := gcfg.Instance().MustGet(gctx.New(), "appid").String()

+ 0 - 24
rpc/integral.go

@@ -1,12 +1,10 @@
 package rpc
 
 import (
-	"app.yhyue.com/moapp/jyMarketing/rpc/activityclient"
 	"app.yhyue.com/moapp/jyPoints/rpc/integral"
 	"app.yhyue.com/moapp/jyPoints/rpc/integralclient"
 	"app.yhyue.com/moapp/jybase/date"
 	"app.yhyue.com/moapp/jybase/go-logger/logger"
-	"context"
 	"fmt"
 	"github.com/gogf/gf/v2/os/gcfg"
 	"github.com/gogf/gf/v2/os/gctx"
@@ -17,7 +15,6 @@ import (
 )
 
 var zrpcClient zrpc.Client
-var activeLib activityclient.Activity
 
 func init() {
 	var err error
@@ -30,15 +27,6 @@ func init() {
 	if err != nil {
 		log.Fatalln(err)
 	}
-
-	client := zrpc.MustNewClient(zrpc.RpcClientConf{
-		Etcd: discov.EtcdConf{
-			Hosts: gcfg.Instance().MustGet(gctx.New(), "etcd.activeServer.integral.address", nil).Strings(),
-			Key:   gcfg.Instance().MustGet(gctx.New(), "etcd.activeServer.integral.key", nil).String(),
-		},
-	})
-	// defer client.Conn().Close()
-	activeLib = activityclient.NewActivity(client)
 }
 
 // IntegralHarvest 积分奖励发放
@@ -63,15 +51,3 @@ func IntegralHarvest(userId string, pNum, pType, dateStamp int64) error {
 		return fmt.Errorf(fmt.Sprintf("%+v", req), "增加", pNum, "积分失败", "Code", resp.Code, "Message", resp.Message)
 	}
 }
-
-type UserLottery struct{}
-
-var UserHarvest *UserLottery
-
-func (this *UserLottery) HarvestFunc(activeReq activityclient.Request) (resp activityclient.ActivityLotteryResp) {
-	_resp, err := activeLib.UserLottery(context.Background(), &activeReq)
-	if err != nil {
-		log.Println("UserHarvest error:", err)
-	}
-	return *_resp
-}