Commit a2345cdd authored by 李尚科's avatar 李尚科

z

parent 1e8d3212
Pipeline #18134 passed with stage
in 53 seconds
......@@ -402,7 +402,13 @@ class ProductService extends Service {
const { ctx } = this;
const user_sid = isNaN(ctx.oldUserId) ? ctx.helper.decodeUserSid(ctx.oldUserId) : ctx.oldUserId;
let filter = { where: { sid: user_sid } };
const userInfo = await ctx.gjjModel.SysGuest.one(filter);
let userInfo = {};
if (ctx.helper.toInt(user_sid) > 50000000) {
userInfo = await ctx.gjjModel.SysUser.one(filter);
} else {
userInfo = await ctx.gjjModel.SysGuest.one(filter);
}
ctx.logger.info('get_phone_by_user_sid:' + JSON.stringify(userInfo));
let place_cid = 0;
if (userInfo !== null) {
......@@ -411,7 +417,13 @@ class ProductService extends Service {
let jianbing_guest_customer_id = ctx.cookies.get('jianbing_guest_customer_id', { signed: false });
jianbing_guest_customer_id = isNaN(jianbing_guest_customer_id) ? ctx.helper.decodeUserSid(jianbing_guest_customer_id) : jianbing_guest_customer_id;
filter = { where: { sid: jianbing_guest_customer_id } };
const userInfo = await ctx.gjjModel.SysGuest.one(filter);
// const userInfo = await ctx.gjjModel.SysGuest.one(filter);
if (ctx.helper.toInt(jianbing_guest_customer_id) > 50000000) {
userInfo = await ctx.gjjModel.SysUser.one(filter);
} else {
userInfo = await ctx.gjjModel.SysGuest.one(filter);
}
ctx.logger.info('jianbing_guest_customer_id:' + JSON.stringify(userInfo));
if (userInfo !== null) {
place_cid = userInfo.place_cid;
......@@ -481,7 +493,13 @@ class ProductService extends Service {
// start
const user_sid = isNaN(ctx.oldUserId) ? ctx.helper.decodeUserSid(ctx.oldUserId) : ctx.oldUserId;
let filter = { where: { sid: user_sid } };
const userInfo = await ctx.gjjModel.SysGuest.one(filter);
let userInfo = {};
if (ctx.helper.toInt(user_sid) > 500000) {
userInfo = await ctx.gjjModel.SysUser.one(filter);
} else {
userInfo = await ctx.gjjModel.SysGuest.one(filter);
}
ctx.logger.info('get_phone_by_user_sid:' + JSON.stringify(userInfo));
let place_cid = 0;
if (userInfo !== null) {
......@@ -490,7 +508,12 @@ class ProductService extends Service {
let jianbing_guest_customer_id = ctx.cookies.get('jianbing_guest_customer_id', { signed: false });
jianbing_guest_customer_id = isNaN(jianbing_guest_customer_id) ? ctx.helper.decodeUserSid(jianbing_guest_customer_id) : jianbing_guest_customer_id;
filter = { where: { sid: jianbing_guest_customer_id } };
const userInfo = await ctx.gjjModel.SysGuest.one(filter);
if (ctx.helper.toInt(jianbing_guest_customer_id) > 500000) {
userInfo = await ctx.gjjModel.SysUser.one(filter);
} else {
userInfo = await ctx.gjjModel.SysGuest.one(filter);
}
ctx.logger.info('jianbing_guest_customer_id:' + JSON.stringify(userInfo));
if (userInfo !== null) {
place_cid = userInfo.place_cid;
......
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