<commit_before>package com.joy.app.activity.poi;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.android.library.activity.BaseHttpUiActivity;
import com.android.library.httptask.ObjectRequest;
import com.android.library.utils.ToastUtil;
import com.android.library.utils.ViewUtil;
import com.android.library.widget.JTextView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.joy.app.R;
import com.joy.app.bean.poi.OrderDetail;
import com.joy.app.eventbus.OrderStatusEvent;
import com.joy.app.utils.http.OrderHtpUtil;
import com.joy.app.utils.http.ReqFactory;
import com.joy.app.utils.plan.DialogUtil;
import com.joy.app.utils.plan.FolderRequestListener;

import butterknife.Bind;
import butterknife.ButterKnife;
import de.greenrobot.event.EventBus;

/**
 * @author litong  <br>
 * @Description 订单详情页    <br>
 */
public class OrderDetailActivity extends BaseHttpUiActivity<OrderDetail> implements View.OnClickListener, FolderRequestListener {
    String order_id;
    OrderDetail detail;
    @Bind(R.id.jtv_title)
    JTextView jtvTitle;
    @Bind(R.id.jtv_infor)
    JTextView jtvInfor;
    @Bind(R.id.sdv_order_photo)
    SimpleDraweeView sdvOrderPhoto;
    @Bind(R.id.jtv_order_title)
    JTextView jtvOrderTitle;
    @Bind(R.id.jtv_order_id)
    JTextView jtvOrderId;
    @Bind(R.id.jtv_order_item)
    JTextView jtvOrderItem;
    @Bind(R.id.jtv_order_count)
    JTextView jtvOrderCount;
    @Bind(R.id.jtv_order_name)
    JTextView jtvOrderName;
    @Bind(R.id.jtv_order_phone)
    JTextView jtvOrderPhone;
    @Bind(R.id.jtv_order_email)
    JTextView jtvOrderEmail;
    @Bind(R.id.jtv_order_total)
    JTextView jtvOrderTotal;
    @Bind(R.id.v_empty)
    View vEmpty;
    @Bind(R.id.jtv_pay)
    JTextView jtvPay;
    @Bind(R.id.iv_finsh)
    ImageView ivFinsh;

    DialogUtil dialogUtil;
    @Bind(R.id.jtv_order_day)
    JTextView jtvOrderDay;
    @Bind(R.id.ll_selected_item)
    LinearLayout llSelectedItem;
    @Bind(R.id.ll_day_item)
    LinearLayout llDayItem;
    @Bind(R.id.v_day_spilt)
    View vDaySpilt;
    @Bind(R.id.v_item_spilt)
    View vItemSpilt;

    public static void startActivity(Activity act, String orderId, int requestCode) {
        Intent intent = new Intent(act, OrderDetailActivity.class);
        intent.putExtra("DATA", orderId);
        act.startActivityForResult(intent, requestCode);
    }

    public static void startActivity(Activity act, String orderId) {
        Intent intent = new Intent(act, OrderDetailActivity.class);
        intent.putExtra("DATA", orderId);
        act.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.item_order_view);
        ButterKnife.bind(this);
        executeRefreshOnly();

    }

    @Override
    protected void onDestroy() {

        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }

    @Override
    protected void initData() {

        super.initData();
        EventBus.getDefault().register(this);
        order_id = getIntent().getStringExtra("DATA");
    }

    @Override
    protected void initTitleView() {
        super.initTitleView();
        addTitleLeftBackView();
        addTitleMiddleView(R.string.order_detail_title);
        addTitleRightView(R.drawable.ic_plan_more, new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (isRequest) return;
                dialogUtil.showDeleteOrderDialog(order_id, detail.getOrder_status() == 2);
            }
        });
    }

    @Override<commit_msg>修复order detail nullpoint问题<commit_after>package com.joy.app.activity.poi;

import android.app.Activity;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageView;
import android.widget.LinearLayout;

import com.android.library.activity.BaseHttpUiActivity;
import com.android.library.httptask.ObjectRequest;
import com.android.library.utils.ToastUtil;
import com.android.library.utils.ViewUtil;
import com.android.library.widget.JTextView;
import com.facebook.drawee.view.SimpleDraweeView;
import com.joy.app.R;
import com.joy.app.bean.poi.OrderDetail;
import com.joy.app.eventbus.OrderStatusEvent;
import com.joy.app.utils.http.OrderHtpUtil;
import com.joy.app.utils.http.ReqFactory;
import com.joy.app.utils.plan.DialogUtil;
import com.joy.app.utils.plan.FolderRequestListener;

import butterknife.Bind;
import butterknife.ButterKnife;
import de.greenrobot.event.EventBus;

/**
 * @author litong  <br>
 * @Description 订单详情页    <br>
 */
public class OrderDetailActivity extends BaseHttpUiActivity<OrderDetail> implements View.OnClickListener, FolderRequestListener {
    String order_id;
    OrderDetail detail;
    @Bind(R.id.jtv_title)
    JTextView jtvTitle;
    @Bind(R.id.jtv_infor)
    JTextView jtvInfor;
    @Bind(R.id.sdv_order_photo)
    SimpleDraweeView sdvOrderPhoto;
    @Bind(R.id.jtv_order_title)
    JTextView jtvOrderTitle;
    @Bind(R.id.jtv_order_id)
    JTextView jtvOrderId;
    @Bind(R.id.jtv_order_item)
    JTextView jtvOrderItem;
    @Bind(R.id.jtv_order_count)
    JTextView jtvOrderCount;
    @Bind(R.id.jtv_order_name)
    JTextView jtvOrderName;
    @Bind(R.id.jtv_order_phone)
    JTextView jtvOrderPhone;
    @Bind(R.id.jtv_order_email)
    JTextView jtvOrderEmail;
    @Bind(R.id.jtv_order_total)
    JTextView jtvOrderTotal;
    @Bind(R.id.v_empty)
    View vEmpty;
    @Bind(R.id.jtv_pay)
    JTextView jtvPay;
    @Bind(R.id.iv_finsh)
    ImageView ivFinsh;

    DialogUtil dialogUtil;
    @Bind(R.id.jtv_order_day)
    JTextView jtvOrderDay;
    @Bind(R.id.ll_selected_item)
    LinearLayout llSelectedItem;
    @Bind(R.id.ll_day_item)
    LinearLayout llDayItem;
    @Bind(R.id.v_day_spilt)
    View vDaySpilt;
    @Bind(R.id.v_item_spilt)
    View vItemSpilt;

    public static void startActivity(Activity act, String orderId, int requestCode) {
        Intent intent = new Intent(act, OrderDetailActivity.class);
        intent.putExtra("DATA", orderId);
        act.startActivityForResult(intent, requestCode);
    }

    public static void startActivity(Activity act, String orderId) {
        Intent intent = new Intent(act, OrderDetailActivity.class);
        intent.putExtra("DATA", orderId);
        act.startActivity(intent);
    }

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.item_order_view);
        ButterKnife.bind(this);
        executeRefreshOnly();

    }

    @Override
    protected void onDestroy() {

        super.onDestroy();
        EventBus.getDefault().unregister(this);
    }

    @Override
    protected void initData() {

        super.initData();
        EventBus.getDefault().register(this);
        order_id = getIntent().getStringExtra("DATA");
    }

    @Override
    protected void initTitleView() {
        super.initTitleView();
        addTitleLeftBackView();
        addTitleMiddleView(R.string.order_detail_title);
        addTitleRightView(R.drawable.ic_plan_more, new View.OnClickListener() {
            @Override
            public void onClick(View v) {

                if (isRequest) return;
                if (dialogUtil != null)
                    dialogUtil.showDeleteOrderDialog(order_id, detail.getOrder_status() == 2);
            }
        });
    }

    @Override
{'fraction_non_alphanumeric': 0.10433870756324551, 'fraction_numerical': 0.00026215755669157164, 'mean_word_length': 3.392630972941854, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3316120', 'n_tokens_mistral': 2526, 'n_tokens_neox': 2481, 'n_words': 410}