Esempio n. 1
0
 def updateCustomer(self,custid,cellPhone="",dispName="",type="PERSON",exinfo={},tags=[],requirements=[]):
     CustomerHandler.saveCustomer(owner = self.owner,
                                 custid = custid, 
                                 cellPhone = cellPhone, 
                                 dispName = dispName , 
                                 type = type, 
                                 exinfo = exinfo, 
                                 tags = tags, 
                                 requirements = requirements)
Esempio n. 2
0
 def testUpdateOthersCustomer(self):
     obj = Customer.saveCustomer("uid1",'55b9dd82cb5f8f2600f06b54',"cellPhone", "legalName", "type", exinfo=dict(exinfo=3), tags=["buyer"], requirements=[1,2])
     print obj
     self.assertTrue(True, "更新其他人的客户资料测试成功")
Esempio n. 3
0
 def testNewCustomer(self):
     obj = Customer.saveCustomer("uid",None, "cellPhone", "legalName", "type", exinfo=dict(exinfo=1), tags=["buyer"], requirements=[1,2])
     print obj
     self.assertTrue(True, "创建客户资料测试成功")
Esempio n. 4
0
 def count(self,*kinds):
     return CustomerHandler.count(self.owner, {"kinds":{"$IN":kinds}})
Esempio n. 5
0
 def save(self,reqid=None,**reqinfo):
     CustomerHandler.saveRequirement(owner=self.__owner__, custid=self.__custid__,reqid=reqid,reqinfo=reqinfo)
Esempio n. 6
0
 def __init__(self,owner,custid,):
     ItemsCollection.__init__(self, CustomerHandler.queryRequirement(owner=owner, custid=custid), adapterClass=RequirementAdapter)
     self.__custid__=custid
     self.__owner__=owner