|
@@ -69,7 +69,7 @@ public class LibOrderDetailsQueryDaoImpl implements LibOrderDetailsQueryDao {
|
|
public List<Map<String, Object>> getOrderDetailByOrgCode(Map<String, Object> searchParams) {
|
|
public List<Map<String, Object>> getOrderDetailByOrgCode(Map<String, Object> searchParams) {
|
|
StringBuilder selSQL = new StringBuilder();
|
|
StringBuilder selSQL = new StringBuilder();
|
|
List<Object> queryParams = new ArrayList<Object>();
|
|
List<Object> queryParams = new ArrayList<Object>();
|
|
- selSQL.append(" SELECT d.price ,d.book_price ,d.order_no, d.know ,date_format(d.create_time, '%Y-%m-%d %H:%i:%s')as create_time ,d.details , t.league_name , ");
|
|
|
|
|
|
+ selSQL.append(" SELECT o.transaction_id,d.price ,d.book_price ,d.order_no, d.know ,date_format(d.create_time, '%Y-%m-%d %H:%i:%s')as create_time ,d.details , t.league_name , ");
|
|
selSQL.append(" s.type as s_type ,s.`name` ,s.telephone ,v.parent_name ,v.child_name ,v.phone ,v.school ,v.grade , date_format(d.end_time, '%Y-%m-%d %H:%i:%s')as end_time , ");
|
|
selSQL.append(" s.type as s_type ,s.`name` ,s.telephone ,v.parent_name ,v.child_name ,v.phone ,v.school ,v.grade , date_format(d.end_time, '%Y-%m-%d %H:%i:%s')as end_time , ");
|
|
selSQL.append(" case d.type WHEN '1' THEN '新签' ELSE '续签' END as d_type , ");
|
|
selSQL.append(" case d.type WHEN '1' THEN '新签' ELSE '续签' END as d_type , ");
|
|
selSQL.append(" CASE d.price_species WHEN 'S001' THEN (CASE d.vip_status WHEN '4' THEN '联名卡' WHEN '5' THEN '特色课程' ELSE '外借书及阅读指导' END) ");
|
|
selSQL.append(" CASE d.price_species WHEN 'S001' THEN (CASE d.vip_status WHEN '4' THEN '联名卡' WHEN '5' THEN '特色课程' ELSE '外借书及阅读指导' END) ");
|
|
@@ -86,7 +86,7 @@ public class LibOrderDetailsQueryDaoImpl implements LibOrderDetailsQueryDao {
|
|
selSQL.append(" WHEN 'C020' THEN '阅读产品收费' ");
|
|
selSQL.append(" WHEN 'C020' THEN '阅读产品收费' ");
|
|
selSQL.append(" ELSE '其他' END as type , ");
|
|
selSQL.append(" ELSE '其他' END as type , ");
|
|
selSQL.append(" case d.libtype WHEN '1' THEN '家庭图书馆' WHEN '2' THEN '共享图书馆A' ELSE '共享图书馆B' END as d_libtype ");
|
|
selSQL.append(" case d.libtype WHEN '1' THEN '家庭图书馆' WHEN '2' THEN '共享图书馆A' ELSE '共享图书馆B' END as d_libtype ");
|
|
- selSQL.append(" from tb_lib_order_details d left join tb_lib_join t ");
|
|
|
|
|
|
+ selSQL.append(" from tb_lib_order_details d LEFT JOIN tb_orders o on d.order_id=o.id left join tb_lib_join t ");
|
|
selSQL.append(" on d.lib_id = t.id ");
|
|
selSQL.append(" on d.lib_id = t.id ");
|
|
selSQL.append(" left join tb_lib_staffing s on s.lib_id = d.lib_id AND s.user_id = d.sales_user_id and d.staffing_type = s.type ");
|
|
selSQL.append(" left join tb_lib_staffing s on s.lib_id = d.lib_id AND s.user_id = d.sales_user_id and d.staffing_type = s.type ");
|
|
selSQL.append(" left join tb_lib_vip v on v.id = d.vip_id ");
|
|
selSQL.append(" left join tb_lib_vip v on v.id = d.vip_id ");
|