xp-robotaxi-account-boot/src/main/java/com/xiaopeng/account/controller/XpAppUserCouponController.java
@@ -82,11 +82,11 @@ @PostMapping("/v1/api/appUserCoupon/deleteByIds") @ApiOperation(value = "根据ids删除用户优惠券", tags = {"管理后台-白名单-删除用户优惠券"}) public R<Boolean> deleteByIds(@RequestBody List<Long> ids) { if (ids == null || ids.isEmpty()) { public R<Boolean> deleteByIds(@RequestBody XpAppUserCouponPageListQuery query ) { if (query.getIds() == null || query.getIds().isEmpty()) { return R.fail("ID列表不能为空"); } boolean result = xpAppUserCouponService.removeByIds(ids); boolean result = xpAppUserCouponService.removeByIds(query.getIds()); return R.ok(result); } xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/account/XpAppUserCouponPageListQuery.java
@@ -11,7 +11,7 @@ @Data public class XpAppUserCouponPageListQuery extends BasePage { private List<Long> ids; @ApiModelProperty(value = "用户id 根据手机号获取") private Long appUserId; xp-robotaxi-api/src/main/java/com/xiaopeng/api/query/operation/XpTargetedServiceQuery.java
@@ -5,11 +5,16 @@ import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @Data @ApiModel(value = "定向服务 query") public class XpTargetedServiceQuery extends BasePage { @ApiModelProperty(value = "ids") private List<Long> ids; @ApiModelProperty(value = "省份名称") private String provinceName; @ApiModelProperty(value = "省份code") xp-robotaxi-maintenance-boot/src/main/java/com/xiaopeng/maintenance/service/impl/XpVehicleModelServiceImpl.java
@@ -43,12 +43,12 @@ @Override public boolean logicalRemoveById(String id) { XpVehicleModel entity = this.getById(id); if (entity != null) { entity.setDeleted(true); return this.updateById(entity); } return false; // XpVehicleModel entity = this.getById(id); // if (entity != null) { // entity.setDeleted(true); // return this.updateById(entity); // } return this.removeById(id); } /** * 获取指定车型ID关联的车辆数量 xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/controller/XpTargetedServiceController.java
@@ -1,5 +1,6 @@ package com.xiaopeng.operation.controller; import cn.hutool.core.collection.CollUtil; import com.xiaopeng.api.model.account.SysUser; import com.xiaopeng.api.model.operation.XpTargetedService; import com.xiaopeng.api.model.operation.XpWhitelist; @@ -116,12 +117,14 @@ /** * 批量删除 */ @GetMapping("/api/v1/targetedService/deleteByIds") @PostMapping("/api/v1/targetedService/deleteByIds") @ApiOperation(value = "定向服务-批量删除", tags = {"管理后台-定向服务批量删除"}) public R deleteByIds(String ids) { public R deleteByIds(@RequestBody XpTargetedServiceQuery query ) { if(CollUtil.isEmpty(query.getIds())){ return R.fail("ID列表不能为空"); } SysUser sysUser = tokenService.getLoginUser().getSysUser(); List<Long> whiteIds = Arrays.stream(ids.split(",")).map(Long::parseLong).collect(Collectors.toList()); return xpTargetedServiceService.deleteByIds(whiteIds, sysUser); return xpTargetedServiceService.deleteByIds(query.getIds(), sysUser); } } xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/query/WhitelistPageListQuery.java
@@ -12,6 +12,8 @@ public class WhitelistPageListQuery extends BasePage { @ApiModelProperty(value = "白名单账号") private String account; @ApiModelProperty(value = "用户名称") private String nickName; @ApiModelProperty(value = "状态 0=冻结 1=正常") private Boolean status; @ApiModelProperty(value = "来源 1=添加 2=邀请码") xp-robotaxi-operation-boot/src/main/java/com/xiaopeng/operation/service/impl/XpTargetedServiceServiceImpl.java
@@ -81,7 +81,7 @@ @Override public XpTargetedServiceVo getById(Long id) { XpTargetedService entity = this.getById(id); XpTargetedService entity = baseMapper.selectById(id); if (entity == null) { return null; } @@ -170,17 +170,21 @@ } @Override @Transactional public R deleteByIds(List<Long> ids, SysUser sysUser) { List<XpTargetedService> list = new ArrayList<>(); for (Long id : ids) { list.add(new XpTargetedService(){{ setId(id); setUpdateBy(sysUser.getNickName()); setDeleted(true); }}); // List<XpTargetedService> list = new ArrayList<>(); // for (Long id : ids) { // list.add(new XpTargetedService(){{ // setId(id); // setUpdateBy(sysUser.getNickName()); // setUpdateTime(LocalDateTime.now()); // setDeleted(true); // }}); // // } // this.updateBatchById(list); } this.updateBatchById(list); removeBatchByIds(ids); return R.ok(); } } xp-robotaxi-operation-boot/src/main/resources/mapper/operation/XpTargetedServiceMapper.xml
@@ -5,8 +5,8 @@ <select id="pageList" resultType="com.xiaopeng.api.vo.operation.XpTargetedServiceVo"> select a.* , (select count(1) from xp_targeted_service_vehicle where xp_targeted_service_id = a.id) as vehicleCount, (select count(1) from xp_targeted_service_whitelist where xp_targeted_service_id = a.id) as whitelistCount (select count(1) from xp_targeted_service_vehicle where targeted_service_id = a.id) as vehicleCount, (select count(1) from xp_targeted_service_whitelist where targeted_service_id = a.id) as whitelistCount from xp_targeted_service as a where a.is_deleted = 0 xp-robotaxi-operation-boot/src/main/resources/mapper/operation/XpWhitelistMapper.xml
@@ -16,6 +16,9 @@ <if test="query.account != null and query.account != ''"> and account like concat('%',#{query.account},'%') </if> <if test="query.nickName != null and query.nickName != ''"> and nick_name like concat('%',#{query.nickName},'%') </if> <if test="query.status != null"> and status = #{query.status} </if>