jiaosong
2023-10-23 3b48dbfe08bf2bcaeba2f8f9ff63f1599407fcdd
server/services/src/main/java/com/doumee/service/business/impl/MemberRidesServiceImpl.java
@@ -273,7 +273,7 @@
            throw  new BusinessException( ResponseStatus.DATA_EMPTY );
        }
        if(Constants.formatIntegerNum(model.getStatus()) != Constants.MEMBER_RIDES_STATUS.BACK_CYCLING.getKey()||
        Constants.formatIntegerNum(model.getCloseStatus()) != Constants.ONE){
        Constants.formatIntegerNum(model.getCloseStatus()) != Constants.ZERO){
            throw  new BusinessException( ResponseStatus.NOT_ALLOWED.getCode(),"对不起,只能针对已还车且未结算的数据进行操作!" );
        }
        if(Constants.formatIntegerNum(memberRides.getDuration()) == Constants.formatIntegerNum(model.getDuration())){
@@ -357,7 +357,8 @@
        Integer freeRentTime = Integer.valueOf(collect.get(Constants.FREE_RENT_TIME).getCode());
        Integer rideTime = DateUtil.betweenMin(model.getRentDate(), update.getBackDate());
        //计算骑行计费时长
        update.setDuration( freeRentTime > 0 ? rideTime - freeRentTime : rideTime);
        update.setDuration( rideTime > freeRentTime  ? rideTime : 0 );
        //update.setDuration( freeRentTime > 0 ? rideTime - freeRentTime : rideTime);
        memberRidesMapper.updateById(update);
        //修改前
        String beforeContent = JSONObject.toJSONString(model);