Commit 702d90f7 by 孙亚楠

d

parent 2d4a1b6a
......@@ -119,5 +119,31 @@ class MerchantCtl extends CtlBase {
return system.getResult({type: res});
}
/**
* fn:获取商户交付信息
* @param params
* @param pobj2
* @param req
* @returns {Promise<{msg: string, data: (*|null), bizmsg: string, status: number}|*>}
*/
async delvierInfo(params, pobj2, req) {
try {
if(!params.saas_merchant_id){
system.getResult(null, `登录失效,请重新登录`);
}
let user = req.loginUser;
let rs = {
contact_man:user.contact_man,
contact_mobile : user.contact_mobile,
contact_email : user.contact_email,
contact_addr : user.contact_addr,
};
return system.getResult(rs);
} catch (error) {
return system.getResult(null, `系统错误 错误信息 ${error}`);
}
}
}
module.exports = MerchantCtl;
......@@ -12,6 +12,7 @@ class UserCtl extends CtlBase {
this.redisClient = system.getObject("util.redisClient");
this.captchaSve = system.getObject("service.common.captchaSve");
this.deliverSve = system.getObject("service.common.deliverSve");
this.merchantCtl = system.getObject("service.saas.merchantSve");
}
async login(pobj, pobj2, req, res) {
......@@ -27,6 +28,17 @@ class UserCtl extends CtlBase {
}
loginUser = loginUser.data;
let channel = await this.merchantCtl.info({id:loginUser.saas_merchant_id});
if (channel.status != 0) {
return system.getResult(null, `渠道【${loginName}】不存在`);
}
channel = channel.data;
loginUser.contact_man = channel.contact_man;
loginUser.contact_mobile = channel.contact_mobile;
loginUser.contact_email = channel.contact_email;
loginUser.contact_addr = channel.contact_addr;
var loginsid = await this.setLogin(loginUser);
let rs = {
key: loginsid,
......
......@@ -188,22 +188,22 @@ class System {
let dev = "http://39.107.234.14";
return {
// 公共服务
common: dev + ":3102" + path,
common: local + ":3102" + path,
// 商户服务
merchant: dev + ":3101" + path,
merchant: local + ":3101" + path,
// 订单服务
order: dev + ":3103" + path,
order: local + ":3103" + path,
// 发票服务
invoice: dev + ":3105" + path,
// 用户服务
uc: dev + ":3106" + path,
uc: local + ":3106" + path,
// 交易
trade: dev + ":3107" + path,
trade: local + ":3107" + path,
}
} else {
return {
......
......@@ -5,6 +5,12 @@ var settings={
password: "Gongsibao2018",
db:10,
},
// redis:{
// host: "127.0.0.1",
// port: 6379,
// password: "",
// db:10,
// },
database:{
dbname : "xgg",
user: "write",
......
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