Guest User

Untitled

a guest
Mar 5th, 2018
32
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.29 KB | None | 0 0
  1. <dataConfig>
  2. <dataSource driver="com.mysql.jdbc.Driver" url="jdbc:mysql://localhost:3308/signcatch_sandbox_app2" user="*******" password="********" />
  3. <document>
  4. <entity name="refund_orders"
  5. pk="id"
  6. query="select
  7. op.id,
  8. o.store_id,
  9. op.created_at as bill_date,
  10. o.refunded_order_no as original_order_no,
  11. o.order_id as refunded_orderid,
  12. op.sku as sku_code,
  13. op.batch_no as plu_code,
  14. op.product_name as description,
  15. op.quantity as qty,
  16. op.price as price,
  17. op.discount as discount,
  18. (op.pre_tax_amount+op.tax_amount) as amount,
  19. ml.location as pos_name,
  20. mm.first_name as user,
  21. o.manager_id as user_id,
  22. op.created_at,
  23. op.updated_at
  24. from order_product as op
  25. LEFT JOIN `order` o ON(o.order_id=op.order_no)
  26. LEFT JOIN merchant_manager mm ON(mm.id=o.manager_id)
  27. LEFT JOIN merchant_location ml ON(ml.id=o.merchant_location_id)
  28.  
  29. WHERE op.refund_order_id!=0
  30. GROUP BY op.id
  31. ORDER BY op.created_at ASC
  32. "
  33. deltaImportQuery="
  34. SELECT
  35. op.id,
  36. o.store_id,
  37. op.created_at as bill_date,
  38. o.refunded_order_no as original_order_no,
  39. o.order_id as refunded_orderid,
  40. op.sku as sku_code,
  41. op.batch_no as plu_code,
  42. op.product_name as description,
  43. op.quantity as qty,
  44. op.price as price,
  45. op.discount as discount,
  46. (op.pre_tax_amount+op.tax_amount) as amount,
  47. ml.location as pos_name,
  48. mm.first_name as user,
  49. o.manager_id as user_id,
  50. op.created_at,
  51. op.updated_at
  52. from order_product as op
  53. LEFT JOIN `order` o ON(o.order_id=op.order_no)
  54. LEFT JOIN merchant_manager mm ON(mm.id=o.manager_id)
  55. LEFT JOIN merchant_location ml ON(ml.id=o.merchant_location_id)
  56.  
  57. WHERE op.refund_order_id!=0 AND op.id='${dih.delta.id}' "
  58.  
  59. deltaQuery="
  60. SELECT op.id as id
  61. FROM order_product as op
  62. WHERE op.refund_order_id!=0 AND updated_at>'${dih.delta.refund_orders.last_index_time}"
  63. >
  64. <field column="id" name="id" />
  65. <field column="store_id" name="store_id" />
  66. <field column="bill_date" name="bill_date" />
  67. <field column="original_order_no" name="original_order_no" />
  68. <field column="refunded_orderid" name="refunded_orderid" />
  69. <field column="sku_code" name="sku_code" />
  70. <field column="plu_code" name="plu_code" />
  71. <field column="description" name="description" />
  72. <field column="qty" name="qty" />
  73. <field column="price" name="price" />
  74. <field column="qty" name="qty" />
  75. <field column="discount" name="discount" />
  76. <field column="amount" name="amount" />
  77. <field column="pos_name" name="pos_name" />
  78. <field column="user" name="user" />
  79. <field column="user_id" name="user_id" />
  80. <field column="created_at" name="created_at" />
  81. <field column="updated_at" name="updated_at" />
  82. </entity>
  83. </document>
  84. </dataConfig>
Add Comment
Please, Sign In to add comment