用户签约的4个类型场景
1平台/非独立域名签约
func (self *TestRpcSuite) Test121_ShopContractAdd() {
var req = new(pb.ShopContractAddRequest)
req.ShopId = 722618104607244289
req.ShopShortName = "TZM001之家"
req.UserId = 771655146484826113
req.UserName = "TZM001"
req.Lang = langconsts.LANG_CHINA
req.AgreementType = "1"
req.DomainName = "testcloud.ichub.com"
req.ContractTypeId = 30 ///req.AgreementShopId = apiconsts.GetAgreementShopId("business", -1)
id, err := shopContractComboService.Add(context.Background(), req)
golog.Info("Test123_ShopContractAdd id:", id, err)
var ret = apidaoes.FindBeanHubContractDao().FindShopContractKey(id)
ret.CheckRecord(id, "id="+gconv.String(id))
self.NoError(ret.Result2Error())
self.True(ret.ExistRecord())
self.True(ret.Data[0].ContractId > 0)
self.True(ret.Data[0].ShopId > 0)
self.Truef(ret.Data[0].UserId > 0, "userId>0")
}
2 独立域名签约
func (self *TestRpcSuite) Test122_ShopContractAdd() {
var req = new(pb.ShopContractAddRequest)
req.ShopId = 771655146970611713
req.ShopShortName = "TZM002之家"
req.UserId = 722618104607244289
req.UserName = "TZM002"
req.Lang = langconsts.LANG_CHINA
req.AgreementType = "1"
req.DomainName = "test.ic2yes.com"
req.ContractTypeId = 10
id, err := shopContractComboService.Add(context.Background(), req)
golog.Info("Test122_ShopContractAdd", id, err)
var ret = apidaoes.FindBeanHubContractDao().FindShopContractKey(id)
ret.CheckRecord(id, "id="+gconv.String(id))
self.NoError(ret.Result2Error())
self.True(ret.ExistRecord())
self.True(ret.Data[0].ContractId > 0)
self.True(ret.Data[0].ShopId > 0)
self.Truef(ret.Data[0].UserId > 0, "userId>0")
}
3 非用户签约(老功能)
func (self *TestRpcSuite) Test125_ShopContractAdd() {
var req = new(pb.ShopContractAddRequest)
req.ShopId = 722618104607244289
req.ShopShortName = "TZM001之家"
req.UserId = 771655146484826113
req.UserName = "TZM001"
req.Lang = langconsts.LANG_CHINA
req.AgreementType = "5"
req.DomainName = "testcloud.ichub.com"
req.ContractTypeId = 30 ///req.AgreementShopId = apiconsts.GetAgreementShopId("business", -1)
id, err := shopContractComboService.Add(context.Background(), req)
golog.Info("Test123_ShopContractAdd id:", id, err)
var ret = apidaoes.FindBeanHubContractDao().FindShopContractKey(id)
ret.CheckRecord(id, "id="+gconv.String(id))
self.NoError(ret.Result2Error())
self.True(ret.ExistRecord())
self.True(ret.Data[0].ContractId > 0)
self.True(ret.Data[0].ShopId > 0)
self.Truef(ret.Data[0].UserId > 0, "userId>0")
}
4 英文网站注册:
func (self *TestRpcSuite) Test124_ShopContractAddEnglish() {
var req = new(pb.ShopContractAddRequest)
req.ShopId = 771655146970611713
req.ShopShortName = "TZM001之家"
req.UserId = 722618104607244289
req.UserName = "TZM001"
req.Lang = langconsts.LANG_ENGLISH
req.AgreementType = "1"
req.DomainName = "www.hksdt.com"
req.ContractTypeId = 10
id, err := shopContractComboService.Add(context.Background(), req)
golog.Info("Test121_ShopContractAdd", id, err)
var ret = apidaoes.FindBeanHubContractDao().FindShopContractKey(id)
ret.CheckRecord(id, "id="+gconv.String(id))
self.NoError(ret.Result2Error())
self.True(ret.ExistRecord())
self.True(ret.Data[0].ContractId > 0)
self.True(ret.Data[0].ShopId > 0)
self.Truef(ret.Data[0].UserId > 0, "userId>0")
}
- 成交数 --
- 成交额 --
- 应答率