|
@@ -50,13 +50,13 @@ func Address(r *GinRouter) {
|
|
|
// 更改默认地址的流程
|
|
|
if address.Defualt == 1 {
|
|
|
// 将已有的默认地址更改为非默认
|
|
|
- opt := repo.DocSearchOptions{
|
|
|
+ opt := repo.PageSearchOptions{
|
|
|
CollectName: repo.CollectionAddress,
|
|
|
Query: repo.Map{"userId": userId, "defualt": 1},
|
|
|
Project: []string{"_id"},
|
|
|
}
|
|
|
defs := make([]*model.Address, 0)
|
|
|
- repo.RepoSeachDoc(apictx.CreateRepoCtx(), &opt, &defs)
|
|
|
+ repo.RepoDocsSearch(apictx.CreateRepoCtx(), &opt, &defs)
|
|
|
if len(defs) > 0 {
|
|
|
for _, v := range defs {
|
|
|
// 设置为非默认
|