作者 陈志颖

合并分支 'dev' 到 'test'

Dev



查看合并请求 !64
# Config file for [Air](https://github.com/cosmtrek/air) in TOML format
# Working directory
# . or absolute path, please note that the directories following must be under root.
root = "."
tmp_dir = "tmp"
[build]
# Just plain old shell command. You could use `make` as well.
cmd = "go build -o ./tmp/main ."
# Binary file yields from `cmd`.
bin = "tmp/main"
# Customize binary.
full_bin = "APP_ENV=dev APP_USER=air ./tmp/main"
# Watch these filename extensions.
include_ext = ["go", "tpl", "tmpl", "html"]
# Ignore these filename extensions or directories.
exclude_dir = ["assets", "tmp", "vendor", "frontend/node_modules"]
# Watch these directories if you specified.
include_dir = []
# Exclude files.
exclude_file = []
# Exclude unchanged files.
exclude_unchanged = true
# This log file places in your tmp_dir.
log = "air.log"
# It's not necessary to trigger build each time file changes if it's too frequent.
delay = 1000 # ms
# Stop running old binary when build errors occur.
stop_on_error = true
# Send Interrupt signal before killing process (windows does not support this feature)
send_interrupt = false
# Delay after sending Interrupt signal
kill_delay = 500 # ms
[log]
# Show log time
time = false
[color]
# Customize each part's color. If no color found, use the raw app log.
main = "magenta"
watcher = "cyan"
build = "yellow"
runner = "green"
[misc]
# Delete tmp directory on exit
clean_on_exit = true
\ No newline at end of file
... ...
... ... @@ -25,3 +25,4 @@ opp
/vendor
/*.exe~
logs
tmp
\ No newline at end of file
... ...
... ... @@ -81,7 +81,7 @@ spec:
- name: ABILITY_SERVICE_HOST
value: "https://suplus-worth-app-gateway-dev.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "http://mmm-open-api-dev.fjmaimaimai.com"
value: "https://mmm-open-api-dev.fjmaimaimai.com"
- name: UCENTER_SERVICE_HOST
value: "https://suplus-ucenter-dev.fjmaimaimai.com"
- name: BUSINESS_ADMIN_SERVICE_HOST
... ...
... ... @@ -81,7 +81,7 @@ spec:
- name: ABILITY_SERVICE_HOST
value: "https://suplus-worth-app-gateway-dev.fjmaimaimai.com"
- name: MMM_OPEN_API_SERVICE_HOST
value: "http://mmm-open-api-dev.fjmaimaimai.com"
value: "https://mmm-open-api-dev.fjmaimaimai.com"
- name: UCENTER_SERVICE_HOST
value: "https://suplus-ucenter-test.fjmaimaimai.com"
- name: BUSINESS_ADMIN_SERVICE_HOST
... ...
... ... @@ -4,12 +4,24 @@ go 1.14
require (
github.com/Shopify/sarama v1.26.4
github.com/ajg/form v1.5.1 // indirect
github.com/astaxie/beego v1.12.1
github.com/dgrijalva/jwt-go v3.2.0+incompatible
github.com/gavv/httpexpect v2.0.0+incompatible
github.com/gin-gonic/gin v1.5.0
github.com/go-pg/pg/v10 v10.0.0-beta.2
github.com/imkira/go-interpol v1.1.0 // indirect
github.com/linmadan/egglib-go v0.0.0-20191217144343-ca4539f95bf9
github.com/moul/http2curl v1.0.0 // indirect
github.com/onsi/ginkgo v1.15.0
github.com/onsi/gomega v1.10.5
github.com/sergi/go-diff v1.1.0 // indirect
github.com/shiena/ansicolor v0.0.0-20151119151921-a422bbe96644 // indirect
github.com/shopspring/decimal v1.2.0
github.com/tiptok/gocomm v1.0.5
github.com/valyala/fasthttp v1.19.0 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0 // indirect
github.com/yudai/gojsondiff v1.0.0 // indirect
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82 // indirect
)
... ...
... ... @@ -302,7 +302,13 @@ func UCenterRevoke(header *protocol.RequestHeader, userId int64) (rsp *protocol.
return
}
// 企业平台-密码校验
/**
* @Author SteveChan
* @Description 企业平台-密码登录校验
* @Date 11:06 2021/2/5
* @Param
* @return
**/
func PasswordLogin(header *protocol.RequestHeader, request *protocol.LoginRequest) (v interface{}, err error) {
var (
transactionContext, _ = factory.CreateTransactionContext(nil)
... ... @@ -346,7 +352,7 @@ func PasswordLogin(header *protocol.RequestHeader, request *protocol.LoginReques
/**
* @Author SteveChan
* @Description // 企业平台-多公司登录,判断是否高管
* @Description //TODO 企业平台-多公司登录,判断是否高管,优化游客登录
* @Date 15:01 2021/1/12
* @Param
* @return
... ... @@ -369,19 +375,19 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom
rsp := &protocolx.CenterCompanysResponse{}
// 启动事务
if err = transactionContext.StartTransaction(); err != nil {
log.Error(err)
return nil, err
}
defer func() {
transactionContext.RollbackTransaction()
_ = transactionContext.RollbackTransaction()
}()
// 通过密码或校验码登录的普通用户或通过校验码登录的游客,注册一个账号到配置的公司去
//TODO 通过密码或校验码登录的普通用户或通过校验码登录的游客,注册一个账号到配置的公司去
if request.GrantType == protocol.LoginBySmsCode || request.GrantType == protocol.LoginByPassword {
userErr := loginSvr.RegistryGuest(request.Phone)
//userErr := loginSvr.OperateGuest(request.Phone)
if userErr != nil {
log.Error(userErr)
}
... ... @@ -490,7 +496,7 @@ func CompaniesLogin(header *protocol.RequestHeader, request *protocolx.CenterCom
/**
* @Author SteveChan
* @Description // 企业平台-多公司登录 - 通过凭证,判断是否高管
* @Description //TODO 企业平台-多公司登录 - 通过凭证,判断是否高管
* @Date 15:00 2021/1/12
* @Param
* @return
... ... @@ -555,7 +561,7 @@ func CompaniesLoginByCredential(header *protocol.RequestHeader, request *protoco
/**
* @Author SteveChan
* @Description //TODO 登录
* @Description 登录
* @Date 15:05 2021/1/15
* @Param
* @return
... ... @@ -575,7 +581,7 @@ func LoginV2(header *protocol.RequestHeader, request *protocol.LoginRequestV2) (
return nil, err
}
defer func() {
transactionContext.RollbackTransaction()
_ = transactionContext.RollbackTransaction()
}()
if claim, err = utils.ParseJWTToken(request.Credentials); err != nil {
err = protocol.NewErrWithMessage(4140, err)
... ...
... ... @@ -66,6 +66,7 @@ func Statistics(header *protocol.RequestHeader, request *protocol.DividendStatis
//if request.EndTime > last.Unix()*1000 {
// request.EndTime = last.Unix() * 1000
//}
fmt.Print("StartTime: ", request.StartTime, "\n")
fmt.Print("EndTime: ", request.EndTime, "\n")
... ...
... ... @@ -15,7 +15,7 @@ var MMM_SMS_SERVICE_HOST = "https://sms.fjmaimaimai.com:9897"
var UCENTER_SERVICE_HOST = "https://suplus-ucenter-test.fjmaimaimai.com"
var UCENTER_APP_KEY = "0c2c2a23dfc64ae230f5c54ab243ab52"
var BUSINESS_ADMIN_SERVICE_HOST = "http://suplus-business-admin-test.fjmaimaimai.com"
var BUSINESS_ADMIN_SERVICE_HOST = "https://suplus-business-admin-test.fjmaimaimai.com"
var BUSINESS_ADMIN_PLATFORM_ID = "25" //合伙人模块
var DEFAULT_GUEST_COMPANY int = 358
... ...
... ... @@ -48,20 +48,23 @@ func (svr *PgLoginService) Init(phone string) (err error) {
_, svr.NormalPartnerInfo, err = PartnerInfoService.Find(map[string]interface{}{"account": phone, "sortByCreateTime": "ASC"})
// 所有公司有效合伙人
_, svr.PartnerInfo, err = PartnerInfoService.Find(map[string]interface{}{"account": phone, "status": 1, "sortByCreateTime": "ASC"})
// 真实公司有效合伙人
_, svr.IsPartnerInfo, err = PartnerInfoService.Find(map[string]interface{}{"account": phone, "status": 1, "sortByCreateTime": "ASC", "isNot": constant.DEFAULT_GUEST_COMPANY})
// 游客公司合伙人
_, svr.GuestPartnerInfo, err = PartnerInfoService.Find(map[string]interface{}{"account": phone, "sortByCreateTime": "ASC", "companyId": constant.DEFAULT_GUEST_COMPANY})
// 游客公司有效合伙人
_, svr.GuestPartnerInfoAvailable, err = PartnerInfoService.Find(map[string]interface{}{"account": phone, "status": 1, "sortByCreateTime": "ASC", "companyId": constant.DEFAULT_GUEST_COMPANY})
// 所有公司用户
// 所有公司非删除用户
_, svr.NormalUsers, err = UsersRepository.Find(map[string]interface{}{"phone": phone, "sortByCreateTime": "ASC", "deleteAtIsNull": true})
// 所有公司有效用户
// 所有公司非删除非禁用用户
_, svr.Users, err = UsersRepository.Find(map[string]interface{}{"phone": phone, "status": 1, "sortByCreateTime": "ASC", "deleteAtIsNull": true})
// 所有公司有效高管
_, svr.IsSenior, err = UsersRepository.Find(map[string]interface{}{"phone": phone, "status": 1, "sortByCreateTime": "ASC", "deleteAtIsNull": true, "isSenior": 1})
// 真实公司有效高管
// 真实公司非禁用非删除高管
_, svr.IsRealSenior, err = UsersRepository.Find(map[string]interface{}{"phone": phone, "status": 1, "sortByCreateTime": "ASC", "deleteAtIsNull": true, "isSenior": 1, "isNot": constant.DEFAULT_GUEST_COMPANY})
return nil
... ... @@ -576,8 +579,8 @@ func (svr *PgLoginService) RegistryUser(phone string) error {
CooperateTime: time.Now(),
CreateAt: time.Now(),
UpdateAt: time.Now(),
PartnerCategoryInfos: []*models.PartnerCategoryInfo{&models.PartnerCategoryInfo{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{&domain.Salesman{Name: phone, Telephone: phone}},
PartnerCategoryInfos: []*domain.PartnerCategoryInfo{{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{{Name: phone, Telephone: phone}},
})
}
... ... @@ -600,14 +603,74 @@ func (svr *PgLoginService) RegistryUser(phone string) error {
CooperateTime: time.Now(),
CreateAt: time.Now(),
UpdateAt: time.Now(),
PartnerCategoryInfos: []*models.PartnerCategoryInfo{&models.PartnerCategoryInfo{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{&domain.Salesman{Name: phone, Telephone: phone}},
PartnerCategoryInfos: []*domain.PartnerCategoryInfo{{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{{Name: phone, Telephone: phone}},
})
}
return errPartner
}
/**
* @Author SteveChan
* @Description //TODO 操作游客
* @Date 15:20 2021/2/7
* @Param
* @return
**/
func (svr *PgLoginService) OperateGuest(phone string) error {
var (
PartnerInfoService, _ = repository.NewPartnerInfoRepository(svr.transactionContext)
UsersRepository, _ = repository.NewUsersRepository(svr.transactionContext)
)
// 真实公司检索合伙人身份(账号未禁用)
partnerInfo, errPartner := PartnerInfoService.FindOne(map[string]interface{}{"account": phone, "status": 1, "isNot": constant.DEFAULT_GUEST_COMPANY})
// 真实公司检索用户身份(账号未删除且是高管)
user, errUser := UsersRepository.FindOne(map[string]interface{}{"phone": phone, "isSenior": 1, "deleteAtIsNull": true, "isNot": constant.DEFAULT_GUEST_COMPANY})
// 存在合伙人或者用户身份,不进行游客注册操作
if partnerInfo != nil || user != nil {
return nil
}
if errUser != nil && errPartner != nil { // 合伙人身份和用户身份均不存在,注册游客合伙人
id := time.Now().Unix()
_, errInsert := svr.transactionContext.PgDd.Model(models.PartnerInfo{
Id: id,
CompanyId: int64(constant.DEFAULT_GUEST_COMPANY),
PartnerName: phone,
Account: phone,
Password: "7c4a8d09ca3762af61e59520943dc26494f8941b",
Status: 1,
PartnerCategory: 1,
RegionInfo: &domain.RegionInfo{
RegionName: "客户区域",
RegionId: 0,
},
CooperateTime: time.Now(),
CreateAt: time.Now(),
UpdateAt: time.Now(),
PartnerCategoryInfos: []*domain.PartnerCategoryInfo{{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{{Name: phone, Telephone: phone}},
}).Insert()
if errInsert != nil {
return errInsert
}
} else { // 真实公司存在合伙人或者高管用户,删除游客合伙人
_, errDelete := svr.transactionContext.PgDd.Model((*models.PartnerInfo)(nil)).
Where("account = ?", phone).
Where("company_id = ?", constant.DEFAULT_GUEST_COMPANY).
Delete()
if errDelete != nil {
return errDelete
}
}
return nil
}
// 注册游客到指定的公司
func (svr *PgLoginService) RegistryGuest(phone string) error {
var (
... ... @@ -622,6 +685,7 @@ func (svr *PgLoginService) RegistryGuest(phone string) error {
return nil
}
// 注册用户
if errUser != nil && errPartner != nil {
id := time.Now().Unix()
errPartner = svr.transactionContext.PgDd.Insert(&models.PartnerInfo{
... ... @@ -639,11 +703,13 @@ func (svr *PgLoginService) RegistryGuest(phone string) error {
CooperateTime: time.Now(),
CreateAt: time.Now(),
UpdateAt: time.Now(),
PartnerCategoryInfos: []*models.PartnerCategoryInfo{&models.PartnerCategoryInfo{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{&domain.Salesman{Name: phone, Telephone: phone}},
PartnerCategoryInfos: []*domain.PartnerCategoryInfo{{Id: 1, Code: phone}},
Salesman: []*domain.Salesman{{Name: phone, Telephone: phone}},
})
}
// 删除用户
return errPartner
}
... ...
... ... @@ -44,20 +44,52 @@ func (s *PgPartnerAuthService) ChangeUserPhone(userId int64, newPhone, oldPhone
}
return
}
/**
* @Author SteveChan
* @Description 密码校验增加多公司
* @Date 11:52 2021/2/7
* @Param
* @return
**/
func (s *PgPartnerAuthService) ChangeUserPassword(userId int64, newPwd, oldPwd, phone string) (err error) {
var (
partnerInfo *domain.PartnerInfo
//partnerInfo *domain.PartnerInfo
partnerInfos []*domain.PartnerInfo
PartnerInfoDao, _ = dao.NewPartnerInfoDao(s.transactionContext)
PartnerInfoService, _ = repository.NewPartnerInfoRepository(s.transactionContext)
)
if partnerInfo, err = PartnerInfoService.FindOne(map[string]interface{}{"account": phone}); err != nil {
// 查询账号信息
if _, partnerInfos, err = PartnerInfoService.Find(map[string]interface{}{"account": phone}); err != nil {
err = errUserNotFound //账号不存在
return
}
if !strings.EqualFold(partnerInfo.Password, oldPwd) {
//多公司密码校验
var misMatch bool
for _, partnerInfo := range partnerInfos {
if !strings.EqualFold(partnerInfo.Password, oldPwd) {
misMatch = true
} else {
misMatch = false
break
}
}
if misMatch {
err = fmt.Errorf("旧密码不正确") //账号不存在
return
}
//if partnerInfo, err = PartnerInfoService.FindOne(map[string]interface{}{"account": phone}); err != nil {
// err = errUserNotFound //账号不存在
// return
//}
//if !strings.EqualFold(partnerInfo.Password, oldPwd) {
// err = fmt.Errorf("旧密码不正确") //账号不存在
// return
//}
if err = PartnerInfoDao.Update(map[string]interface{}{
"oldAccount": phone,
"Password": newPwd,
... ...
... ... @@ -33,7 +33,7 @@ type PartnerInfo struct {
//关联业务员
Salesman []*domain.Salesman
//合伙人分类信息
PartnerCategoryInfos []*PartnerCategoryInfo
PartnerCategoryInfos []*domain.PartnerCategoryInfo
//备注
Remark string
}
... ...
... ... @@ -56,6 +56,7 @@ func (repository *UsersRepository) FindOne(queryOptions map[string]interface{})
query.SetWhere("company_id = ?", "companyId")
query.SetWhere(`delete_at is null`, "deleteAtIsNull")
query.SetWhere("is_senior = ?", "isSenior")
query.SetWhere("company_id <> ?", "isNot")
if err := query.First(); err != nil {
return nil, fmt.Errorf("query row not found")
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego APPSVR Auth Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
import (
"github.com/gavv/httpexpect"
"github.com/go-pg/pg/v10"
. "github.com/onsi/ginkgo"
. "github.com/onsi/gomega"
pG "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
"net/http"
)
var _ = Describe("返回员工", func() {
var employeeId int64
BeforeEach(func() {
_, err := pG.DB.QueryOne(
pg.Scan(&employeeId),
"INSERT INTO partner (id, company_id, uid, employee_name, employee_account, employee_avatar_url, su_money, status, permissions) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?) RETURNING id",
1, 101, 2499036607974745088, "employee_name", "employee_account", "employee_avatar_url", 1000.00, 1, pg.Array([]int{1, 3}))
Expect(err).NotTo(HaveOccurred())
})
Describe("根据employeeId参数返回员工", func() {
Context("传入有效的employeeId", func() {
It("返回员工数据", func() {
httpExpect := httpexpect.New(GinkgoT(), server.URL)
httpExpect.GET("/employees/2499036607974745088").
Expect().
Status(http.StatusOK).
JSON().
Object().
ContainsKey("code").ValueEqual("code", 0).
ContainsKey("msg").ValueEqual("msg", "ok").
ContainsKey("data").Value("data").Object()
})
})
})
AfterEach(func() {
_, err := pG.DB.Exec("DELETE FROM employees WHERE true")
Expect(err).NotTo(HaveOccurred())
})
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package auth
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package company
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Company Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package dividend
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Dividend Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package order
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Order Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package partner
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port Partner Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...
/**
@author: stevechan
@date: 2021/2/7
@note:
**/
package user
import (
"github.com/astaxie/beego"
"github.com/onsi/ginkgo"
"github.com/onsi/gomega"
"net/http"
"net/http/httptest"
"testing"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/infrastructure/pg"
_ "gitlab.fjmaimaimai.com/mmm-go/partner/pkg/port/appsvr"
)
func TestConfig(t *testing.T) {
gomega.RegisterFailHandler(ginkgo.Fail)
ginkgo.RunSpecs(t, "Beego Port User Correlations Test Case Suite")
}
var handler http.Handler
var server *httptest.Server
var _ = ginkgo.BeforeSuite(func() {
handler = beego.BeeApp.Handlers
server = httptest.NewServer(handler)
})
var _ = ginkgo.AfterSuite(func() {
server.Close()
})
... ...