Commit 90db3fdc authored by 黎博's avatar 黎博

渠道/资方不传时默认所有

parent 1d8ef1ea
......@@ -50,8 +50,8 @@ public class QueryLoanUserDataController {
@GetMapping("/getLoanUserData")
public JsonResult getLoanUserData(@RequestParam(value = "namespace") String namespace,
@RequestParam(value = "status") Integer status,
@RequestParam(defaultValue = "1") Integer channel,
@RequestParam(defaultValue = "480") Integer fundId,
@RequestParam(defaultValue = "0") Integer channel,
@RequestParam(defaultValue = "0") Integer fundId,
@RequestParam(defaultValue = "1") Integer pageNum,
@RequestParam(defaultValue = "10") Integer pageSize) {
PageResult result = loanUserDataService.getLoanUserData(namespace, status, channel, fundId, pageNum, pageSize);
......
......@@ -3,6 +3,7 @@ package cn.quantgroup.qaplatform.dao;
import cn.quantgroup.qaplatform.domain.LoanUser;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
......@@ -18,7 +19,7 @@ public interface QueryBasicLoanStatusDataMapper {
/**
* 获取未申请用户数据uuidList
*/
List<String> getUnApplyLoanUserUuidList(Integer channel);
List<String> getUnApplyLoanUserUuidList(@Param("channel") Integer channel);
/**
* 判断手机号是否存在库里
......@@ -38,7 +39,7 @@ public interface QueryBasicLoanStatusDataMapper {
* @param status 0-审核中,1-审核拒绝,2-审核通过
* @return
*/
List<String> getAuditStatusUserIdList(Integer status, Integer channel);
List<String> getAuditStatusUserIdList(Integer status, @Param("channel") Integer channel);
/**
* 根据资方和渠道id查询审核通过未提现的用户
......@@ -46,14 +47,14 @@ public interface QueryBasicLoanStatusDataMapper {
* @param fundId
* @return
*/
List<String> queryAuthAndUnWithdraw(Integer channel, Integer fundId);
List<String> queryAuthAndUnWithdraw(@Param("channel") Integer channel, @Param("fundId") Integer fundId);
/**
* 根据借款状态获取用户列表
* @param progress 20-放款中,15-放款成功,23-放款失败
* @return
*/
List<String> getLoanStatusUserIdList(Integer progress, Integer channel, Integer fundId);
List<String> getLoanStatusUserIdList(Integer progress, @Param("channel") Integer channel, @Param("fundId") Integer fundId);
/**
* 获取多订单用例id列表
......
......@@ -4,7 +4,12 @@
<!-- 注册未申请 -->
<select id="getUnApplyLoanUserUuidList" resultType="java.lang.String">
SELECT `uuid` FROM `apply_list`
WHERE `apply_status` = 1 AND `channel_id`=#{channel}
<where>
`apply_status` = 1
<if test="channel != 0">
AND `channel_id` = #{channel}
</if>
</where>
</select>
<!-- 根据uuidList获取用户信息列表 -->
......@@ -14,7 +19,7 @@
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
order by create_at desc
order by created_at desc
</select>
<!-- 判断手机号是否在库里 -->
......@@ -35,7 +40,12 @@
<!-- 根据不同审核状态返回用户Id列表 -->
<select id="getAuditStatusUserIdList" resultType="java.lang.String">
SELECT `user_id` FROM apply_quota_record
WHERE `apply_status` = #{param1} AND `apply_from`=#{param2}
<where>
`apply_status` = #{status}
<if test="channel != 0">
AND `apply_from` = #{channel}
</if>
</where>
</select>
<!-- 审核通过未提现 xyqb库 -->
......@@ -43,10 +53,16 @@
SELECT afrr.user_id
FROM apply_funding_risk_record as afrr
LEFT JOIN assets_order as ao ON afrr.assets_order_id = ao.id
WHERE ao.created_from = #{param1}
AND afrr.funding_corp_id=#{param2}
AND afrr.apply_status = 2
AND ao.status &lt;&gt; 1
<where>
afrr.apply_status = 2
AND ao.status &lt;&gt; 1
<if test="channel != 0">
AND ao.created_from = #{channel}
</if>
<if test="fundId != 0">
AND afrr.funding_corp_id=#{fundId}
</if>
</where>
</select>
<!-- 获取不同放款状态的用户Id列表 xyqb库 -->
......@@ -55,9 +71,15 @@
FROM `loan_application_history` as lah
LEFT JOIN `apply_funding_risk_record` as afrr
on lah.`user_id` = afrr.`user_id`
WHERE `progress` = #{progress}
AND `channel_id` = #{channel}
AND `funding_corp_id` = #{fundId}
<where>
`progress` = #{progress}
<if test="channel != 0">
AND `channel_id` = #{channel}
</if>
<if test="fundId != 0">
AND `funding_corp_id` = #{fundId}
</if>
</where>
</select>
<!-- 获取多订单用户列表 -->
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment