D1D0数据同步,提现审核相关

This commit is contained in:
liuyingfang
2023-07-06 17:01:21 +08:00
parent f0174ef087
commit a473fd6457
10 changed files with 271 additions and 37 deletions

View File

@@ -71,5 +71,8 @@ public interface CashMapper extends BaseMapper<Cash> {
* @return 提现总金额
*/
BigDecimal selectCashAmtTotal(@Param("userId") String userId, @Param("statusArr") int... statusArr);
List<Cash> subordinate(@Param("userId") Long userId, @Param("size") Integer size, @Param("page")Integer page,
@Param("status") String status);
}

View File

@@ -217,4 +217,32 @@
</foreach>
</if>
</select>
<select id="subordinate" parameterType="java.lang.Long" resultType="cn.pluss.platform.entity.Cash">
SELECT
IF( v.accountNo='', '', CONCAT(LEFT(v.accountNo, 3), '****', RIGHT(v.accountNo,4))) AS accountNo,
v.*
FROM
(
SELECT
@ids AS _ids,
( SELECT @ids := GROUP_CONCAT( user_id ) FROM tb_pluss_user_promotion WHERE FIND_IN_SET( parent_user_id, @ids ) ) AS cids,
@l := @l + 1 AS LEVEL
FROM
tb_pluss_user_promotion,
( SELECT @ids := #{userId}, @l := 0 ) b
WHERE
@ids IS NOT NULL
) ID,
tb_pluss_user_promotion p
LEFT JOIN tb_pluss_cash v ON p.user_id = v.userId
WHERE
FIND_IN_SET( p.user_id, ID._ids )
AND v.userId != #{userId}
AND v.id IS NOT NULL
<if test="status != null and status !=''">
AND v.status = #{status}
</if>
limit #{page},#{size}
</select>
</mapper>