package com.bohuikeji.delivery.backstage.service.impl;

import com.alibaba.fastjson.JSONObject;
import com.bohuikeji.delivery.backstage.entity.TCallBack;
import com.bohuikeji.delivery.backstage.mapper.TCallBackMapper;
import com.bohuikeji.delivery.backstage.service.ITCallBackService;
import com.bohuikeji.frame.module.admin.base.ServiceImplBase;
import org.springframework.stereotype.Service;

/**
 * <p>
 * 回调信息
 * </p>
 *
 * @author 10552
 * @since 2019-08-22
 */
@Service
public class TCallBackServiceImpl extends ServiceImplBase<TCallBackMapper, TCallBack> implements ITCallBackService {

    @Override
    public boolean saveCallBack(JSONObject json,String type) {
        TCallBack callBack = new TCallBack();
        callBack.setCallBackName(type);
        callBack.setCallBackInfo(json);
        callBack.setOrderNum(json.getString("orderNo"));
        //callBack.setSfNum(json.getString("waybillNo"));
        return save(callBack);
    }
}
