Browse Source

添加reason字段到User模型

蛋吧eggbar
徐飞洋 1 month ago
parent
commit
604d164569
  1. 6
      server-example/server-mysql.js

6
server-example/server-mysql.js

@ -1209,7 +1209,7 @@ User.init({
authorized_region: { authorized_region: {
type: DataTypes.TEXT // 存储用户位置信息的JSON字符串 type: DataTypes.TEXT // 存储用户位置信息的JSON字符串
}, },
reasonforfailure: { reason: {
type: DataTypes.TEXT // 审核失败原因 type: DataTypes.TEXT // 审核失败原因
}, },
agreement: { agreement: {
@ -2474,7 +2474,7 @@ app.post('/api/user/validate', async (req, res) => {
// 查找用户 // 查找用户
const user = await User.findOne({ const user = await User.findOne({
where: { openid }, where: { openid },
attributes: ['openid', 'userId', 'name', 'avatarUrl', 'phoneNumber', 'type', 'partnerstatus', 'reasonforfailure', 'idcardstatus'] attributes: ['openid', 'userId', 'name', 'avatarUrl', 'phoneNumber', 'type', 'partnerstatus', 'reason', 'idcardstatus']
}); });
if (!user) { if (!user) {
@ -7932,7 +7932,7 @@ app.post('/api/settlement/resubmit/:applicationId', async (req, res) => {
// 将用户的partnerstatus设置为Null // 将用户的partnerstatus设置为Null
await user.update({ await user.update({
partnerstatus: null, partnerstatus: null,
reasonforfailure: null reason: null
}); });
res.json({ res.json({

Loading…
Cancel
Save