|
@@ -74,7 +74,7 @@ public interface FsStorePaymentScrmMapper
|
|
|
FsStorePaymentScrm selectFsStorePaymentByCode(String payCode);
|
|
FsStorePaymentScrm selectFsStorePaymentByCode(String payCode);
|
|
|
|
|
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select p.*,o.order_code,c.company_name,d.dept_name,u.phone as user_phone,cu.nick_name as company_user_nick_name,cu.user_name as company_user_name from fs_store_payment_scrm p left join company_user cu on p.company_user_id=cu.user_id left join fs_user u on u.user_id=p.user_id left join company_dept d on d.dept_id=p.dept_id left join company c on c.company_id=p.company_id left join fs_store_order_scrm o on o.id=p.order_id " +
|
|
|
|
|
|
|
+ "select p.*,o.order_code,c.company_name,d.dept_name,u.phone as user_phone,cu.nick_name as company_user_nick_name,cu.user_name as company_user_name,fcpsc.name as app_name from fs_store_payment_scrm p left join company_user cu on p.company_user_id=cu.user_id left join fs_user u on u.user_id=p.user_id left join company_dept d on d.dept_id=p.dept_id left join company c on c.company_id=p.company_id left join fs_store_order_scrm o on o.id=p.order_id left join fs_course_play_source_config fcpsc on p.app_id=fcpsc.appid " +
|
|
|
"where 1=1 " +
|
|
"where 1=1 " +
|
|
|
"<if test = 'maps.payCode != null and maps.payCode !=\"\" '> " +
|
|
"<if test = 'maps.payCode != null and maps.payCode !=\"\" '> " +
|
|
|
"and p.pay_code like CONCAT('%',#{maps.payCode},'%') " +
|
|
"and p.pay_code like CONCAT('%',#{maps.payCode},'%') " +
|
|
@@ -144,7 +144,7 @@ public interface FsStorePaymentScrmMapper
|
|
|
List<FsStorePaymentVO> selectFsStorePaymentListQuery(@Param("maps") FsStorePaymentParam fsStorePayment);
|
|
List<FsStorePaymentVO> selectFsStorePaymentListQuery(@Param("maps") FsStorePaymentParam fsStorePayment);
|
|
|
|
|
|
|
|
@Select({"<script> " +
|
|
@Select({"<script> " +
|
|
|
- "select SUM(CASE WHEN p.status IN (1, -1) AND p.pay_money IS NOT NULL THEN p.pay_money ELSE 0 END) AS totalPaymentAmount, SUM(CASE WHEN p.status = '-1' AND p.refund_audit_status = '2' AND refund_money IS NOT NULL THEN p.refund_money ELSE 0 END) AS totalRefundAmount from fs_store_payment_scrm p left join company_user cu on p.company_user_id=cu.user_id left join fs_user u on u.user_id=p.user_id left join company_dept d on d.dept_id=p.dept_id left join company c on c.company_id=p.company_id left join fs_store_order_scrm o on o.id=p.order_id " +
|
|
|
|
|
|
|
+ "select SUM(CASE WHEN p.status IN (1, -1) AND p.pay_money IS NOT NULL THEN p.pay_money ELSE 0 END) AS totalPaymentAmount, SUM(CASE WHEN p.status = '-1' AND refund_money IS NOT NULL THEN p.refund_money ELSE 0 END) AS totalRefundAmount from fs_store_payment_scrm p left join company_user cu on p.company_user_id=cu.user_id left join fs_user u on u.user_id=p.user_id left join company_dept d on d.dept_id=p.dept_id left join company c on c.company_id=p.company_id left join fs_store_order_scrm o on o.id=p.order_id " +
|
|
|
"where 1=1 " +
|
|
"where 1=1 " +
|
|
|
"<if test = 'maps.payCode != null and maps.payCode !=\"\" '> " +
|
|
"<if test = 'maps.payCode != null and maps.payCode !=\"\" '> " +
|
|
|
"and p.pay_code like CONCAT('%',#{maps.payCode},'%') " +
|
|
"and p.pay_code like CONCAT('%',#{maps.payCode},'%') " +
|
|
@@ -170,6 +170,9 @@ public interface FsStorePaymentScrmMapper
|
|
|
"<if test = 'maps.companyId != null '> " +
|
|
"<if test = 'maps.companyId != null '> " +
|
|
|
"and p.company_id =#{maps.companyId} " +
|
|
"and p.company_id =#{maps.companyId} " +
|
|
|
"</if>" +
|
|
"</if>" +
|
|
|
|
|
+ "<if test = 'maps.appId != null '> " +
|
|
|
|
|
+ "and p.app_id =#{maps.appId} " +
|
|
|
|
|
+ "</if>" +
|
|
|
"<if test = 'maps.params != null and maps.params != \"\" '> " +
|
|
"<if test = 'maps.params != null and maps.params != \"\" '> " +
|
|
|
"<if test = 'maps.params.beginTime != null and maps.params.beginTime != \"\" '> " +
|
|
"<if test = 'maps.params.beginTime != null and maps.params.beginTime != \"\" '> " +
|
|
|
" AND date_format(p.pay_time,'%y%m%d') >= date_format(#{maps.params.beginTime},'%y%m%d') " +
|
|
" AND date_format(p.pay_time,'%y%m%d') >= date_format(#{maps.params.beginTime},'%y%m%d') " +
|