增加字段
This commit is contained in:
@@ -55,6 +55,8 @@ public class PrcOrder extends BaseEntity
|
|||||||
private String countryCode;
|
private String countryCode;
|
||||||
private String countryName;
|
private String countryName;
|
||||||
private Integer orderStatus;
|
private Integer orderStatus;
|
||||||
|
/** 0 not received / 1 received (TAB_ORDER.BL_PICKUP) */
|
||||||
|
private Integer blPickup;
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date pickupDate;
|
private Date pickupDate;
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
|||||||
@@ -87,7 +87,6 @@ public class PrcOrderExt implements Serializable
|
|||||||
private String latestTrajectory;
|
private String latestTrajectory;
|
||||||
private String wayBill;
|
private String wayBill;
|
||||||
private Integer blBaging;
|
private Integer blBaging;
|
||||||
private Integer blPickup;
|
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
private Date bagDate;
|
private Date bagDate;
|
||||||
private Integer orgOrderStatus;
|
private Integer orgOrderStatus;
|
||||||
|
|||||||
@@ -93,7 +93,6 @@ public final class OracleOrderExtFiller
|
|||||||
ext.setLatestTrajectory(str(row, "LATEST_TRAJECTORY"));
|
ext.setLatestTrajectory(str(row, "LATEST_TRAJECTORY"));
|
||||||
ext.setWayBill(str(row, "WAY_BILL"));
|
ext.setWayBill(str(row, "WAY_BILL"));
|
||||||
ext.setBlBaging(integer(row, "BL_BAGING"));
|
ext.setBlBaging(integer(row, "BL_BAGING"));
|
||||||
ext.setBlPickup(integer(row, "BL_PICKUP"));
|
|
||||||
ext.setBagDate(date(row, "BAG_DATE"));
|
ext.setBagDate(date(row, "BAG_DATE"));
|
||||||
ext.setOrgOrderStatus(integer(row, "ORG_ORDER_STATUS"));
|
ext.setOrgOrderStatus(integer(row, "ORG_ORDER_STATUS"));
|
||||||
ext.setStatusDescription(str(row, "STATUS_DESCRIPTION"));
|
ext.setStatusDescription(str(row, "STATUS_DESCRIPTION"));
|
||||||
|
|||||||
@@ -83,6 +83,7 @@ public final class OracleOrderFiller
|
|||||||
order.setProductName(str(row, "PRODUCT_NAME"));
|
order.setProductName(str(row, "PRODUCT_NAME"));
|
||||||
}
|
}
|
||||||
order.setOrderStatus(integer(row, "ORDER_STATUS"));
|
order.setOrderStatus(integer(row, "ORDER_STATUS"));
|
||||||
|
order.setBlPickup(integer(row, "BL_PICKUP"));
|
||||||
order.setPickupDate(date(row, "PICKUP_DATE"));
|
order.setPickupDate(date(row, "PICKUP_DATE"));
|
||||||
if (order.getDimensionalWeightFactor() == null)
|
if (order.getDimensionalWeightFactor() == null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -80,7 +80,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="latestTrajectory" column="latest_trajectory" />
|
<result property="latestTrajectory" column="latest_trajectory" />
|
||||||
<result property="wayBill" column="way_bill" />
|
<result property="wayBill" column="way_bill" />
|
||||||
<result property="blBaging" column="bl_baging" />
|
<result property="blBaging" column="bl_baging" />
|
||||||
<result property="blPickup" column="bl_pickup" />
|
|
||||||
<result property="bagDate" column="bag_date" />
|
<result property="bagDate" column="bag_date" />
|
||||||
<result property="orgOrderStatus" column="org_order_status" />
|
<result property="orgOrderStatus" column="org_order_status" />
|
||||||
<result property="statusDescription" column="status_description" />
|
<result property="statusDescription" column="status_description" />
|
||||||
@@ -178,7 +177,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<sql id="selectPrcOrderExtVo">
|
<sql id="selectPrcOrderExtVo">
|
||||||
select order_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time, update_time
|
select order_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, bl_baging, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time, update_time
|
||||||
from prc_order_ext
|
from prc_order_ext
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
@@ -194,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<insert id="insertPrcOrderExt" parameterType="PrcOrderExt">
|
<insert id="insertPrcOrderExt" parameterType="PrcOrderExt">
|
||||||
insert into prc_order_ext (
|
insert into prc_order_ext (
|
||||||
order_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
|
order_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, bl_baging, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
|
||||||
) values (
|
) values (
|
||||||
#{orderId},
|
#{orderId},
|
||||||
#{orderNo},
|
#{orderNo},
|
||||||
@@ -271,7 +270,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{latestTrajectory},
|
#{latestTrajectory},
|
||||||
#{wayBill},
|
#{wayBill},
|
||||||
#{blBaging},
|
#{blBaging},
|
||||||
#{blPickup},
|
|
||||||
#{bagDate},
|
#{bagDate},
|
||||||
#{orgOrderStatus},
|
#{orgOrderStatus},
|
||||||
#{statusDescription},
|
#{statusDescription},
|
||||||
@@ -370,7 +368,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
|
|
||||||
<insert id="upsertPrcOrderExt" parameterType="PrcOrderExt">
|
<insert id="upsertPrcOrderExt" parameterType="PrcOrderExt">
|
||||||
insert into prc_order_ext (
|
insert into prc_order_ext (
|
||||||
order_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, bl_baging, bl_pickup, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
|
order_id, order_no, upstream_id, line_no, package_num, actual_volume, cp_type, consignee_mobile, order_returnsign, trade_type, duty_type, battery_type, consignee_companyname, consignee_address, consignee_telephone, consignee_state, consignee_city, consignee_suburb, consignee_passportno, consignee_email, consignee_taxno, consignee_taxnotype, consignee_taxnocountry, consignee_streetno, consignee_doorno, shipper_taxnotype, shipper_taxno, shipper_taxnocountry, customer_id, product_imagepath, order_transactionurl, order_cargoamount, cargo_type, shipper_companyname, shipper_address1, shipper_address2, shipper_address3, shipper_city, shipper_state, shipper_postcode, shipper_country, shipper_telephone, shipper_suburb, shipper_email, shipper_passportno, import_code, import_name, import_companyname, import_address, import_address2, import_address3, import_telephone, import_email, import_postcode, import_city, import_state, import_country, buyerid, create_at, pay_type, line_code, line_name, product_type, line_type, cargo_name, order_insurance, product_sum_price, product_sum, shipper_doorno, tariff_payment_account, topayment, product_floor, latest_trajectory, way_bill, bl_baging, bag_date, org_order_status, status_description, zz_date, shipping_date, order_type, receiving_photo, freight, is_receivable, is_meet, bill_no_receivable, bill_no_meet, country_eingth_name, is_receivable_fee, settlement_fee, product_id, service_freight, is_pay_fee, has_added_surcharge, yf_fee, yf_totail_fee, trajectory_status, cargo_type_name, service_code, three_code, volume_height_old, volume_length_old, volume_width_old, register_man_old, bag_no_old, air_no_old, box_sizi_old, baging_man_old, retrieval_man_old, invoice_amount_old, invoice_title_old, invoice_weight_old, sku_old, hs_code_old, register_date_old, invoice_currency_old, trajectory_sub_state, sign_in_time, warehouse_time, declaration_time, release_time, station_time, takeoff_time, landing_time, clearance_and_delivery_time, supplier_name, credit_code, other_id, platform_code, sync_shipment_status, update_weight, other_bag_no, bag_flag, online_time, outbound_time, air_confirm_date, shipment_type, track_query_time, air_confirm_time, package_type, update_by, customer_pickup_site, barcode_number, tracking_reflect_status, remote_postcode, clearance_time, arrive_stock_time, departure_time, first_deliver_time, hs_code_tax_count, hs_code_tax_amount, hs_code_tax_currency, invoice_url, clearance_no, push_weight, internal_check_time, air_delay_time, first_landing_time, second_takeoff_time, des_port_check_time, stay_remark, miss_box_remark, product_channel_id, customer_track_id, register_site, package_type_financial, mrn, create_time
|
||||||
) values (
|
) values (
|
||||||
#{orderId},
|
#{orderId},
|
||||||
#{orderNo},
|
#{orderNo},
|
||||||
@@ -447,7 +445,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{latestTrajectory},
|
#{latestTrajectory},
|
||||||
#{wayBill},
|
#{wayBill},
|
||||||
#{blBaging},
|
#{blBaging},
|
||||||
#{blPickup},
|
|
||||||
#{bagDate},
|
#{bagDate},
|
||||||
#{orgOrderStatus},
|
#{orgOrderStatus},
|
||||||
#{statusDescription},
|
#{statusDescription},
|
||||||
@@ -617,7 +614,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
latest_trajectory = values(latest_trajectory),
|
latest_trajectory = values(latest_trajectory),
|
||||||
way_bill = values(way_bill),
|
way_bill = values(way_bill),
|
||||||
bl_baging = values(bl_baging),
|
bl_baging = values(bl_baging),
|
||||||
bl_pickup = values(bl_pickup),
|
|
||||||
bag_date = values(bag_date),
|
bag_date = values(bag_date),
|
||||||
org_order_status = values(org_order_status),
|
org_order_status = values(org_order_status),
|
||||||
status_description = values(status_description),
|
status_description = values(status_description),
|
||||||
|
|||||||
@@ -39,6 +39,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
<result property="countryCode" column="country_code" />
|
<result property="countryCode" column="country_code" />
|
||||||
<result property="countryName" column="country_name" />
|
<result property="countryName" column="country_name" />
|
||||||
<result property="orderStatus" column="order_status" />
|
<result property="orderStatus" column="order_status" />
|
||||||
|
<result property="blPickup" column="bl_pickup" />
|
||||||
<result property="pickupDate" column="pickup_date" />
|
<result property="pickupDate" column="pickup_date" />
|
||||||
<result property="bizDate" column="biz_date" />
|
<result property="bizDate" column="biz_date" />
|
||||||
<result property="successStatus" column="success_status" />
|
<result property="successStatus" column="success_status" />
|
||||||
@@ -56,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
volume, volume_weight, pkg_length, pkg_width, pkg_height,
|
volume, volume_weight, pkg_length, pkg_width, pkg_height,
|
||||||
shipper_name, consignee_name, consignee_postcode, warehouse_code,
|
shipper_name, consignee_name, consignee_postcode, warehouse_code,
|
||||||
order_time, order_remark, product_code, product_name, product_floor_code,
|
order_time, order_remark, product_code, product_name, product_floor_code,
|
||||||
country_code, country_name, order_status, pickup_date, biz_date,
|
country_code, country_name, order_status, bl_pickup, pickup_date, biz_date,
|
||||||
success_status, fail_code, created_by, create_time, updated_by, update_time
|
success_status, fail_code, created_by, create_time, updated_by, update_time
|
||||||
from prc_order
|
from prc_order
|
||||||
</sql>
|
</sql>
|
||||||
@@ -123,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
volume, volume_weight, pkg_length, pkg_width, pkg_height,
|
volume, volume_weight, pkg_length, pkg_width, pkg_height,
|
||||||
shipper_name, consignee_name, consignee_postcode, warehouse_code,
|
shipper_name, consignee_name, consignee_postcode, warehouse_code,
|
||||||
order_time, order_remark, product_code, product_name, product_floor_code,
|
order_time, order_remark, product_code, product_name, product_floor_code,
|
||||||
country_code, country_name, order_status, pickup_date, biz_date,
|
country_code, country_name, order_status, bl_pickup, pickup_date, biz_date,
|
||||||
success_status, fail_code, created_by, create_time, updated_by, update_time
|
success_status, fail_code, created_by, create_time, updated_by, update_time
|
||||||
) values (
|
) values (
|
||||||
#{orderId}, #{orderNo}, #{trackingNo}, #{transferNo}, #{trackId},
|
#{orderId}, #{orderNo}, #{trackingNo}, #{transferNo}, #{trackId},
|
||||||
@@ -132,7 +133,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
|
#{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
|
||||||
#{shipperName}, #{consigneeName}, #{consigneePostcode}, #{warehouseCode},
|
#{shipperName}, #{consigneeName}, #{consigneePostcode}, #{warehouseCode},
|
||||||
#{orderTime}, #{orderRemark}, #{productCode}, #{productName}, #{productFloorCode},
|
#{orderTime}, #{orderRemark}, #{productCode}, #{productName}, #{productFloorCode},
|
||||||
#{countryCode}, #{countryName}, #{orderStatus}, #{pickupDate}, #{bizDate},
|
#{countryCode}, #{countryName}, #{orderStatus}, #{blPickup}, #{pickupDate}, #{bizDate},
|
||||||
#{successStatus}, #{failCode}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
#{successStatus}, #{failCode}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||||
)
|
)
|
||||||
</insert>
|
</insert>
|
||||||
@@ -172,6 +173,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
country_code = #{countryCode},
|
country_code = #{countryCode},
|
||||||
country_name = #{countryName},
|
country_name = #{countryName},
|
||||||
order_status = #{orderStatus},
|
order_status = #{orderStatus},
|
||||||
|
bl_pickup = #{blPickup},
|
||||||
pickup_date = #{pickupDate},
|
pickup_date = #{pickupDate},
|
||||||
biz_date = #{bizDate},
|
biz_date = #{bizDate},
|
||||||
success_status = #{successStatus},
|
success_status = #{successStatus},
|
||||||
@@ -191,7 +193,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
volume, volume_weight, pkg_length, pkg_width, pkg_height,
|
volume, volume_weight, pkg_length, pkg_width, pkg_height,
|
||||||
shipper_name, consignee_name, consignee_postcode, warehouse_code,
|
shipper_name, consignee_name, consignee_postcode, warehouse_code,
|
||||||
order_time, order_remark, product_code, product_name, product_floor_code,
|
order_time, order_remark, product_code, product_name, product_floor_code,
|
||||||
country_code, country_name, order_status, pickup_date, biz_date,
|
country_code, country_name, order_status, bl_pickup, pickup_date, biz_date,
|
||||||
success_status, fail_code, created_by, create_time, updated_by, update_time
|
success_status, fail_code, created_by, create_time, updated_by, update_time
|
||||||
) values (
|
) values (
|
||||||
#{orderId}, #{orderNo}, #{trackingNo}, #{transferNo}, #{trackId},
|
#{orderId}, #{orderNo}, #{trackingNo}, #{transferNo}, #{trackId},
|
||||||
@@ -200,7 +202,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
#{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
|
#{volume}, #{volumeWeight}, #{pkgLength}, #{pkgWidth}, #{pkgHeight},
|
||||||
#{shipperName}, #{consigneeName}, #{consigneePostcode}, #{warehouseCode},
|
#{shipperName}, #{consigneeName}, #{consigneePostcode}, #{warehouseCode},
|
||||||
#{orderTime}, #{orderRemark}, #{productCode}, #{productName}, #{productFloorCode},
|
#{orderTime}, #{orderRemark}, #{productCode}, #{productName}, #{productFloorCode},
|
||||||
#{countryCode}, #{countryName}, #{orderStatus}, #{pickupDate}, #{bizDate},
|
#{countryCode}, #{countryName}, #{orderStatus}, #{blPickup}, #{pickupDate}, #{bizDate},
|
||||||
#{successStatus}, #{failCode}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
#{successStatus}, #{failCode}, #{createBy}, #{createTime}, #{updateBy}, #{updateTime}
|
||||||
)
|
)
|
||||||
on duplicate key update
|
on duplicate key update
|
||||||
@@ -237,6 +239,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||||||
country_code = values(country_code),
|
country_code = values(country_code),
|
||||||
country_name = values(country_name),
|
country_name = values(country_name),
|
||||||
order_status = values(order_status),
|
order_status = values(order_status),
|
||||||
|
bl_pickup = values(bl_pickup),
|
||||||
pickup_date = values(pickup_date),
|
pickup_date = values(pickup_date),
|
||||||
biz_date = values(biz_date),
|
biz_date = values(biz_date),
|
||||||
success_status = values(success_status),
|
success_status = values(success_status),
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ SET NAMES utf8mb4;
|
|||||||
-- SERVICE_MAN* -> service_man / service_man_code
|
-- SERVICE_MAN* -> service_man / service_man_code
|
||||||
-- TRACK_REMARK/... -> order_remark
|
-- TRACK_REMARK/... -> order_remark
|
||||||
-- ORDER_STATUS -> order_status
|
-- ORDER_STATUS -> order_status
|
||||||
|
-- BL_PICKUP -> bl_pickup
|
||||||
-- PICKUP_DATE -> pickup_date
|
-- PICKUP_DATE -> pickup_date
|
||||||
-- CREATE_DATE -> order_time
|
-- CREATE_DATE -> order_time
|
||||||
-- (task.bill_time) -> biz_date
|
-- (task.bill_time) -> biz_date
|
||||||
@@ -83,6 +84,7 @@ CREATE TABLE IF NOT EXISTS `prc_order` (
|
|||||||
`country_code` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '国家二字码(TAB_ORDER.COUNTRY)',
|
`country_code` char(2) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '国家二字码(TAB_ORDER.COUNTRY)',
|
||||||
`country_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '国家名称(TAB_ORDER.COUNTRY_NAME)',
|
`country_name` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '国家名称(TAB_ORDER.COUNTRY_NAME)',
|
||||||
`order_status` tinyint(4) DEFAULT NULL COMMENT '订单状态(TAB_ORDER.ORDER_STATUS)',
|
`order_status` tinyint(4) DEFAULT NULL COMMENT '订单状态(TAB_ORDER.ORDER_STATUS)',
|
||||||
|
`bl_pickup` tinyint(4) DEFAULT NULL COMMENT '是否收货(0未收货 1已收货,TAB_ORDER.BL_PICKUP)',
|
||||||
`pickup_date` datetime DEFAULT NULL COMMENT '提货/收件时间(TAB_ORDER.PICKUP_DATE)',
|
`pickup_date` datetime DEFAULT NULL COMMENT '提货/收件时间(TAB_ORDER.PICKUP_DATE)',
|
||||||
`biz_date` datetime DEFAULT NULL COMMENT '计费时间(任务bill_time,非上游字段)',
|
`biz_date` datetime DEFAULT NULL COMMENT '计费时间(任务bill_time,非上游字段)',
|
||||||
`success_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'WAITING' COMMENT '计费成功状态:WAITING待处理 SUCCESS成功 FAILED失败',
|
`success_status` varchar(20) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT 'WAITING' COMMENT '计费成功状态:WAITING待处理 SUCCESS成功 FAILED失败',
|
||||||
@@ -100,7 +102,8 @@ CREATE TABLE IF NOT EXISTS `prc_order` (
|
|||||||
KEY `idx_prc_order_pickup_date` (`pickup_date`),
|
KEY `idx_prc_order_pickup_date` (`pickup_date`),
|
||||||
KEY `idx_prc_order_success_status` (`success_status`,`create_time`),
|
KEY `idx_prc_order_success_status` (`success_status`,`create_time`),
|
||||||
KEY `idx_prc_order_fail_code` (`fail_code`),
|
KEY `idx_prc_order_fail_code` (`fail_code`),
|
||||||
KEY `idx_prc_order_product` (`product_code`,`country_code`)
|
KEY `idx_prc_order_product` (`product_code`,`country_code`),
|
||||||
|
KEY `idx_prc_order_bl_pickup` (`bl_pickup`)
|
||||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单主表(上游TAB_ORDER核心字段+计费状态)';
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci COMMENT='订单主表(上游TAB_ORDER核心字段+计费状态)';
|
||||||
|
|
||||||
-- ============================================================
|
-- ============================================================
|
||||||
@@ -232,6 +235,20 @@ SET @sql := IF(
|
|||||||
);
|
);
|
||||||
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
SET @col := (
|
||||||
|
SELECT COLUMN_NAME FROM information_schema.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'prc_order_ext'
|
||||||
|
AND COLUMN_NAME = 'bl_pickup'
|
||||||
|
LIMIT 1
|
||||||
|
);
|
||||||
|
SET @sql := IF(
|
||||||
|
@col IS NOT NULL,
|
||||||
|
'ALTER TABLE prc_order_ext DROP COLUMN bl_pickup',
|
||||||
|
'SELECT 1'
|
||||||
|
);
|
||||||
|
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
-- 3.5 MUST empty ext before FK (old order_id values are former bill_id)
|
-- 3.5 MUST empty ext before FK (old order_id values are former bill_id)
|
||||||
-- Run these 3 statements even if the rest of the script already succeeded.
|
-- Run these 3 statements even if the rest of the script already succeeded.
|
||||||
TRUNCATE TABLE prc_order_ext;
|
TRUNCATE TABLE prc_order_ext;
|
||||||
|
|||||||
@@ -0,0 +1,31 @@
|
|||||||
|
-- prc_order.bl_pickup from TAB_ORDER.BL_PICKUP (0/1)
|
||||||
|
SET NAMES utf8mb4;
|
||||||
|
|
||||||
|
SET @col := (
|
||||||
|
SELECT COLUMN_NAME FROM information_schema.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'prc_order'
|
||||||
|
AND COLUMN_NAME = 'bl_pickup'
|
||||||
|
LIMIT 1
|
||||||
|
);
|
||||||
|
SET @sql := IF(
|
||||||
|
@col IS NULL,
|
||||||
|
'ALTER TABLE prc_order ADD COLUMN bl_pickup tinyint(4) DEFAULT NULL COMMENT \'是否收货(0未收货 1已收货,TAB_ORDER.BL_PICKUP)\' AFTER order_status, ADD KEY idx_prc_order_bl_pickup (bl_pickup)',
|
||||||
|
'SELECT 1'
|
||||||
|
);
|
||||||
|
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
|
|
||||||
|
-- drop from ext if still present (moved to prc_order)
|
||||||
|
SET @col := (
|
||||||
|
SELECT COLUMN_NAME FROM information_schema.COLUMNS
|
||||||
|
WHERE TABLE_SCHEMA = DATABASE()
|
||||||
|
AND TABLE_NAME = 'prc_order_ext'
|
||||||
|
AND COLUMN_NAME = 'bl_pickup'
|
||||||
|
LIMIT 1
|
||||||
|
);
|
||||||
|
SET @sql := IF(
|
||||||
|
@col IS NOT NULL,
|
||||||
|
'ALTER TABLE prc_order_ext DROP COLUMN bl_pickup',
|
||||||
|
'SELECT 1'
|
||||||
|
);
|
||||||
|
PREPARE stmt FROM @sql; EXECUTE stmt; DEALLOCATE PREPARE stmt;
|
||||||
Reference in New Issue
Block a user