Commit d3b2de37 authored by 李尚科's avatar 李尚科
parents d8f4b69e c6b59526
Pipeline #15706 passed with stage
in 45 seconds
'use strict';
const moment = require('moment');
module.exports = app => {
const { STRING, INTEGER, DATE } = app.Sequelize;
const SysGuest = app.gjjModel.define('sys_guest', {
sid: {
type: INTEGER,
primaryKey: true,
autoIncrement: true
},
passport: {
type: STRING,
allowNull: false
},
place_cid: {
type: INTEGER,
allowNull: false
},
}, {
timestamps: false,
tableName: 'sys_guest',
});
SysGuest.one = async (data) => {
const attributes = data.attributes ? data.attributes : {};
const where = data.where ? data.where : {};
return await SysGuest.findOne({
attributes: attributes,
where: where,
});
}
return SysGuest;
};
...@@ -401,8 +401,38 @@ class ProductService extends Service { ...@@ -401,8 +401,38 @@ class ProductService extends Service {
} }
async formatLoanList(loanList) { async formatLoanList(loanList) {
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
const { ctx } = this;
const user_sid = ctx.oldUserId;
let filter = { where: { sid: user_sid } };
let userInfo = await ctx.gjjModel.SysUser.one(filter);
ctx.logger.info('get_phone_by_user_sid:' + JSON.stringify(userInfo));
let place_cid = 0;
if (userInfo !== null) {
place_cid = userInfo.place_cid;
} else {
const jianbing_guest_customer_id = ctx.cookies.get('jianbing_guest_customer_id', { signed: false });
filter = { where: { sid: jianbing_guest_customer_id } };
let userInfo = await ctx.gjjModel.SysGuest.one(filter);
if (userInfo !== null) {
place_cid = userInfo.place_cid;
}
}
//end
const ret = []; const ret = [];
for (const v of loanList) { for (const v of loanList) {
//以下代码是为了处理渠道包下不展示特殊的4个业务
//start
let sepecial_business_ids = [95, 7, 130, 51];
if(place_cid > 0 && place_cid == 2420 && sepecial_business_ids.includes(v.business_id)) {
continue;
}
//end
// 处理C组 // 处理C组
let url = v.url; let url = v.url;
if (v.hasOwnProperty('class')) { if (v.hasOwnProperty('class')) {
......
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