|
|
|
|
// 数据库连接配置
|
|
|
|
|
require('dotenv').config();
|
|
|
|
|
|
|
|
|
|
module.exports = {
|
|
|
|
|
db: {
|
|
|
|
|
host: '1.95.162.61',
|
|
|
|
|
port: 3306,
|
|
|
|
|
user: 'root',
|
|
|
|
|
password: 'schl@2025',
|
|
|
|
|
database: 'wechat_app'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 数据库表结构配置
|
|
|
|
|
tables: {
|
|
|
|
|
users: {
|
|
|
|
|
name: 'users',
|
|
|
|
|
fields: {
|
|
|
|
|
id: 'id',
|
|
|
|
|
userId: 'userId',
|
|
|
|
|
phoneNumber: 'phoneNumber',
|
|
|
|
|
type: 'type',
|
|
|
|
|
authorizedRegion: 'authorized_region',
|
|
|
|
|
nickName: 'nickName'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
userManagements: {
|
|
|
|
|
name: 'usermanagements',
|
|
|
|
|
fields: {
|
|
|
|
|
userId: 'userId',
|
|
|
|
|
userName: 'userName'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
favorites: {
|
|
|
|
|
name: 'favorites',
|
|
|
|
|
fields: {
|
|
|
|
|
userPhone: 'user_phone',
|
|
|
|
|
productId: 'productId'
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
products: {
|
|
|
|
|
name: 'products',
|
|
|
|
|
fields: {
|
|
|
|
|
productId: 'productId',
|
|
|
|
|
productName: 'productName',
|
|
|
|
|
specification: 'specification',
|
|
|
|
|
quantity: 'quantity',
|
|
|
|
|
grossWeight: 'grossWeight',
|
|
|
|
|
yolk: 'yolk'
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 简道云配置
|
|
|
|
|
jiandaoyun: {
|
|
|
|
|
appId: '684bd1da61702bed58d15d13',
|
|
|
|
|
entryId: '693644f891a2fb633d1c0e8f',
|
|
|
|
|
apiKey: 'JgTzhmiwlwzz4LWl4dJ4FGZ6yr3VqxoW',
|
|
|
|
|
apiUrl: 'https://api.jiandaoyun.com/api/v1'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 字段映射关系
|
|
|
|
|
fieldMapping: {
|
|
|
|
|
'userId': '_widget_1765164283327',
|
|
|
|
|
'nickName': '_widget_1765164283341',
|
|
|
|
|
'phoneNumber': '_widget_1765164283342',
|
|
|
|
|
'type': '_widget_1765171392031',
|
|
|
|
|
'authorizedRegion': '_widget_1765164283330',
|
|
|
|
|
'userName': '_widget_1766021289472',
|
|
|
|
|
'productName': '_widget_1765164283332',
|
|
|
|
|
'specification': '_widget_1765164283336',
|
|
|
|
|
'quantity': '_widget_1765164283337',
|
|
|
|
|
'grossWeight': '_widget_1765164283338',
|
|
|
|
|
'yolk': '_widget_1765164283339'
|
|
|
|
|
},
|
|
|
|
|
|
|
|
|
|
// 同步配置
|
|
|
|
|
sync: {
|
|
|
|
|
// 增量同步模式:true - 只同步新增/未同步数据,false - 同步所有数据
|
|
|
|
|
incremental: true,
|
|
|
|
|
// 同步状态字段
|
|
|
|
|
statusField: 'sync_status',
|
|
|
|
|
// 最后同步时间字段
|
|
|
|
|
timeField: 'last_sync_time',
|
|
|
|
|
// 已同步状态值
|
|
|
|
|
syncedValue: 1,
|
|
|
|
|
// 未同步状态值
|
|
|
|
|
unsyncedValue: 0,
|
|
|
|
|
// 自动同步配置
|
|
|
|
|
autoSync: {
|
|
|
|
|
// 是否启用自动同步
|
|
|
|
|
enabled: true,
|
|
|
|
|
// 同步间隔时间(单位:分钟)
|
|
|
|
|
interval: 5
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
};
|