Compare commits

...

2 Commits

Author SHA1 Message Date
xiao-fajia
d720dfdf2a Merge branch 'master' of http://122.51.230.86:3000/dianliang/lanan-system
# Conflicts:
#	dl-module-base/src/main/java/cn/iocoder/yudao/module/app/customer/admin/CustomerMainApi.java
2024-09-25 08:35:06 +08:00
xiao-fajia
8807bd96f4 更新代码 2024-09-25 08:31:57 +08:00
6 changed files with 54 additions and 0 deletions

View File

@ -58,4 +58,16 @@ public class CustomerMainApi {
return success(levelService.queryListAll(pageReqVO));
}
/**
* 根据车辆ID反查用户信息
*
* @author 小李
* @date 21:41 2024/9/24
* @param carId 车辆ID
**/
@GetMapping("/getByCarId")
@Operation(summary = "根据车辆ID反查用户信息")
public CommonResult<?> getCustomerByCarId(@RequestParam("carId")String carId) {
return success(customerMainService.getCustomerByCarId(carId));
}
}

View File

@ -36,4 +36,13 @@ public interface CustomerMainMapper extends BaseMapper<CustomerMain> {
* @return cn.iocoder.yudao.module.custom.vo.CustomerMainRespVO
**/
CustomerMainRespVO queryById(@Param("id") String id);
/**
* 根据车辆ID反查用户信息
*
* @author 小李
* @date 21:41 2024/9/24
* @param carId 车辆ID
**/
CustomerMain getCustomerByCarId(@Param("carId") String carId);
}

View File

@ -80,4 +80,13 @@ public interface CustomerMainService extends IService<CustomerMain> {
* @date 18:42 2024/8/3
**/
void bindCustomAndCar(CustomerMainSaveReqVO saveReqVO);
/**
* 根据车辆ID反查用户信息
*
* @author 小李
* @date 21:41 2024/9/24
* @param carId 车辆ID
**/
CustomerMain getCustomerByCarId(String carId);
}

View File

@ -268,4 +268,16 @@ public class CustomerMainServiceImpl extends ServiceImpl<CustomerMainMapper, Cus
}
customerCarService.bindCustomerCar(saveReqVO.getId(), CUS_SIGN_CUSTOMER, customerCars);
}
/**
* 根据车辆ID反查用户信息
*
* @author 小李
* @date 21:41 2024/9/24
* @param carId 车辆ID
**/
@Override
public CustomerMain getCustomerByCarId(String carId){
return baseMapper.getCustomerByCarId(carId);
}
}

View File

@ -122,4 +122,13 @@
GROUP BY
main.id
</select>
<select id="getCustomerByCarId" resultType="cn.iocoder.yudao.module.custom.entity.CustomerMain">
select bcus.*
from base_customer_car bcc
left join base_customer_main bcus on bcc.cus_id = bcus.id
left join base_car_main bcar on bcc.car_id = bcar.id
where bcc.deleted = '0'
and bcc.car_id = #{carId}
</select>
</mapper>

View File

@ -53,6 +53,9 @@ public class DlRepairBookingServiceImpl extends ServiceImpl<DlRepairBookingMappe
**/
@Override
public void updateBooking(DlRepairBookingRespVO repairBookingRespVO){
Long loginUserId = SecurityFrameworkUtils.getLoginUserId();
Optional.ofNullable(loginUserId).ifPresent(repairBookingRespVO::setUserId);
repairBookingRespVO.setBookingStatus("01");
baseMapper.insertOrUpdate(repairBookingRespVO);
}