|
@@ -104,6 +104,12 @@ public interface FsStoreOrderMapper
|
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserId != null '> " +
|
|
|
|
|
+ "and u.app_company_user_id =#{maps.appCompanyUserId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserName != null and maps.appCompanyUserName != \"\" '> " +
|
|
|
|
|
+ "and u.app_company_user_name like CONCAT('%',#{maps.appCompanyUserName},'%') " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
@@ -188,7 +194,7 @@ public interface FsStoreOrderMapper
|
|
|
List<FsStoreOrderVO> selectFsStoreOrderAllListVO(@Param("maps")FsStoreOrderParam param);
|
|
List<FsStoreOrderVO> selectFsStoreOrderAllListVO(@Param("maps")FsStoreOrderParam param);
|
|
|
|
|
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select o.*,u.phone,u.register_code,u.register_date,u.source,u.app_user_id as appUserId,u.app_dept_name as appDeptName, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber ,fp.pay_money as lastPayMoney from fs_store_order o left join fs_user u on o.user_id=u.user_id left join company c on c.company_id=o.company_id left join company_user cu on cu.user_id=o.company_user_id " +
|
|
|
|
|
|
|
+ "select o.*,u.phone,u.register_code,u.register_date,u.source,u.app_user_id as appUserId,u.app_dept_name as appDeptName,u.app_company_user_id as appCompanyUserId,u.app_company_user_name as appCompanyUserName, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber ,fp.pay_money as lastPayMoney from fs_store_order o left join fs_user u on o.user_id=u.user_id left join company c on c.company_id=o.company_id left join company_user cu on cu.user_id=o.company_user_id " +
|
|
|
" left join (select * from fs_store_payment where is_pay_remain = 1 and status = 1) fp on o.id = fp.order_id "+
|
|
" left join (select * from fs_store_payment where is_pay_remain = 1 and status = 1) fp on o.id = fp.order_id "+
|
|
|
"<if test = 'maps.productName != null and maps.productName != \"\" '> " +
|
|
"<if test = 'maps.productName != null and maps.productName != \"\" '> " +
|
|
|
"left join fs_store_order_item oi on o.id = oi.order_id "+
|
|
"left join fs_store_order_item oi on o.id = oi.order_id "+
|
|
@@ -210,6 +216,12 @@ public interface FsStoreOrderMapper
|
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserId != null '> " +
|
|
|
|
|
+ "and u.app_company_user_id =#{maps.appCompanyUserId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserName != null and maps.appCompanyUserName != \"\" '> " +
|
|
|
|
|
+ "and u.app_company_user_name like CONCAT('%',#{maps.appCompanyUserName},'%') " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
@@ -314,6 +326,12 @@ public interface FsStoreOrderMapper
|
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserId != null '> " +
|
|
|
|
|
+ "and u.app_company_user_id =#{maps.appCompanyUserId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserName != null and maps.appCompanyUserName != \"\" '> " +
|
|
|
|
|
+ "and u.app_company_user_name like CONCAT('%',#{maps.appCompanyUserName},'%') " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
@@ -568,7 +586,7 @@ public interface FsStoreOrderMapper
|
|
|
List<FsStoreOrder> selectFsStoreOrderListByFinish7Day();
|
|
List<FsStoreOrder> selectFsStoreOrderListByFinish7Day();
|
|
|
|
|
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select o.*,deliver.deliver_id as deliver_code,deliver.state_ex as delivery_type_code,deliver.status as kdn_delivery_status,cts.name as scheduleName,u.nickname,u.phone,u.app_user_id as appUserId,u.app_dept_name as appDeptName,cc.push_code,cc.create_time as customer_create_time,cc.source,cc.customer_code, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber ,p.title as package_title ,p.cate_id,CASE WHEN o.certificates IS NULL OR o.certificates = '' THEN 0 ELSE 1 END AS is_upload " +
|
|
|
|
|
|
|
+ "select o.*,deliver.deliver_id as deliver_code,deliver.state_ex as delivery_type_code,deliver.status as kdn_delivery_status,cts.name as scheduleName,u.nickname,u.phone,u.app_user_id as appUserId,u.app_dept_name as appDeptName,u.app_company_user_id as appCompanyUserId,u.app_company_user_name as appCompanyUserName,cc.push_code,cc.create_time as customer_create_time,cc.source,cc.customer_code, c.company_name ,cu.nick_name as company_user_nick_name ,cu.phonenumber as company_usere_phonenumber ,p.title as package_title ,p.cate_id,CASE WHEN o.certificates IS NULL OR o.certificates = '' THEN 0 ELSE 1 END AS is_upload " +
|
|
|
" from fs_store_order o left JOIN fs_store_product_package p on o.package_id=p.package_id left join fs_user u on o.user_id=u.user_id " +
|
|
" from fs_store_order o left JOIN fs_store_product_package p on o.package_id=p.package_id left join fs_user u on o.user_id=u.user_id " +
|
|
|
" left join company c on c.company_id=o.company_id left join company_user cu on cu.user_id=o.company_user_id left join crm_customer cc on cc.customer_id=o.customer_id left join company_tcm_schedule cts on cts.id = o.schedule_id " +
|
|
" left join company c on c.company_id=o.company_id left join company_user cu on cu.user_id=o.company_user_id left join crm_customer cc on cc.customer_id=o.customer_id left join company_tcm_schedule cts on cts.id = o.schedule_id " +
|
|
|
" left join fs_store_delivers deliver on deliver.order_id=o.id "+
|
|
" left join fs_store_delivers deliver on deliver.order_id=o.id "+
|
|
@@ -588,6 +606,12 @@ public interface FsStoreOrderMapper
|
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserId != null '> " +
|
|
|
|
|
+ "and u.app_company_user_id =#{maps.appCompanyUserId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserName != null and maps.appCompanyUserName != \"\" '> " +
|
|
|
|
|
+ "and u.app_company_user_name like CONCAT('%',#{maps.appCompanyUserName},'%') " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
@@ -690,6 +714,12 @@ public interface FsStoreOrderMapper
|
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserId != null '> " +
|
|
|
|
|
+ "and u.app_company_user_id =#{maps.appCompanyUserId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserName != null and maps.appCompanyUserName != \"\" '> " +
|
|
|
|
|
+ "and u.app_company_user_name like CONCAT('%',#{maps.appCompanyUserName},'%') " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
@@ -777,6 +807,12 @@ public interface FsStoreOrderMapper
|
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
"<if test = 'maps.appDeptName != null and maps.appDeptName != \"\" '> " +
|
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
"and u.app_dept_name like CONCAT('%',#{maps.appDeptName},'%') " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserId != null '> " +
|
|
|
|
|
+ "and u.app_company_user_id =#{maps.appCompanyUserId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
|
|
+ "<if test = 'maps.appCompanyUserName != null and maps.appCompanyUserName != \"\" '> " +
|
|
|
|
|
+ "and u.app_company_user_name like CONCAT('%',#{maps.appCompanyUserName},'%') " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
"<if test = 'maps.deliveryId != null and maps.deliveryId !=\"\" '> " +
|
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
"and o.delivery_id =#{maps.deliveryId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|