Commit e108f57b by 王昆

gsb

parent ea358796
......@@ -10,7 +10,7 @@ class LDUserService extends ServiceBase {
async loginH5(params) {
let p_id = params.p_id;
let p_user_id = params.p_user_id;
let p_user_balance = system.y2f(params.p_user_balance);
let p_user_balance = params.p_user_balance;
let user = await this.dao.findOne({p_id: p_id, p_user_id: p_user_id});
if (!user) {
user = await this.dao.create(params);
......
......@@ -47,18 +47,11 @@ class LDApplet extends AppletBase {
}
}
async encrypt(obj, req) {
let key = {
"partner": "10001",
"user_id": "100120123",
"mchtId": "1103817785420820481",
"balance": "200"
};
let en = system.encryption(JSON.stringify(key));
console.log(en);
return system.getErrResult2(encodeURIComponent(en))
}
// async encrypt(obj, body, req) {
// let en = system.encryption(JSON.stringify(body.key));
// console.log(en);
// return system.getErrResult2(encodeURIComponent(en))
// }
async removeLoginCache(uk, sid) {
await this.redisClient.delete(uk);
......@@ -483,7 +476,7 @@ class LDApplet extends AppletBase {
complete_time: new Date()
});
// 更新用户余额
let ubrs = await this.lduserSve.updateBalance(lduser.id, amt * -1);
let ubrs = await this.lduserSve.updateBalance(lduser.id, amt * - 1);
console.log(ubrs);
lduser = await this.lduserSve.findById(lduser.id);
......
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