|
@@ -15,7 +15,7 @@ class FinanceFollowService extends CrudService {
|
|
|
|
|
|
//授信接口
|
|
|
async getCredit(data){
|
|
|
- const { id,money,orcredit,senhemessage,jindiaomessage} = data;//id:关注ID money:授信额度
|
|
|
+ const { id,money,orcredit,senhemessage,jindiaomessage,sxcpname,sxhowlong,sxcplilue} = data;//id:关注ID money:授信额度
|
|
|
var now = new Date();
|
|
|
var nowtime =now.getTime();//当前时间戳(授信时间)
|
|
|
const financefollow = await this.model.findById(id);
|
|
@@ -25,6 +25,15 @@ class FinanceFollowService extends CrudService {
|
|
|
if(jindiaomessage){
|
|
|
financefollow.jindiaomessage = jindiaomessage;
|
|
|
}
|
|
|
+ if(sxcpname){
|
|
|
+ financefollow.sxcpname = sxcpname;
|
|
|
+ }
|
|
|
+ if(sxhowlong){
|
|
|
+ financefollow.sxhowlong = sxhowlong;
|
|
|
+ }
|
|
|
+ if(sxcplilue){
|
|
|
+ financefollow.sxcplilue = sxcplilue;
|
|
|
+ }
|
|
|
financefollow.orcredit = orcredit;
|
|
|
if(money){
|
|
|
financefollow.credit_money = parseInt(money);
|
|
@@ -63,6 +72,13 @@ class FinanceFollowService extends CrudService {
|
|
|
foreignField: '_id',
|
|
|
as: 'clamnew' } },
|
|
|
{ $unwind: '$clamnew' },
|
|
|
+ { $lookup: {
|
|
|
+ from: 'company_identify',
|
|
|
+ localField: 'clamnew.userid',
|
|
|
+ foreignField: 'uid',
|
|
|
+ as: 'comnew' } },
|
|
|
+ { $unwind: '$comnew' },
|
|
|
+ { $project: {clamnew:1,finceId:1,savetime:1,orcredit:1,_id:1,comnewname:'$comnew.company_name'}},
|
|
|
{ $skip: (skip - 1) * limit },
|
|
|
{ $limit: limit },
|
|
|
{ $sort : { savetime:-1 } }
|