Commit 0ccaaa4e authored by 任国军's avatar 任国军

fix loanRecommend log

parent 25ef7e0d
Pipeline #10371 passed with stage
in 39 seconds
......@@ -224,6 +224,7 @@ class ProductService extends Service {
if (ctx.isEmpty(userId)) {
const commonLoanList = await this.getCommonBusinessList();
ret = this.formatLoanList(R.take(limit)(R.sort(recommendSort)(commonLoanList)));
console.log('未登录');
} else {
// 日志
const log = {
......@@ -304,6 +305,7 @@ class ProductService extends Service {
})(classB);
result = R.insertAll(result.length, classB)(result);
}
// 如果数量不够,再取C
if (result.length < limit) {
// 判断C组是否有值
......@@ -342,6 +344,7 @@ class ProductService extends Service {
}
log.c_class_list = R.pluck('business_id')(classList.class_C).join(',');
log.is_run_pass_rate = 1;
log.pass_rate_list = JSON.stringify(passRateList);
} else {
// 模型计算参数不够,仍然采用手动推荐
classList.class_C = R.sort(recommendSort)(classList.class_C);
......@@ -352,6 +355,7 @@ class ProductService extends Service {
e.needCalc = (isNeedCalc || (isNeedCalc && rule === 3)) ? 1 : 0;
return e;
})(classList.class_C);
log.c_class_list = R.pluck('business_id')(classList.class_C).join(',');
}
} else {
classList.class_C = R.sort(recommendSort)(classList.class_C);
......
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