|
@@ -3,25 +3,20 @@ package service
|
|
|
import (
|
|
|
"context"
|
|
|
"encoding/json"
|
|
|
+ "fmt"
|
|
|
"log"
|
|
|
"testing"
|
|
|
|
|
|
- "github.com/zeromicro/go-zero/zrpc"
|
|
|
-
|
|
|
. "app.yhyue.com/moapp/jybase/common"
|
|
|
- "app.yhyue.com/moapp/jybase/es"
|
|
|
- . "app.yhyue.com/moapp/jybase/mongodb"
|
|
|
- "app.yhyue.com/moapp/jybase/mysql"
|
|
|
. "bp.jydev.jianyu360.cn/CRM/application/api/common"
|
|
|
- "bp.jydev.jianyu360.cn/CRM/application/api/internal/config"
|
|
|
"bp.jydev.jianyu360.cn/CRM/application/api/internal/types"
|
|
|
"bp.jydev.jianyu360.cn/CRM/application/service"
|
|
|
- "bp.jydev.jianyu360.cn/CRM/baseCenter/rpc/basecenter"
|
|
|
)
|
|
|
|
|
|
//go test -test.run=TestAddCustomService -fs=../../etc/crmapplication.yaml -lf=../../etc/logs.yaml -df=../../etc/db.yaml -pf=../../etc/push.yaml
|
|
|
|
|
|
func TestAddOrUpdate(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
defer Catch()
|
|
|
res1 := Network.AddOrUpdate(&types.AddOrUpdateReq{
|
|
|
PositionId: 943,
|
|
@@ -68,6 +63,7 @@ func TestAddOrUpdate(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
func TestAssociate(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
//log.Println(NetworkCom.GetEntTagSeat(2))
|
|
|
//类型;firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 middleman_owner:中间人-业主 middleman_project:中间人-项目 agency:招标代理机构
|
|
|
//
|
|
@@ -81,6 +77,7 @@ func TestAssociate(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
func TestNetWorkList(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
//类型;firstparty:甲方 supplier:供应商 adiffb:同甲异业 middleman:中间人 agency:招标代理机构
|
|
|
res := Network.List(&types.NetWorkListReq{
|
|
|
EntAccountId: 64,
|
|
@@ -112,6 +109,7 @@ func TestNetWorkList(t *testing.T) {
|
|
|
}
|
|
|
}
|
|
|
func TestAllProject(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
res := Network.AllProject(&types.AllprojectReq{
|
|
|
EntAccountId: 64,
|
|
|
//PositionId: 935,
|
|
@@ -125,9 +123,10 @@ func TestAllProject(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
func TestOwner(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
ownerService := &OwnerService{
|
|
|
- Intermediary: "30154",
|
|
|
- PositionId: 935,
|
|
|
+ Intermediary: "30157",
|
|
|
+ PositionId: 1205591997,
|
|
|
PageIndex: 1,
|
|
|
PageSize: 100,
|
|
|
}
|
|
@@ -137,6 +136,7 @@ func TestOwner(t *testing.T) {
|
|
|
}
|
|
|
|
|
|
func TestAddCustomService(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
cs := &service.CustomService{
|
|
|
PositionId: 1205591997,
|
|
|
AppId: "10000",
|
|
@@ -156,3 +156,23 @@ func TestAddCustomService(t *testing.T) {
|
|
|
}
|
|
|
cs.Add(context.Background())
|
|
|
}
|
|
|
+func TestCandidateChannel(t *testing.T) {
|
|
|
+ InitConf()
|
|
|
+ ownerService := &OwnerService{
|
|
|
+ //PartyA: "",
|
|
|
+ //Supplier: req.Supplier,
|
|
|
+ Intermediary: "30154",
|
|
|
+ //Heterotophy: req.Heterotophy,
|
|
|
+ //Agency: req.Agency,
|
|
|
+ EntAccountId: 64,
|
|
|
+ PositionId: 935,
|
|
|
+ }
|
|
|
+ data, a1, a2, a3, a4 := ownerService.CandidateChannel()
|
|
|
+ for _, v := range data {
|
|
|
+ log.Println(fmt.Sprintf("%+v", v))
|
|
|
+ }
|
|
|
+ log.Println(a1)
|
|
|
+ log.Println(a2)
|
|
|
+ log.Println(a3)
|
|
|
+ log.Println(a4)
|
|
|
+}
|