From 753bf77ae96e38e7b6067cd665e0b2fed5589389 Mon Sep 17 00:00:00 2001
From: kong <sunuping1@sina.com>
Date: 星期日, 12 四月 2026 15:44:52 +0800
Subject: [PATCH] pref 去掉错误代码

---
 xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCollectAddrServiceImpl.java |  162 +++++++++++++++++++++++++++---------------------------
 1 files changed, 81 insertions(+), 81 deletions(-)

diff --git a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCollectAddrServiceImpl.java b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCollectAddrServiceImpl.java
index d0b28b2..8040965 100644
--- a/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCollectAddrServiceImpl.java
+++ b/xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/service/impl/XpAppUserCollectAddrServiceImpl.java
@@ -1,81 +1,81 @@
-package com.xiaopeng.account.service.impl;
-
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
-import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
-import com.xiaopeng.account.mapper.XpAppUserCollectAddrMapper;
-import com.xiaopeng.account.model.dto.CollectAddrDTO;
-import com.xiaopeng.account.model.query.XpUserCollectAddrListQuery;
-import com.xiaopeng.account.model.vo.XpAppUserCollectAddrVO;
-import com.xiaopeng.account.service.IXpAppUserCollectAddrService;
-import com.xiaopeng.api.model.account.XpAppUserCollectAddr;
-import com.xiaopeng.common.core.exception.ServiceException;
-import com.xiaopeng.common.core.web.page.PageInfo;
-
-/**
- * <p>
- * 用户收藏地址 服务实现类
- * </p>
- *
- * @author ck
- * @since 2026-04-10
- */
-public class XpAppUserCollectAddrServiceImpl extends ServiceImpl<XpAppUserCollectAddrMapper, XpAppUserCollectAddr> implements IXpAppUserCollectAddrService {
-
-    /**
-     * 收藏地址
-     *
-     * @param dto
-     * @param uid
-     * @return
-     */
-    @Override
-    public Boolean collectAddr(CollectAddrDTO dto, String uid) {
-        if (dto.getType() == 1) {
-            Long count = this.count(new LambdaQueryWrapper<XpAppUserCollectAddr>()
-                    .eq(XpAppUserCollectAddr::getAppUserId, Long.parseLong(uid))
-                    .eq(XpAppUserCollectAddr::getDeleted, 0));
-            if (count >= 50) {
-                throw new ServiceException("收藏夹已满,请先删除旧地址");
-            }
-            Long old = this.count(new LambdaQueryWrapper<XpAppUserCollectAddr>()
-                    .eq(XpAppUserCollectAddr::getAppUserId, Long.parseLong(uid))
-                    .eq(XpAppUserCollectAddr::getDeleted, 0).eq(XpAppUserCollectAddr::getLongitude, dto.getLongitude())
-                    .eq(XpAppUserCollectAddr::getLatitude, dto.getLatitude()));
-            if (old > 0) {
-                return true;
-            }
-            XpAppUserCollectAddr xpAppUserCollectAddr = new XpAppUserCollectAddr();
-            xpAppUserCollectAddr.setAppUserId(Long.parseLong(uid));
-            xpAppUserCollectAddr.setLatitude(dto.getLatitude());
-            xpAppUserCollectAddr.setLongitude(dto.getLongitude());
-            return this.save(xpAppUserCollectAddr);
-        } else {
-            XpAppUserCollectAddr xpAppUserCollectAddr = this.getOne(new LambdaQueryWrapper<XpAppUserCollectAddr>()
-                    .eq(XpAppUserCollectAddr::getAppUserId, Long.parseLong(uid))
-                    .eq(XpAppUserCollectAddr::getDeleted, 0).eq(XpAppUserCollectAddr::getLongitude, dto.getLongitude())
-                    .eq(XpAppUserCollectAddr::getLatitude, dto.getLatitude()).last("limit 1"));
-
-            if (xpAppUserCollectAddr != null) {
-                return this.removeById(xpAppUserCollectAddr.getId());
-            }
-        }
-        return false;
-    }
-
-    /**
-     * 收藏地址列表
-     *
-     * @param uid
-     * @return
-     */
-    @Override
-    public PageInfo<XpAppUserCollectAddrVO> userCollectAddrList(XpUserCollectAddrListQuery query, String uid) {
-        Page<XpAppUserCollectAddrVO> page = new Page<>(query.getPageNum(), query.getPageSize());
-        Page<XpAppUserCollectAddrVO> pageData = this.baseMapper.userCollectAddrPageList(page, query, Long.parseLong(uid));
-        PageInfo<XpAppUserCollectAddrVO> resultPage = new PageInfo<>(query.getPageNum(), query.getPageSize());
-        resultPage.setTotal(pageData.getTotal());
-        resultPage.setRecords(pageData.getRecords());
-        return resultPage;
-    }
-}
+//package com.xiaopeng.account.service.impl;
+//
+//import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+//import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+//import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+//import com.xiaopeng.account.mapper.XpAppUserCollectAddrMapper;
+//import com.xiaopeng.account.model.dto.CollectAddrDTO;
+//import com.xiaopeng.account.model.query.XpUserCollectAddrListQuery;
+//import com.xiaopeng.account.model.vo.XpAppUserCollectAddrVO;
+//import com.xiaopeng.account.service.IXpAppUserCollectAddrService;
+//import com.xiaopeng.api.model.account.XpAppUserCollectAddr;
+//import com.xiaopeng.common.core.exception.ServiceException;
+//import com.xiaopeng.common.core.web.page.PageInfo;
+//
+///**
+// * <p>
+// * 用户收藏地址 服务实现类
+// * </p>
+// *
+// * @author ck
+// * @since 2026-04-10
+// */
+//public class XpAppUserCollectAddrServiceImpl extends ServiceImpl<XpAppUserCollectAddrMapper, XpAppUserCollectAddr> implements IXpAppUserCollectAddrService {
+//
+//    /**
+//     * 收藏地址
+//     *
+//     * @param dto
+//     * @param uid
+//     * @return
+//     */
+//    @Override
+//    public Boolean collectAddr(CollectAddrDTO dto, String uid) {
+//        if (dto.getType() == 1) {
+//            Long count = this.count(new LambdaQueryWrapper<XpAppUserCollectAddr>()
+//                    .eq(XpAppUserCollectAddr::getAppUserId, Long.parseLong(uid))
+//                    .eq(XpAppUserCollectAddr::getDeleted, 0));
+//            if (count >= 50) {
+//                throw new ServiceException("收藏夹已满,请先删除旧地址");
+//            }
+//            Long old = this.count(new LambdaQueryWrapper<XpAppUserCollectAddr>()
+//                    .eq(XpAppUserCollectAddr::getAppUserId, Long.parseLong(uid))
+//                    .eq(XpAppUserCollectAddr::getDeleted, 0).eq(XpAppUserCollectAddr::getLongitude, dto.getLongitude())
+//                    .eq(XpAppUserCollectAddr::getLatitude, dto.getLatitude()));
+//            if (old > 0) {
+//                return true;
+//            }
+//            XpAppUserCollectAddr xpAppUserCollectAddr = new XpAppUserCollectAddr();
+//            xpAppUserCollectAddr.setAppUserId(Long.parseLong(uid));
+//            xpAppUserCollectAddr.setLatitude(dto.getLatitude());
+//            xpAppUserCollectAddr.setLongitude(dto.getLongitude());
+//            return this.save(xpAppUserCollectAddr);
+//        } else {
+//            XpAppUserCollectAddr xpAppUserCollectAddr = this.getOne(new LambdaQueryWrapper<XpAppUserCollectAddr>()
+//                    .eq(XpAppUserCollectAddr::getAppUserId, Long.parseLong(uid))
+//                    .eq(XpAppUserCollectAddr::getDeleted, 0).eq(XpAppUserCollectAddr::getLongitude, dto.getLongitude())
+//                    .eq(XpAppUserCollectAddr::getLatitude, dto.getLatitude()).last("limit 1"));
+//
+//            if (xpAppUserCollectAddr != null) {
+//                return this.removeById(xpAppUserCollectAddr.getId());
+//            }
+//        }
+//        return false;
+//    }
+//
+//    /**
+//     * 收藏地址列表
+//     *
+//     * @param uid
+//     * @return
+//     */
+//    @Override
+//    public PageInfo<XpAppUserCollectAddrVO> userCollectAddrList(XpUserCollectAddrListQuery query, String uid) {
+//        Page<XpAppUserCollectAddrVO> page = new Page<>(query.getPageNum(), query.getPageSize());
+//        Page<XpAppUserCollectAddrVO> pageData = this.baseMapper.userCollectAddrPageList(page, query, Long.parseLong(uid));
+//        PageInfo<XpAppUserCollectAddrVO> resultPage = new PageInfo<>(query.getPageNum(), query.getPageSize());
+//        resultPage.setTotal(pageData.getTotal());
+//        resultPage.setRecords(pageData.getRecords());
+//        return resultPage;
+//    }
+//}

--
Gitblit v1.7.1