xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/operation/XpAppVersion.java
@@ -38,4 +38,10 @@ @ApiModelProperty(value = "更新说明") private String updateDescription; @ApiModelProperty(value = "是否强制更新 0-否 1-是") private Integer forceUpdateFlag; @ApiModelProperty(value = "版本号 判断是否需要升级") private Integer versionCode; } xp-robotaxi-api/src/main/java/com/xiaopeng/api/model/operation/XpFeedbackType.java
@@ -13,6 +13,8 @@ import lombok.EqualsAndHashCode; import lombok.experimental.Accessors; import javax.validation.constraints.NotBlank; /** * <p> * 意见反馈类型表 @@ -35,6 +37,7 @@ private Long id; @ApiModelProperty(value = "反馈类型") @NotBlank(message = "反馈类型不能为空") private String feedbackType; } xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpClockInServiceImpl.java
@@ -165,12 +165,12 @@ LocalDateTime startTime = LocalDateTime.of(LocalDate.now(), LocalTime.MIN); // 00:00:00 LocalDateTime endTime = LocalDateTime.of(LocalDate.now(), LocalTime.MAX); // 23:59:59 // 3. 查询当天打卡记录 // 2. 查询当天打卡记录 List<XpClockIn> records = baseMapper.selectTodayClockInRecords( appUserId, startTime, endTime ); // 4. 判断上班状态 // 3. 判断上班状态 if (records == null || records.isEmpty()) { // 无打卡记录 = 未上班 log.debug("用户 {} 今日无打卡记录, workFlag=false", appUserId); xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpAppVersionController.java
@@ -1,14 +1,16 @@ package com.xiaopeng.operation.controller; import com.xiaopeng.api.model.operation.XpAppVersion; import com.xiaopeng.common.core.domain.R; import com.xiaopeng.common.core.web.page.BasePage; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.service.IXpAppVersionService; import com.xiaopeng.operation.vo.XpAppVersionVO; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.context.annotation.Lazy; import org.springframework.web.bind.annotation.*; /** * App版本管理 Controller @@ -18,15 +20,10 @@ */ @Slf4j @RestController @RequestMapping("") @Api(tags = "App版本管理") @RequiredArgsConstructor(onConstructor_ = @Lazy) public class XpAppVersionController { private final IXpAppVersionService appVersionService; public XpAppVersionController(IXpAppVersionService appVersionService) { this.appVersionService = appVersionService; } /** * 获取App最新版本(运维APP接口) @@ -38,4 +35,17 @@ XpAppVersionVO vo = appVersionService.getLatestVersion(); return R.ok(vo); } @ApiOperation(value = "获取版本管理分页列表", tags = "管理后台-APP版本") @PostMapping("/api/v1/appVersion/page") public R<PageInfo<XpAppVersion>> getPageList(@RequestBody BasePage basePage) { return R.ok(appVersionService.getPageList(basePage)); } @ApiOperation(value = "发布APP版本", tags = "管理后台-APP版本") @PostMapping("/api/v1/appVersion/release") public R<?> release(@RequestBody XpAppVersion appVersion) { appVersionService.release(appVersion); return R.ok(); } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpFeedbackTypeController.java
@@ -3,17 +3,18 @@ import com.xiaopeng.api.model.operation.XpFeedbackType; import com.xiaopeng.common.core.domain.R; import com.xiaopeng.common.core.web.page.BasePage; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.service.IXpFeedbackTypeService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import io.swagger.v3.oas.annotations.Operation; import lombok.extern.slf4j.Slf4j; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.*; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.RestController; import javax.validation.Valid; import java.util.List; /** @@ -27,8 +28,6 @@ @Slf4j @RestController @RequestMapping("/base/v1/mini-program") @Api(tags = "意见反馈类型") public class XpFeedbackTypeController { @@ -37,20 +36,41 @@ public XpFeedbackTypeController(IXpFeedbackTypeService xpFeedbackTypeService) { this.xpFeedbackTypeService = xpFeedbackTypeService; } /** * 获取反馈类型 * * @return */ @GetMapping("/getFeedbackTypeById/{id}") public R<XpFeedbackType> getFeedbackTypeById(@PathVariable("id")Long id){ @GetMapping("/base/v1/mini-program/getFeedbackTypeById/{id}") public R<XpFeedbackType> getFeedbackTypeById(@PathVariable("id") Long id) { return R.ok(xpFeedbackTypeService.getById(id)); } @GetMapping("/feedback-type/getList") @ApiOperation(value = "获取意见反馈类型列表",tags = {"意见反馈类型列表"},response = XpFeedbackType.class) @GetMapping("/base/v1/mini-program/feedback-type/getList") @ApiOperation(value = "获取意见反馈类型列表", tags = {"意见反馈类型列表"}, response = XpFeedbackType.class) public R<List<XpFeedbackType>> getList() { List<XpFeedbackType> list = xpFeedbackTypeService.list(); return R.ok(list); } @ApiOperation(value = "获取意见反馈类型分页列表", tags = {"管理后台-服务中心"}, response = XpFeedbackType.class) @PostMapping("/api/v1/feedbackType/pageList") public R<PageInfo<XpFeedbackType>> getPageList(@RequestBody BasePage basePage) { return R.ok(xpFeedbackTypeService.getPageList(basePage)); } @ApiOperation(value = "新增、编辑意见反馈类型", tags = {"管理后台-服务中心"}) @PostMapping("/api/v1/feedbackType/saveOrUpdate") public R<?> saveOrUpdate(@RequestBody @Valid XpFeedbackType xpFeedbackType) { xpFeedbackTypeService.saveOrUpdate(xpFeedbackType); return R.ok(); } @ApiOperation(value = "删除意见反馈类型", tags = {"管理后台-服务中心"}) @DeleteMapping("/api/v1/feedbackType/delete/{id}") public R<?> delete(@PathVariable Long id) { xpFeedbackTypeService.removeById(id); return R.ok(); } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpUserFeedbackController.java
@@ -3,8 +3,11 @@ import com.xiaopeng.api.model.operation.XpUserFeedback; import com.xiaopeng.common.core.domain.R; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.dto.XpUserFeedbackDto; import com.xiaopeng.operation.query.UserFeedBackQuery; import com.xiaopeng.operation.service.IXpUserFeedbackService; import com.xiaopeng.operation.vo.XpUserFeedbackVO; import com.xiaopeng.unifiedverification.interceptor.XpClientCheck; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; @@ -55,4 +58,9 @@ return R.ok(); } @ApiOperation(value = "获取意见反馈分页列表", tags = {"管理后台-服务中心"}) @PostMapping(value = "/api/v1/userFeedBack/pageList") public R<PageInfo<XpUserFeedbackVO>> getPageList(@RequestBody UserFeedBackQuery query) { return R.ok(xpUserFeedbackService.getPageList(query)); } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/query/UserFeedBackQuery.java
New file @@ -0,0 +1,21 @@ package com.xiaopeng.operation.query; import com.xiaopeng.common.core.web.page.BasePage; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; /** * @author MiTao * @date 2026-02-26 14:32 * */ @Data @EqualsAndHashCode(callSuper = true) @ApiModel(value = "用户反馈分页查询对象") public class UserFeedBackQuery extends BasePage { @ApiModelProperty(value = "反馈内容") private String feedbackContent; } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/IXpAppVersionService.java
@@ -2,6 +2,8 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.xiaopeng.api.model.operation.XpAppVersion; import com.xiaopeng.common.core.web.page.BasePage; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.vo.XpAppVersionVO; /** @@ -17,4 +19,17 @@ * @return 最新版本信息 */ XpAppVersionVO getLatestVersion(); /** * 获取版本管理分页列表 * @param basePage * @return */ PageInfo<XpAppVersion> getPageList(BasePage basePage); /** * 新增APP版本 * @param appVersion */ void release(XpAppVersion appVersion); } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/IXpFeedbackTypeService.java
@@ -2,6 +2,8 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.xiaopeng.api.model.operation.XpFeedbackType; import com.xiaopeng.common.core.web.page.BasePage; import com.xiaopeng.common.core.web.page.PageInfo; /** * <p> @@ -13,4 +15,5 @@ */ public interface IXpFeedbackTypeService extends IService<XpFeedbackType> { PageInfo<XpFeedbackType> getPageList(BasePage basePage); } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/IXpUserFeedbackService.java
@@ -2,6 +2,9 @@ import com.baomidou.mybatisplus.extension.service.IService; import com.xiaopeng.api.model.operation.XpUserFeedback; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.query.UserFeedBackQuery; import com.xiaopeng.operation.vo.XpUserFeedbackVO; /** * <p> @@ -12,5 +15,10 @@ * @since 2026-02-03 */ public interface IXpUserFeedbackService extends IService<XpUserFeedback> { /** * 获取意见反馈分页列表 * @param query * @return */ PageInfo<XpUserFeedbackVO> getPageList(UserFeedBackQuery query); } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpAppVersionServiceImpl.java
@@ -1,9 +1,13 @@ package com.xiaopeng.operation.service.impl; import cn.hutool.core.bean.BeanUtil; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.xiaopeng.api.model.operation.XpAppVersion; import com.xiaopeng.common.core.exception.ServiceException; import com.xiaopeng.common.core.web.page.BasePage; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.common.security.utils.SecurityUtils; import com.xiaopeng.operation.mapper.XpAppVersionMapper; import com.xiaopeng.operation.service.IXpAppVersionService; import com.xiaopeng.operation.vo.XpAppVersionVO; @@ -26,7 +30,7 @@ public XpAppVersionVO getLatestVersion() { // 查询最新版本(按ID倒序,取第一条) XpAppVersion latestVersion = this.lambdaQuery() .orderByDesc(XpAppVersion::getId) .orderByDesc(XpAppVersion::getVersionCode) .last("LIMIT 1") .one(); @@ -40,4 +44,29 @@ log.info("获取最新App版本成功, version={}", vo.getVersion()); return vo; } @Override public PageInfo<XpAppVersion> getPageList(BasePage basePage) { Page<XpAppVersion> page = lambdaQuery().orderByDesc(XpAppVersion::getVersionCode).page(new Page<>(basePage.getPageNum(), basePage.getPageSize())); PageInfo<XpAppVersion> pageInfo = new PageInfo<>(); BeanUtil.copyProperties(page, pageInfo); return pageInfo; } @Override public void release(XpAppVersion appVersion) { Integer latestVersionCode = 0; //获取最新版本信息 XpAppVersion latestVersion = this.lambdaQuery() .orderByDesc(XpAppVersion::getVersionCode) .last("LIMIT 1") .one(); if (Objects.nonNull(latestVersion)) { latestVersionCode = latestVersion.getVersionCode(); } appVersion.setCreateBy(SecurityUtils.getLoginUser().getSysUser().getNickName()); appVersion.setVersionCode(latestVersionCode + 1); // 版本号自增 save(appVersion); } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpFeedbackTypeServiceImpl.java
@@ -1,6 +1,9 @@ package com.xiaopeng.operation.service.impl; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.xiaopeng.api.model.operation.XpFeedbackType; import com.xiaopeng.common.core.web.page.BasePage; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.mapper.XpFeedbackTypeMapper; import com.xiaopeng.operation.service.IXpFeedbackTypeService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; @@ -16,5 +19,14 @@ */ @Service public class XpFeedbackTypeServiceImpl extends ServiceImpl<XpFeedbackTypeMapper, XpFeedbackType> implements IXpFeedbackTypeService { @Override public PageInfo<XpFeedbackType> getPageList(BasePage basePage) { Page<XpFeedbackType> page = lambdaQuery().orderByDesc(XpFeedbackType::getCreateTime) .page(new Page<>(basePage.getPageNum(), basePage.getPageSize())); PageInfo<XpFeedbackType> pageInfo = new PageInfo<>(); pageInfo.setTotal(page.getTotal()); pageInfo.setSize(page.getSize()); pageInfo.setRecords(page.getRecords()); return pageInfo; } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpRideGuideServiceImpl.java
@@ -56,8 +56,10 @@ @Transactional(rollbackFor = Exception.class) @Override public void saveGuide(XpRideGuideDTO dto) { //根据类型删除已配置的乘车指南 lambdaUpdate().eq(XpRideGuide::getGuideType, dto.getGuideList().get(0).getGuideType()).remove(); List<XpRideGuide> guideList = dto.getGuideList(); List<XpRideGuide> xpRideGuides = BeanUtil.copyToList(guideList, XpRideGuide.class); saveOrUpdateBatch(xpRideGuides); saveBatch(xpRideGuides); } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpUserFeedbackServiceImpl.java
@@ -1,10 +1,32 @@ package com.xiaopeng.operation.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import com.alibaba.fastjson2.JSONObject; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.xiaopeng.api.dto.account.UserResourcesDto; import com.xiaopeng.api.feignClient.account.UserResourcesClient; import com.xiaopeng.api.model.operation.XpFeedbackType; import com.xiaopeng.api.model.operation.XpUserFeedback; import com.xiaopeng.api.vo.account.GetUserListByUidsVo; import com.xiaopeng.common.core.web.page.PageInfo; import com.xiaopeng.operation.mapper.XpUserFeedbackMapper; import com.xiaopeng.operation.query.UserFeedBackQuery; import com.xiaopeng.operation.service.IXpFeedbackTypeService; import com.xiaopeng.operation.service.IXpUserFeedbackService; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.xiaopeng.operation.vo.XpUserFeedbackVO; import lombok.RequiredArgsConstructor; import org.apache.commons.lang3.StringUtils; import org.springframework.context.annotation.Lazy; import org.springframework.http.HttpStatus; import org.springframework.stereotype.Service; import java.util.Collections; import java.util.List; import java.util.Map; import java.util.Objects; import java.util.stream.Collectors; /** * <p> @@ -15,6 +37,51 @@ * @since 2026-02-03 */ @Service @RequiredArgsConstructor(onConstructor_ = @Lazy) public class XpUserFeedbackServiceImpl extends ServiceImpl<XpUserFeedbackMapper, XpUserFeedback> implements IXpUserFeedbackService { private final UserResourcesClient userResourcesClient; private final IXpFeedbackTypeService xpFeedbackTypeService; @Override public PageInfo<XpUserFeedbackVO> getPageList(UserFeedBackQuery query) { Page<XpUserFeedback> page = lambdaQuery() .like(StringUtils.isNotBlank(query.getFeedbackContent()), XpUserFeedback::getFeedbackContent, query.getFeedbackContent()) .page(new Page<>(query.getPageNum(), query.getPageSize())); //转换为VO List<XpUserFeedbackVO> xpUserFeedbackVOS = BeanUtil.copyToList(page.getRecords(), XpUserFeedbackVO.class); //获取小鹏用户信息 List<Long> xpUid = xpUserFeedbackVOS.stream().map(XpUserFeedback::getFeedbackUserId).distinct().collect(Collectors.toList()); if (CollUtil.isNotEmpty(xpUid)) { GetUserListByUidsVo getUserListByUidsVo = new GetUserListByUidsVo(); getUserListByUidsVo.setUids(xpUid); getUserListByUidsVo.setGetPreCarOwner(Boolean.TRUE); UserResourcesDto resultData = userResourcesClient.getUserListByUids(getUserListByUidsVo); if (resultData.getCode().equals(HttpStatus.OK.value())) { JSONObject jsonObject = JSONObject.parseObject(resultData.getData().toString()); for (XpUserFeedbackVO xpUserFeedbackVO : xpUserFeedbackVOS) { JSONObject userInfo = jsonObject.getJSONObject(xpUserFeedbackVO.getFeedbackUserId().toString()); if (Objects.nonNull(userInfo)) { xpUserFeedbackVO.setNickname(userInfo.getString("nickName")); xpUserFeedbackVO.setAvatar(userInfo.getString("headImg")); xpUserFeedbackVO.setPhone(userInfo.getString("mobile")); } } } } //收集意见反馈类型ID List<Long> feedbackTypeIds = xpUserFeedbackVOS.stream().map(XpUserFeedback::getFeedbackTypeId).distinct().collect(Collectors.toList()); Map<Long, String> feedbackTypeMap = CollUtil.isNotEmpty(feedbackTypeIds) ? xpFeedbackTypeService.listByIds(feedbackTypeIds).stream() .collect(Collectors.toMap(XpFeedbackType::getId, XpFeedbackType::getFeedbackType)) : Collections.emptyMap(); xpUserFeedbackVOS.forEach(item-> item.setFeedbackTypeName(feedbackTypeMap.get(item.getFeedbackTypeId()))); //封装分页信息 PageInfo<XpUserFeedbackVO> pageInfo = new PageInfo<>(); pageInfo.setTotal(page.getTotal()); pageInfo.setSize(page.getSize()); pageInfo.setPages(page.getPages()); pageInfo.setRecords(xpUserFeedbackVOS); return pageInfo; } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/vo/XpAppVersionVO.java
@@ -25,4 +25,10 @@ @ApiModelProperty(value = "更新说明") private String updateDescription; @ApiModelProperty(value = "是否强制更新 0-否 1-是") private Integer forceUpdateFlag; @ApiModelProperty(value = "版本号 判断是否需要升级") private Integer versionCode; } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/vo/XpUserFeedbackVO.java
New file @@ -0,0 +1,29 @@ package com.xiaopeng.operation.vo; import com.xiaopeng.api.model.operation.XpUserFeedback; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import lombok.EqualsAndHashCode; /** * @author MiTao * @date 2026-02-26 14:34 * */ @Data @EqualsAndHashCode(callSuper = true) @ApiModel(value = "用户反馈视图对象") public class XpUserFeedbackVO extends XpUserFeedback { @ApiModelProperty(value = "头像") private String avatar; @ApiModelProperty(value = "昵称") private String nickname; @ApiModelProperty(value = "反馈类型名称") private String feedbackTypeName; @ApiModelProperty(value = "联系方式") private String phone; } xp-robotaxi-vehicle-convoy-boot/src/main/java/com/xiaopeng/vehicleConvoy/controller/XpFleetController.java
@@ -195,5 +195,15 @@ xpFleetService.removeOperationUser(fleetId, operationUserId); return R.ok(); } /** * 根据ID列表批量查询车队信息(内部接口) * * @param ids 车队ID列表 * @return 车队列表 */ @ApiOperation(value = "获取车队不分页列表", tags = {"管理后台-车队管理"}) @PostMapping("/api/v1/fleet/list") public R<List<XpFleet>> getList() { return R.ok(xpFleetService.list()); } }