package com.xxfc.platform.order.biz;

import com.github.wxiaoqi.security.common.exception.BaseException;
import com.github.wxiaoqi.security.common.util.process.ResultCode;
import com.xxfc.platform.order.entity.BaseOrder;
import org.springframework.stereotype.Service;

import com.xxfc.platform.order.entity.OrderTourDetail;
import com.xxfc.platform.order.mapper.OrderTourDetailMapper;
import com.github.wxiaoqi.security.common.biz.BaseBiz;

import java.util.List;
import java.util.Map;

/**
 * 旅游订单详情
 *
 * @author zjw
 * @email nishijjo@qq.com
 * @date 2019-06-06 18:18:33
 */
@Service
public class OrderTourDetailBiz extends BaseBiz<OrderTourDetailMapper,OrderTourDetail> {
    private static Map<Integer, List<Integer>> ChargeOffAble;


    /**
     * 更新（不成功抛异常）
     * @param orderTourDetail
     * @return
     */
    public OrderTourDetail updateSelectiveByIdReT(OrderTourDetail orderTourDetail) {
        if(updateSelectiveByIdRe(orderTourDetail) > 0) {
            return selectById(orderTourDetail.getId());
        }else {
            throw new BaseException(ResultCode.DB_OPERATION_FAIL_CODE);
        }
    }
}