更新测试文档及初始数据的错误,修复in条件查询, gormv2取消()的占位符,更新模板文件的()占位符

This commit is contained in:
SliverHorn
2020-08-26 13:46:03 +08:00
parent 40e2344629
commit aab91dec6c
5 changed files with 99 additions and 53 deletions
+2 -2
View File
@@ -70,11 +70,11 @@ func GetCustomerInfoList(sysUserAuthorityID string, info request.PageInfo) (err
dataId = append(dataId, v.AuthorityId)
}
var CustomerList []model.ExaCustomer
err = db.Where("sys_user_authority_id in (?)", dataId).Count(&total).Error
err = db.Where("sys_user_authority_id in ?", dataId).Count(&total).Error
if err != nil {
return err, CustomerList, total
} else {
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in (?)", dataId).Find(&CustomerList).Error
err = db.Limit(limit).Offset(offset).Preload("SysUser").Where("sys_user_authority_id in ?", dataId).Find(&CustomerList).Error
}
return err, CustomerList, total
}