liuxiaolong
2020-08-12 8849dda9c4fd92467e2c05c15ea483abae6af8e5
models/userClient.go
@@ -25,7 +25,7 @@
func (uc *UserClient) Exist(phoneNum string) bool {
   var list []UserClient
   o := orm.NewOrm()
   o.Raw("select * from ? where phoneNum=?", uc.TableName(), phoneNum).QueryRows(&list)
   o.QueryTable(uc.TableName()).Filter("phoneNum", phoneNum).All(&list)
   if len(list) >0 {
      return true
   }
@@ -35,7 +35,7 @@
func (uc *UserClient) ExistByCid(phoneNum string, cid string) bool {
   var list []UserClient
   o := orm.NewOrm()
   o.Raw("select * from ? where phoneNum=? and clientId=?", uc.TableName(), phoneNum, cid).QueryRows(&list)
   o.QueryTable(uc.TableName()).Filter("phoneNum", phoneNum).Filter("clientId", cid).All(&list)
   if len(list) >0 {
      return true
   }